Hi
I am working on modular desktop application. This application is start on my "plug-in platform". I need that on of plug-in provide to other plugins GlassFish 3 client jar lib. You can look at plug-ins in my platform as wars in web application container. Each plugin is a jar file with classes and "lib" package inside. The "lib" package contains lib jars that this plug-in use for their own needs and provide this lib to other plug-in if this is need.
Platform for each loaded plug-in creates one class loader "PluginClassLoader". This class loader has on his classpath all classes from plugin jar file and all classes from jars in plug-in "lib" package.
Main thread in my application as contextClassLoader has "MasterClassLoader" that can load class from all plug-ins class loaders.
And now. One of my plugin try to provide GlassFish 3 client libraries. This plugin has classes which are factories for Context class. Other plugin can get this factories and create server application context. But when factory create Context I have an waring (or exception) on my console:
2010-03-11 22:09:16 com.sun.enterprise.module.single.ManifestProxy <init>
SEVERE: null
java.lang.NoSuchMethodException: PluginClassLoader.findResources(java.lang.String)
at java.lang.Class.getMethod(Class.java:1605)
at com.sun.enterprise.module.single.ManifestProxy.<init>(ManifestProxy.java:34)
at com.sun.enterprise.module.single.ProxyModuleDefinition.<init>(ProxyModuleDefinition.java:78)
at com.sun.enterprise.module.single.ProxyModuleDefinition.<init>(ProxyModuleDefinition.java:73)
at com.sun.enterprise.module.single.SingleModulesRegistry.<init>(SingleModulesRegistry.java:42)
at com.sun.enterprise.module.single.SingleModulesRegistry.<init>(SingleModulesRegistry.java:30)
at com.sun.enterprise.module.single.StaticModulesRegistry.<init>(StaticModulesRegistry.java:60)
at org.glassfish.internal.api.Globals.getStaticHabitat(Globals.java:67)
at com.sun.enterprise.naming.impl.SerialContext.<init>(SerialContext.java:183)
at com.sun.enterprise.naming.impl.SerialContext.<init>(SerialContext.java:253)
at com.sun.enterprise.naming.impl.SerialInitContextFactory.createInitialContext(SerialInitContextFactory.java:121)
at com.sun.enterprise.naming.impl.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:116)
at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:65)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at pl.com.stream.plugin.database.impl.database.Glassfish3ServerType.getContext(Glassfish3ServerType.java:37)
at pl.com.stream.plugin.database.impl.connectiondef.impl.DefaultDataBaseContext.getApplicationServerContext(DefaultDataBaseContext.java:59)
at pl.com.stream.plugin.database.impl.connectiondef.impl.DataBaseRemoteContext$1.createContext(DataBaseRemoteContext.java:41)
at pl.com.stream.lib.asen.client.service.RemoteContextImpl.initNewContext(RemoteContextImpl.java:247)
at pl.com.stream.lib.asen.client.service.RemoteContextImpl.cleanFacadeOnLoginRequest(RemoteContextImpl.java:218)
at pl.com.stream.plugin.database.impl.connectiondef.impl.DataBaseRemoteContext.sendRequest(DataBaseRemoteContext.java:70)
at pl.com.stream.lib.asen.common.service.BaseProxyService.sendRequest(BaseProxyService.java:164)
at pl.com.stream.lib.asen.common.service.BaseProxyService.sendRequest(BaseProxyService.java:148)
at pl.com.stream.lib.asen.common.service.BusinessServiceProxy.invoke(BusinessServiceProxy.java:29)
at $Proxy10.loginUser(Unknown Source)
at pl.com.stream.plugin.database.impl.login.UserLoginJob.run(UserLoginJob.java:57)
at pl.com.stream.plugin.workbench.impl.jobsystem.BaseJob.execute(BaseJob.java:303)
at pl.com.stream.plugin.workbench.impl.jobsystem.Worker.executeJob(Worker.java:33)
at pl.com.stream.plugin.workbench.impl.jobsystem.Worker.run(Worker.java:56)
at pl.com.stream.plugin.workbench.impl.jobsystem.WorkerThread.run(WorkerThread.java:18)
PluginClassLoader has this method but it is on "provided" scope. But this is not a problem because after this console message my application is still work. I can lookup bean from GlassFish and I can execure bean method who returned a simple types. Problem is when I need to execute bean who return me a entity or other diffrent class. (I has this class on my MasterClassLoader). When I execute method from that bean I get exception:
2010-03-11 22:10:15 com.sun.corba.ee.impl.encoding.CDRInputStream_1_0 read_value
WARNING: "IOP00810257: (MARSHAL) Could not load class com.sun.corba.ee.impl.javax.rmi.CORBA.EnumDesc"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:10144)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:10159)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1163)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:655)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2298)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2552)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1310)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:449)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:364)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:320)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:1066)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1175)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:986)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:978)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:968)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_abstract_interface(CDRInputObject.java:691)
at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:402)
at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:577)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:345)
at java.util.HashMap.readObject(HashMap.java:1030)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1965)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1300)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:449)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:364)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:320)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:1066)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1175)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:655)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2298)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2552)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1310)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:449)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:364)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:320)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:1066)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1175)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:986)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:646)
at com.sun.corba.ee.impl.corba.TCUtility.unmarshalIn(TCUtility.java:286)
at com.sun.corba.ee.impl.corba.AnyImpl.read_value(AnyImpl.java:611)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_any(CDRInputStream_1_0.java:829)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_any(CDRInputObject.java:583)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.readAny(Util.java:461)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2230)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2552)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1310)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:449)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:364)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:320)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:1066)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1175)
at com.sun.corba.ee.impl.encoding.CDRInputObject.read_value(CDRInputObject.java:655)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:383)
at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readResult(DynamicMethodMarshallerImpl.java:484)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:190)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:147)
at com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:225)
at pl.com.stream.lib.asen.common.facade.__ServerFacade_Remote_DynamicStub.executeService(pl/com/stream/lib/asen/common/facade/__ServerFacade_Remote_DynamicStub.java)
at pl.com.stream.lib.asen.common.facade._ServerFacade_Wrapper.executeService(pl/com/stream/lib/asen/common/facade/_ServerFacade_Wrapper.java)
at pl.com.stream.lib.asen.client.service.RemoteContextImpl.sendRequest(RemoteContextImpl.java:228)
at pl.com.stream.plugin.database.impl.connectiondef.impl.DataBaseRemoteContext.sendRequest(DataBaseRemoteContext.java:71)
at pl.com.stream.lib.asen.common.service.BaseProxyService.sendRequest(BaseProxyService.java:164)
at pl.com.stream.lib.asen.common.service.BaseProxyService.sendRequest(BaseProxyService.java:148)
at pl.com.stream.lib.asen.common.service.BusinessServiceProxy.invoke(BusinessServiceProxy.java:29)
at $Proxy48.getDef(Unknown Source)
at pl.com.stream.plugin.vedas.pub.lib.dataset.AbstractClientDataSet.fetchDataSetDef(AbstractClientDataSet.java:790)
at pl.com.stream.plugin.vedas.pub.lib.dataset.AbstractClientDataSet.<init>(AbstractClientDataSet.java:180)
at pl.com.stream.ewan.operatorgroup.impl.dataset.OperatorGroupClientDataSet.<init>(OperatorGroupClientDataSet.java:13)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at pl.com.stream.plugin.vedas.impl.datamodul.context.ContextManagerImpl.createClientDataSet(ContextManagerImpl.java:211)
at pl.com.stream.plugin.vedas.impl.datamodul.context.ContextManagerImpl.createContext(ContextManagerImpl.java:146)
at pl.com.stream.plugin.vedas.impl.datamodul.context.ContextManagerImpl.createObjectContent(ContextManagerImpl.java:93)
at pl.com.stream.lib.commons.base.AbstractLifeCycleObject.createContent(AbstractLifeCycleObject.java:35)
at pl.com.stream.plugin.vedas.impl.datamodul.CommunicationDataModuleImpl.initContextManager(CommunicationDataModuleImpl.java:244)
at pl.com.stream.plugin.vedas.impl.datamodul.CommunicationDataModuleImpl.access$000(CommunicationDataModuleImpl.java:73)
Class "com.sun.corba.ee.impl.javax.rmi.CORBA.EnumDesc" is on classpath of main thread class loader (MasterClassLoader) but thisclass loader is not be used to search for this class. WHY ? Witch class loader is execute to load this class ?
[Message sent by forum member 'maciejmadajczyk' (maciej.madajczyk_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=391374