MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
CyTG
Post subject: Trying to run simple ejb3 example on weblogic  PostPosted: Aug 10, 2007 - 09:41 AM
Registered Member
Registered Member


Joined: Aug 10, 2007
Posts: 19

Hey, 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!
 
 View user's profile Send private message  
Reply with quote Back to top
Support-Brian
Post subject:   PostPosted: Aug 10, 2007 - 06:56 PM
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2518

Cy,

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
Code:
@Stateless(name="MyBean", mappedName="ejb/MyBean") 
and then use this name in your client code.

Hope this helps.

_________________
Brian
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
FlyOnStorm
Post subject: This solution does not work.  PostPosted: Feb 03, 2008 - 07:09 AM



Joined: Feb 03, 2008
Posts: 2

In 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...
 
 View user's profile Send private message  
Reply with quote Back to top
FlyOnStorm
Post subject: This solution does not work.  PostPosted: Feb 03, 2008 - 07:09 AM



Joined: Feb 03, 2008
Posts: 2

In 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...
 
 View user's profile Send private message  
Reply with quote Back to top
cottongear
Post subject: Have you got this working ?  PostPosted: Jan 19, 2009 - 03:54 AM



Joined: Nov 02, 2008
Posts: 3

I am also having the same problem and I hope this has been resolved.
Could you please post the solution for this issue ?

Thanks,
Cotton
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits