• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Client JAR Problem

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have deployed my ejb's on one weblogic server. I have a client (servlets) running on another weblogic server. The client machine has a jar which contains the Home and the Remote Interfaces of the beans that are deployed on the main server hosting the ejb's. However, I get the following exception when i try to access the beans on the server from the client.
=================================================================
weblogic.rmi.UnmarshalException: Unmarshalling return
- with nested exception:
[java.lang.ClassNotFoundException: class com.opus.epg.useraccess.AdminSystemBeanHomeImpl_ServiceStub previously not found]
at weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(BasicWLContext_WLStub.java:256)
at weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.opus.epg.classes.utils.EpgApplicationContext.lookup(EpgApplicationContext.java:161)
at com.opus.epg.classes.wi.EpgNavigationController.getInstance(EpgNavigationController.java:110)
at com.opus.epg.servlets.wi.EpgControllerServlet.init(EpgControllerServlet.java:48)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:390)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:349)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:338)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:164)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:99)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:742)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:686)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:247)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:361)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
=================================================================
I turned on the "-verbose" option while running the server. I find that the class AdminSystemHome is not being loaded. I have placed the jar containing the Home and the remote interfaces in the weblogic\myserver\serverclasses directory and specified path in the weblogic classpath .
Could anyone please shed some light on the possible solution?
Thanks in advance.
Ashutosh
 
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks to me as though one of the generated stub classes cannot be found on the classpath when the lookup of the bean is made. Some of the generated stubs need to be available as well as the Home and Remote interfaces.
 
Ashutosh Shinde
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi George,
I always thought that in case of Weblogic , the stubs would be downloaded on the client side when a request was made and that I only needed the Home and the Remote classes for the casting. Is there some setting that one needs to do, to get these stubs downloaded on the client side at runtime? i.e. enable class loading via the network?

Thanks again,
Ashutosh.
 
George Brown
Ranch Hand
Posts: 919
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ashutosh Shinde:
I always thought that in case of Weblogic , the stubs would be downloaded on the client side when a request was made and that I only needed the Home and the Remote classes for the casting.


where did you read that? And have you ever seen it work that way?
I think you have to think of the EJB connection as an RMI connection under the surface, and as with an RMI connection, your client needs access to the stubs.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to deploy the stubs on the client server as well..
regards,
/Peter
 
Ashutosh Shinde
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
An option suggested by a BEA person was to enable unsafeClassLoading while starting weblogic server. So, i enable the above property using system.weblogic.enableUnsafeClassloading=true (or something similar) and the thing worked.Now, i dont need to put the stubs in the client jar.But, I am not sure of the consequences, other than the one exhibited, of setting the mentioned property. I hope that I am not compromising on the security in any manner, because i suppose i am allowing the classes to be loaded from the network. Any suggestions would be most welcome.
ashutosh
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic