Grupuri Google nu mai acceptă postările sau abonamentele noi Usenet. Conținutul anterior este în continuare vizibil.

[Q] ClassNotFoundException for EJB stub in Webstart application

0 afișări
Accesați primul mesaj necitit

Ravi Shankar

necitită,
19 sept. 2001, 06:44:0619.09.2001

Hi,

Why does an EJB client application running in Webstart need to be explicitly provided
with the EJB stubs, while the same application run on the command-line is able
to download the stubs from the server automatically?

To elaborate, I have a Java application running in Webstart 1.0.1, doing a JNDI
lookup of an EJB on a WLS5.1 SP9 server on NT. Unless I jar up the EJB stub classes
(SomeBeanHomeImpl_ServiceStub etc.) and define them in the Webstart application,
I get the exception given at the end of this mail.

Now, what I don't understand is, when I run the same application directly on the
command line (i.e., not in Webstart), it works just fine; it is somehow able to
download the stubs from the server. Why does it behave differently in Webstart,
and is there any way around it, so that I don't have to deploy the stubs along
with my client application?

Thanks,
Ravi

The exception is given below:

javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundException:
class SomeBeanHomeImpl_ServiceStub previously not found
at weblogic.rjvm.MsgAbbrev.read(MsgAbbrev.java:181)
at weblogic.socket.JVMAbbrevSocket.readMsgAbbrevs(JVMAbbrevSocket.java:505)
at weblogic.rjvm.MsgAbbrevInputStream.prime(MsgAbbrevInputStream.java:134)
at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:610)
at weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.java:34)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
at weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java:342)
at weblogic.socket.SSLFilter.dispatch(SSLFilter.java:226)
at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:247)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

--------------- nested within: ------------------
weblogic.rmi.UnmarshalException: Unmarshalling return
- with nested exception:
[java.lang.ClassNotFoundException: class SomeBeanHomeImpl_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(Unknown Source)
at Client.lookupHome(Client.java:118)
at Client.<init>(Client.java:29)
at Client.main(Client.java:67)
at java.lang.reflect.Method.invoke(Native Method)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.continueLaunch(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Ravi Shankar

necitită,
19 sept. 2001, 08:20:3819.09.2001

Nick Minutello

necitită,
20 sept. 2001, 19:57:4220.09.2001
It is an issue with Webstart - something regarding the classloader.

I *think* you need some code that does something like this:
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());

"Ravi Shankar" <ravi.s...@citicorp.com> wrote in message
news:3ba868e6$1...@newsgroups.bea.com...

0 mesaje noi