This content has been marked as final.
Show 3 replies
-
1. Re: how to enable RMI class loading
avogt_sundn Apr 10, 2008 6:11 AM (in response to avogt_sundn)Ok, i enabled trace logging (described here: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=126382 ).
I'm using a standalone client application. The log says:12:03:06,794 DEBUG [SocketWrapper] ServerSocketWrapper[Socket[addr=/127.0.0.1,port=1222,localport=4873].12a5dd1] closing 12:03:11,422 TRACE [JavaSerializationManager] Creating ObjectOutputStream 12:03:11,438 TRACE [JavaSerializationManager] Creating ObjectInputStreamWithClassLoader 12:03:11,453 DEBUG [ClientSocketWrapper] reset timeout: 320000 12:03:11,485 TRACE [JavaSerializationManager] Creating ObjectOutputStream 12:03:11,485 TRACE [JavaSerializationManager] Creating ObjectInputStreamWithClassLoader 12:03:11,500 DEBUG [ClientSocketWrapper] reset timeout: 320000 12:03:11,500 DEBUG [MarshallerLoaderHandler] MarshallerLoaderHandler received invocation with param of load_class and data type of null 12:03:14,221 TRACE [ClassUtil] trying to load class: palmyra.baustein.bestandsdaten.partner.PartnerSelektierenVBean from path: pal myra/baustein/bestandsdaten/partner/PartnerSelektierenVBean.class 12:03:14,221 TRACE [ClassByteClassLoader] getResourceAsStream =>palmyra.baustein.bestandsdaten.partner.PartnerSelektierenVBean = n ull 12:03:14,346 DEBUG [MarshallerLoaderHandler] MarshallerLoaderHandler received invocation with param of load_class and data type of null 12:03:14,940 TRACE [ClassUtil] trying to load class: palmyra.baustein.bestandsdaten.partner.PartnerSelektierenVBean from path: pal myra/baustein/bestandsdaten/partner/PartnerSelektierenVBean.class 12:03:14,940 TRACE [ClassByteClassLoader] getResourceAsStream =>palmyra.baustein.bestandsdaten.partner.PartnerSelektierenVBean = n ull 12:03:14,971 DEBUG [ServerThread] WorkerThread#0[127.0.0.1:1227] closing socketWrapper: ServerSocketWrapper[Socket[addr=/127.0.0.1 ,port=1227,localport=3873].1be032b] 12:03:14,971 DEBUG [ServerSocketWrapper] wrote CLOSING 12:03:14,971 DEBUG [ServerThread] WorkerThread#1[127.0.0.1:1228] closing socketWrapper: ServerSocketWrapper[Socket[addr=/127.0.0.1 ,port=1228,localport=4873].1c1fcf1] 12:03:14,987 DEBUG [SocketWrapper] ServerSocketWrapper[Socket[addr=/127.0.0.1,port=1227,localport=3873].1be032b] closing 12:03:14,987 DEBUG [ServerSocketWrapper] wrote CLOSING 12:03:15,018 DEBUG [SocketWrapper] ServerSocketWrapper[Socket[addr=/127.0.0.1,port=1228,localport=4873].1c1fcf1] closing 12:03:19,958 TRACE [MicroRemoteClientInvoker] org.jboss.remoting.transport.http.HTTPClientInvoker@13e6be6 disconnecting ... 12:03:19,958 TRACE [MicroRemoteClientInvoker] org.jboss.remoting.transport.http.HTTPClientInvoker@13e6be6 is not connected!
What it says is: the ClassByteClassLoader (in the jboss) cannot find the class. In the debugger I found in lineorg.jboss.remoting.loading.ClassUtil.getClassBytes:190
the ClassByteClassLoader is virtually empty with only a reference to its parent class loader being someorg.jboss.mx.loading.UnifiedClassLoader3@182c132{ url=null ,addedOrder=2}
I have deployed the ejb3 in question in an ear file with this jboss-app.xml:<!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd"> <jboss-app> <loader-repository> palmyra-bsp-bestandsdaten-1.0:loader=bsp-bestandsdaten-1.0.EAR <loader-repository-config> java2ParentDelegation=true </loader-repository-config> </loader-repository> </jboss-app>
and I want to stay with separate loader repositories per ear file.
Is that the problem?
What I didn't understand is: which classes are server for remote class loading from the jboss? Do I have to make my ear file known to the server invoker? -
2. Re: how to enable RMI class loading
avogt_sundn Apr 10, 2008 6:19 AM (in response to avogt_sundn)Ok, that is the problem:
once i emptied the jboss-app.xml, the example works.
Please, somebody tell me, that it is somehow possible to have isolated loader repositories per ear and still allow for remote class loading... -
3. Re: how to enable RMI class loading
jzawlocki Dec 7, 2008 7:09 AM (in response to avogt_sundn)You should copy your business interfaces to the global class loader on top of your ear class loader. Let's say that you have
@Remote
MyInterfate{}
@Stateless
MyBean implements MyInterface{
}
So you should place MyBean in your ear, but MyInterface should be located outside ear, directly in your deploy directory.