tag:blogger.com,1999:blog-28228406.post1396615685155018097..comments2024-03-27T00:44:17.190-04:00Comments on Java How To ...: A simple EJB 3 application, hand-madeUnknownnoreply@blogger.comBlogger8125tag:blogger.com,1999:blog-28228406.post-5627999057188817742012-04-25T07:26:58.393-04:002012-04-25T07:26:58.393-04:00I tried this example with glassfish 3.1.1 and it w...I tried this example with glassfish 3.1.1 and it works !<br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-28228406.post-67613122853434434532011-12-30T13:02:51.251-05:002011-12-30T13:02:51.251-05:00This is just an INFO log, and shouldn't affect...This is just an INFO log, and shouldn't affect your application running.javahowtohttps://www.blogger.com/profile/18276646603642614642noreply@blogger.comtag:blogger.com,1999:blog-28228406.post-63194415563851855612011-12-30T09:06:12.995-05:002011-12-30T09:06:12.995-05:00hen I run the client, I am getting the following e...hen I run the client, I am getting the following error. Any help?<br /><br />Dec 30, 2011 7:35:01 PM com.sun.enterprise.v3.server.CommonClassLoaderServiceImp<br />l findDerbyClient<br />INFO: Cannot find javadb client jar file, derby jdbc driver will not be availabl<br />e by default.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-28228406.post-40675022986970549582011-10-10T21:57:21.186-04:002011-10-10T21:57:21.186-04:00It's a Java SE client so you cannot use @EJB. ...It's a Java SE client so you cannot use @EJB. @EJB can only be used in Java EE component classes.javahowtohttps://www.blogger.com/profile/18276646603642614642noreply@blogger.comtag:blogger.com,1999:blog-28228406.post-65734009975886496622011-10-10T20:40:17.280-04:002011-10-10T20:40:17.280-04:00It's easy and straightforward!! Thank you frie...It's easy and straightforward!! Thank you friend!<br /><br />Do you know why @EJB<br /> private static FooRemote foo; doesn't work in this case?animeworldhttps://www.blogger.com/profile/01943464415107685107noreply@blogger.comtag:blogger.com,1999:blog-28228406.post-53271418218570504702009-04-13T09:14:00.000-04:002009-04-13T09:14:00.000-04:00Do not case InitialContext to the bean's business ...Do not case InitialContext to the bean's business interface. What you want to do is cast the lookup result into bean's business interface:<BR/><BR/>try {<BR/> Foo foo = (Foo) initialContext.lookup("ejb/foo");<BR/>} catch (NamingException e) {<BR/>...<BR/>}javahowtohttps://www.blogger.com/profile/18276646603642614642noreply@blogger.comtag:blogger.com,1999:blog-28228406.post-52558331218731204802009-04-13T07:48:00.000-04:002009-04-13T07:48:00.000-04:00same problem here too. when i try to cast the inti...same problem here too. when i try to cast the intial Context object to session bean interface, i'm getting the class cast exception. <BR/><BR/>help me in this.Uday Kumarhttps://www.blogger.com/profile/06281053541300332418noreply@blogger.comtag:blogger.com,1999:blog-28228406.post-80841151172923516332007-08-24T16:46:00.000-04:002007-08-24T16:46:00.000-04:00I am running an ejb3 applicatino using javaws from...I am running an ejb3 applicatino using javaws from the command line. Applicatin is deployed on jboss4.2.1. However I recieve this exception:<BR/><BR/>class javax.naming.Reference<BR/>java.lang.ClassCastException: javax.naming.Reference<BR/> at com.nwi.asa.common.communication.CommDelegate.createSession(CommDelegate.java:54)<BR/> at com.nwi.asa.common.communication.CommDelegate.init(CommDelegate.java:42)<BR/> at com.nwi.asa.common.login.LoginManager.login(LoginManager.java:163)<BR/> at com.nwi.asa.common.login.LoginManagerActionListener$1.actionPerformed(LoginManagerActionListener.java:40)<BR/> at javax.swing.Timer.fireActionPerformed(Unknown Source)<BR/> at javax.swing.Timer$DoPostEvent.run(Unknown Source)<BR/> at java.awt.event.InvocationEvent.dispatch(Unknown Source)<BR/> at java.awt.EventQueue.dispatchEvent(Unknown Source)<BR/> at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)<BR/> at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)<BR/> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<BR/> at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<BR/> at java.awt.EventDispatchThread.run(Unknown Source)<BR/><BR/>This exception is thrown when a session bean is looked up and casted into corresponding session bean class.<BR/> However when i run the application directly from command line using java(as i have code on my machine), the application runs perfectly fine. Can you tell me how to resolve this issue. Is it because of class loader or some policy? If so then please tell me the way outUnknownhttps://www.blogger.com/profile/00600913637542639569noreply@blogger.com