- This topic has 4 replies, 4 voices, and was last updated 16 years, 1 month ago by
cottongear.
-
AuthorPosts
-
CyTGMemberHey, i have no idea what im doing wrong here .. this should be open and shut, but it just aint.
i followed this tutorial to the letter, with the exception of using weblogic instead of glassfish
http://www.myeclipseide.com/documentation/quickstarts/ejb3/
and everything is fine until i run the clientcode wich results in
javax.naming.NameNotFoundException: While trying to lookup ‘com.myeclipseide.ejb3.MyBeanRemote’ didn’t find subcontext ‘com’. Resolved ” [Root exception is javax.naming.NameNotFoundException: While trying to lookup ‘com.myeclipseide.ejb3.MyBeanRemote’ didn’t find subcontext ‘com’. Resolved ”]; remaining name ‘com/myeclipseide/ejb3/MyBeanRemote’
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:217)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:338)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
at weblogic.jndi.internal.ServerNamingNode_1000_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:379)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:367)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.myeclipseide.ejb3.MyBeanClient.main(MyBeanClient.java:17)I start the admin console to lookup my application under “Deployments”, and there it is ;
_appsdir_MyFirstEclipseEJB_dir (autodeployed)..So .. i figure i’ll need to “start” it or something (allthough it IS deployed??) .. sÃ¥ i mark the box, hit start and gets this
weblogic.management.ManagementException: [Deployer:149001]No application named ‘_appsdir_MyFirstEclipseEJB_dir’ exists for operation start
Thats just hellafine ..
Another thing thats bugging me … where’s the ejb-jar.xml, is that gone for ejb3 sessions ? cause myeclipse sure isnt generating one.Thanks to anyone who takes the time to read this!
Brian FernandesModeratorCy,
It would seem that your EJB app has been deployed correctly, but the naming conventions used to refer to the beans are different in Weblogic (our example used Glassfish). If you look at that tutorial again, note the 2nd point just below the snippet for main towards the end of the tutorial.
Weblogic uses a different naming scheme, you could use the default name assigned to your bean or assign one yourself using an annotation like
@Stateless(name="MyBean", mappedName="ejb/MyBean")
and then use this name in your client code.
Hope this helps.
FlyOnStormMemberIn MyBean implementation, I added detailed annotation like this,
@Stateless(name=”MyBean”,mappedName=”ejb/MyBean”)
And when tried in client side, with jndi name ‘MyBean’, ‘ejb/MyBean’ or event the original sample’s name ‘com.myeclipseside.ebj3.MyBeanRemote’, I got the same exception each time.
javax.naming.NameNotFoundException: Unable to resolve…
FlyOnStormMemberIn MyBean implementation, I added detailed annotation like this,
@Stateless(name=”MyBean”,mappedName=”ejb/MyBean”)
And when tried in client side, with jndi name ‘MyBean’, ‘ejb/MyBean’ or event the original sample’s name ‘com.myeclipseside.ebj3.MyBeanRemote’, I got the same exception each time.
javax.naming.NameNotFoundException: Unable to resolve…
cottongearMemberI am also having the same problem and I hope this has been resolved.
Could you please post the solution for this issue ?Thanks,
Cotton -
AuthorPosts