Erik,

If you want to change classes without restarting the server than you must
write your own application ClassLoader. What your experiencing is Java name
space isolation. The Java name space is defined by the jar, class, and
ClassLoader loading the class, which means that a change to anyone of the
three constitutes a different name space. Since your jars and classess do
not change, then Orion uses a different ClassLoader for your application and
the rmi server. This is surely the case if Orion uses ClassLoader's default
constructor for serving ejbs, compiled classes, and rmi requests. See
Server-Based Java Programming by Ted Neward for help with what you want to
do.

Dave

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 24, 2001 1:44 PM
To: Orion-Interest
Subject: problems with classloading and Clients, NoSuchMethodError


Hi,
My problem is as follows.
I have debloyed every EJB in a jar and deployed it properly in
application.xml. I have for a number of reasons decided to have every EJB in
one ejb-jar. All that works fine. I have an ant script that builds every
ejb-jar and an jar called app.jar, this jar contains all classes not
included in the ejb-jar files.
The app.jar is deployed using <library path="./app-lib/app.jar" /> in the
orion-application.xml.

I'm running an orionserver starting it with
com.evermind.server.ApplicationServer in a shell script and adds all the
3party jar files (such as log4j.jar etc etc.)

When I start the server it find all the classes and every thing works very
fine. If I remove the the <library path="./app-lib/app.jar" /> the ejbs do
net get deployed because they lack a number of files (which is in the
app.jar) this makes me belive that the deployment of the app.jar works.

I then access the server using a client with RMIInitialContextFactory. I
then get a NoSuchMethodError on the client
java.lang.NoSuchMethodError     at
com.evermind.server.rmi.ba.invokeMethod(JAX)    at
com.evermind.server.rmi.a1.invoke(JAX)  at __Proxy1.genericFinderVH(Unknown
Source)         at
no.lindorff.kb2.core.client.ApplicantProxyManager.genericFinderVH(ApplicantP
roxyManager.java:147)   at
no.lindorff.kb2.core.client.ApplicantProxyManager.main(ApplicantProxyManager
.java:206)


If I start the server when the classpath points to all compiled classes it
works fine.

The classes in the ejb jars and in the compiled classes are the same. 


If I put on java -verbose it looks like this error is thrown on the server
but it does give me any further output. The class loading looks different
and continues when I start with a classpath containing all classes

If I use reflection and print out all methods on the remote interface the
method is there.



I do all this because I want to change classes without restarting the server

all logs application.log rmi.log etc. tells me nothing. Is there no way to
get more verbose output from the server?

Has anyone any idea what I'm doing wrong and any points of what to do and/or
test

Regards
Erik Romson

Reply via email to