facebook

Trying to run simple ejb3 example on weblogic

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #273737 Reply

    CyTG
    Member

    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!

    #273758 Reply

    Brian Fernandes
    Moderator

    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

    @Stateless(name="MyBean", mappedName="ejb/MyBean")  

    and then use this name in your client code.

    Hope this helps.

    #281406 Reply

    FlyOnStorm
    Member

    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…

    #281407 Reply

    FlyOnStorm
    Member

    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…

    #293637 Reply

    cottongear
    Member

    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

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Trying to run simple ejb3 example on weblogic

You must be logged in to post in the forum log in