Skip to main content

ClassLoader Problem ? (B37)

8 replies [Last post]
isana
Offline
Joined: 2005-11-10

Hello,

When I deployed my EAR application which successfully worked with B36 into B37, I'm getting exceptions. Clean rebuilding the EAR does not solve it.

One of the exceptions is reported in server.log after deployed the EAR. Deployment itself is reported to be successful.
---- Stacktrace (Long)
_ThreadName=p: thread-pool-1; w: 7;_RequestID=e85bb6c5-f6d3-41fd-be59-db27b1226fa7;|LDR5207: EJBClassLoader EJBClassLoader :
doneCalled = true
doneSnapshot = EJBClassLoader.done() called ON EJBClassLoader :
urlSet = [URLEntry : file:/C:/Java/GlassFish/9.0b37/domains/domain1/applications/j2ee-apps/KntvCdmsApp/ClientApplication_jar/, URLEntry : file:/C:/Java/GlassFish/9.0b37/domains/domain1/applications/j2ee-apps/KntvCdmsApp/EjbModule_jar/, URLEntry : file:/C:/Java/GlassFish/9.0b37/domains/domain1/generated/ejb/j2ee-apps/KntvCdmsApp/]
doneCalled = false
Parent -> EJBClassLoader :
urlSet = [URLEntry : file:/C:/Java/GlassFish/9.0b37/domains/domain1/lib/classes/]
doneCalled = false
Parent -> ASChain parentCL :: Shared ClassLoader Chain parentCL :: sun.misc.Launcher$AppClassLoader@11b86e7 URLs ::
, file:/C:/Java/GlassFish/9.0b37/domains/domain1/config/, file:/C:/Java/GlassFish/9.0b37/lib/javaee.jar, file:/C:/Java/jdk/1.5.0_06_32bit/jre/../lib/tools.jar, file:/C:/Java/GlassFish/9.0b37/lib/install/applications/jmsra/imqjmsra.jar, file:/C:/Java/GlassFish/9.0b37/lib/commons-launcher.jar, file:/C:/Java/GlassFish/9.0b37/imq/lib/jaxm-api.jar, file:/C:/Java/GlassFish/9.0b37/imq/lib/fscontext.jar, file:/C:/Java/GlassFish/9.0b37/imq/lib/imqbroker.jar, file:/C:/Java/GlassFish/9.0b37/imq/lib/imqjmx.jar, file:/C:/Java/GlassFish/9.0b37/imq/lib/imqxm.jar, file:/C:/Java/GlassFish/9.0b37/lib/ant/lib/ant.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-ws.jar, file:/C:/Java/GlassFish/9.0b37/lib/mail.jar, file:/C:/Java/GlassFish/9.0b37/lib/jsf-api.jar, file:/C:/Java/GlassFish/9.0b37/lib/jsf-impl.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-jstl.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-env.jar, file:/C:/Java/GlassFish/9.0b37/lib/jmxremote_optional.jar, file:/C:/Java/GlassFish/9.0b37/lib/SUNWjdmk/5.1/lib/jdmkrt.jar, file:/C:/Java/GlassFish/9.0b37/lib/commons-logging.jar, file:/C:/Java/GlassFish/9.0b37/lib/activation.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-rt.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-admin.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-cmp.jar, file:/C:/Java/GlassFish/9.0b37/domains/domain1/config/, file:/C:/Java/GlassFish/9.0b37/domains/domain1/config/, file:/C:/Java/GlassFish/9.0b37/lib/admin-cli.jar, file:/C:/Java/GlassFish/9.0b37/lib/antlr.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-deployment-client.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-ext.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-jwsacc-signed.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-jwsacc.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-launch.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-tags.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-upgrade.jar, file:/C:/Java/GlassFish/9.0b37/lib/dbschema.jar, file:/C:/Java/GlassFish/9.0b37/lib/j2ee-svc.jar, file:/C:/Java/GlassFish/9.0b37/lib/jhall.jar, file:/C:/Java/GlassFish/9.0b37/lib/sun-appserv-ant.jar, file:/C:/Java/GlassFish/9.0b37/lib/toplink-essentials-agent.jar, file:/C:/Java/GlassFish/9.0b37/lib/toplink-essentials.jar
constituent CLs ::
:: asimpl :: optionalChain

AT Thu Feb 16 09:14:52 JST 2006
BY :java.lang.Throwable: printStackTraceToString
at com.sun.enterprise.util.Print.printStackTraceToString(Print.java:621)
at com.sun.enterprise.loader.EJBClassLoader.done(EJBClassLoader.java:153)
at com.sun.enterprise.deployment.backend.DeploymentRequest.done(DeploymentRequest.java:1294)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:880)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:257)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:275)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:534)
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:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:342)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:325)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:407)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:413)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:394)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:253)
at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:358)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Parent -> EJBClassLoader :
urlSet = [URLEntry : file:/C:/Java/GlassFish/9.0b37/domains/domain1/lib/classes/]
doneCalled = false
Parent -> ASChain parentCL :: Shared ClassLoader Chain parentCL :: sun.misc.Launcher$AppClassLoader@11b86e7 URLs ::
, file:/C:/Java/GlassFish/9.0b37/domains/domain1/config/, file:/C:/Java/GlassFish/9.0b37/lib/javaee.jar, file:/C:/Java/jdk/1.5.0_06_32bit/jre/../lib/tools.jar, file:/C:/Java/GlassFish/9.0b37/lib/install/applications/jmsra/imqjmsra.jar, file:/C:/Java/GlassFish/9.0b37/lib/commons-launcher.jar, file:/C:/Java/GlassFish/9.0b37/imq/lib/jaxm-api.jar, file:/C:/Java/GlassFish/9.0b37/imq/lib/fscontext.jar, file:/C:/Java/GlassFish/9.0b37/imq/lib/imqbroker.jar, file:/C:/Java/GlassFish/9.0b37/imq/lib/imqjmx.jar, file:/C:/Java/GlassFish/9.0b37/imq/lib/imqxm.jar, file:/C:/Java/GlassFish/9.0b37/lib/ant/lib/ant.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-ws.jar, file:/C:/Java/GlassFish/9.0b37/lib/mail.jar, file:/C:/Java/GlassFish/9.0b37/lib/jsf-api.jar, file:/C:/Java/GlassFish/9.0b37/lib/jsf-impl.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-jstl.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-env.jar, file:/C:/Java/GlassFish/9.0b37/lib/jmxremote_optional.jar, file:/C:/Java/GlassFish/9.0b37/lib/SUNWjdmk/5.1/lib/jdmkrt.jar, file:/C:/Java/GlassFish/9.0b37/lib/commons-logging.jar, file:/C:/Java/GlassFish/9.0b37/lib/activation.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-rt.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-admin.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-cmp.jar, file:/C:/Java/GlassFish/9.0b37/domains/domain1/config/, file:/C:/Java/GlassFish/9.0b37/domains/domain1/config/, file:/C:/Java/GlassFish/9.0b37/lib/admin-cli.jar, file:/C:/Java/GlassFish/9.0b37/lib/antlr.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-deployment-client.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-ext.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-jwsacc-signed.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-jwsacc.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-launch.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-tags.jar, file:/C:/Java/GlassFish/9.0b37/lib/appserv-upgrade.jar, file:/C:/Java/GlassFish/9.0b37/lib/dbschema.jar, file:/C:/Java/GlassFish/9.0b37/lib/j2ee-svc.jar, file:/C:/Java/GlassFish/9.0b37/lib/jhall.jar, file:/C:/Java/GlassFish/9.0b37/lib/sun-appserv-ant.jar, file:/C:/Java/GlassFish/9.0b37/lib/toplink-essentials-agent.jar, file:/C:/Java/GlassFish/9.0b37/lib/toplink-essentials.jar
constituent CLs ::
:: asimpl :: optionalChain

was requested to find class com.sun.enterprise.ee.cms.core.GMSFactory after done was invoked from the following stack trace
java.lang.Throwable
at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:602)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.corba.ee.impl.orbutil.ORBClassLoader.loadClass(Unknown Source)
at com.sun.enterprise.iiop.ASORBUtilities.loadClass(ASORBUtilities.java:186)
at com.sun.enterprise.iiop.ASORBUtilities.isGMSAvailableAndClusterHeartbeatEnabled(ASORBUtilities.java:172)
at com.sun.enterprise.iiop.TxSecIORInterceptor.addCSIv2Components(TxSecIORInterceptor.java:157)
at com.sun.enterprise.iiop.TxSecIORInterceptor.establish_components(TxSecIORInterceptor.java:110)
at com.sun.corba.ee.impl.interceptors.InterceptorInvoker.objectAdapterCreated(Unknown Source)
at com.sun.corba.ee.impl.interceptors.PIHandlerImpl.objectAdapterCreated(Unknown Source)
at com.sun.corba.ee.spi.oa.ObjectAdapterBase.initializeTemplate(Unknown Source)
at com.sun.corba.ee.impl.oa.poa.POAImpl.initialize(Unknown Source)
at com.sun.corba.ee.impl.oa.poa.POAImpl.create_POA(Unknown Source)
at com.sun.corba.ee.impl.oa.rfm.ReferenceFactoryManagerImpl$AdapterActivatorImpl.unknown_adapter(Unknown Source)
at com.sun.corba.ee.impl.oa.poa.POAImpl.find_POA(Unknown Source)
at com.sun.corba.ee.impl.oa.rfm.ReferenceFactoryManagerImpl.createReference(Unknown Source)
at com.sun.corba.ee.impl.oa.rfm.ReferenceFactoryImpl.createReference(Unknown Source)
at com.sun.enterprise.iiop.POARemoteReferenceFactory._createRef(POARemoteReferenceFactory.java:373)
at com.sun.enterprise.iiop.POARemoteReferenceFactory.createRef(POARemoteReferenceFactory.java:344)
at com.sun.enterprise.iiop.POARemoteReferenceFactory.createRemoteReference(POARemoteReferenceFactory.java:328)
at com.sun.ejb.containers.StatefulSessionContainer.createRemoteBusinessObjectImpl(StatefulSessionContainer.java:1421)
at com.sun.ejb.containers.StatefulSessionContainer.createRemoteBusinessObjectImpl(StatefulSessionContainer.java:655)
at com.sun.ejb.containers.EJBHomeImpl.createRemoteBusinessObjectImpl(EJBHomeImpl.java:112)
at com.sun.ejb.containers.EJBHomeInvocationHandler.invoke(EJBHomeInvocationHandler.java:175)
at $Proxy65.create(Unknown Source)
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:585)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(Unknown Source)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(Unknown Source)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(Unknown Source)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(Unknown Source)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(Unknown Source)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(Unknown Source)
----

And another exception is thrown by Java Web Start client application. With B37, the client application cannot get files (like images and ResourceBundle files) from its JAR. With B36, there was no problem.
---- StackTrace
Caused by: java.util.MissingResourceException: Can't find bundle for base name my.application.ResLookAndFeelUtility, locale ja_JP
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at my.application.LookAndFeelUtility.(LookAndFeelUtility.java:93)
----

I suspect that there are some chages in ClassLoader between B36 and B37 and they cause this problem...

Any help is appreciated.

Thank you.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
isana
Offline
Joined: 2005-11-10

Hello,

> For now, I have backed out of the changes. Would you
> please try again in tomorrow's nightly build and see
> if this fixes your problem?

I'm sorry for late response.
I could not test nightly builds for my personal reason (meaning not a GlassFish reason). And I could not deploy my application to B38 for another reason (Toplink exceptions).

So, even now, I cannot see if the problem has been fixed. Sorry.

Thank you.
- Ryosuke.

qouyang
Offline
Joined: 2005-02-01

Hi,

I am fairly confident that the autodeployment issue is addressed in build 38, because I was able to run another autodeploy test that reproduced a very similar stack trace your application did.

Please do let me know if you run into additional issues once to TOPLink exception is addressed.

Thanks much,
Q^2

isana
Offline
Joined: 2005-11-10

Hello,

I managed to deploy my app in B38.

Now, there's no stacktrace in server.log after deployment. And I believe that the client side problem is also resolved.

Yes, I believe, but I'm not sure, because of a new problem. I will report the result after the new problem is resolved...

- Thank you.
Ryosuke.

qouyang
Offline
Joined: 2005-02-01

I take back my previous diagnosis. I think one of the changes to _not_ release classloader has something to do with this, though I am still not sure why that would be the case.

For now, I have backed out of the changes. Would you please try again in tomorrow's nightly build and see if this fixes your problem?

Thanks,
Q^2

isana
Offline
Joined: 2005-11-10

Hello, Q^2.
Thank you for your reply.

> the way that the appclient jar is generated is changed

Oh, I suspected something like it, because files cannot be read all comes from EJB.jar in the EAR and not from Client.jar(EJB.jar and Client.jar are packaged in the same EAR). I mean :
1) A property file which is in the Client.jar is successfully read by MyApplication.class.getResourceAsStream("clientApplicationInit.properties").
2) Files (such as images and ResourceBundle property files) cannot be read, and they are in EJB.jar because they are in a common library used in both EJB codes and client codes.
I'm sorry that I didn't provide these information.

I did not investigate carefully enough. So I'm not sure that (1) and (2) always apply.

Thanks,
-Ryosuke.

qouyang
Offline
Joined: 2005-02-01

Hi,

We did not change any classloader in build 37. However, the way that the appclient jar is generated is changed. I am wondering if this is because the generated appclient is missing information?

The way to verify is the following:

1. Using b36, try to deploy using the --retrieve option. That way you will get a copy of the appclient jar.

2. Using b37, after deploying the application, run the appclient with the appclient.jar you retrieved from b36. Does it work? How about using the one retrieved from b37? If the b36 works and b37 doesn't, we have a bug in the appclient jar generation.

Would you please let me know? Or if you don't mind sharing your application, I could take a look at it for you.

Thanks,
Q^2

tjquinn
Offline
Joined: 2005-03-30

Hi.

The EJBClassLoader itself has not changed from b36 to b37 but some code that uses one may well have changed. We'll need to hunt that down.

Does this issue actually prevent things from working for you?

The stack trace implies that the autodeployer is at work here. Are you in fact using the auto-deployment feature to deploy the app? Does the deployment work correctly - without such messages - if you deploy your app using asadmin deploy?

Thanks.

- Tim

isana
Offline
Joined: 2005-11-10

Hello, Tim.
Thank you for your suggestion.

> Are you in fact using the auto-deployment feature to deploy the app?

Yes, I'm using auto-deployment feature.

> if you deploy your app using asadmin deploy?

I tried to deploy the same EAR with WEB console of GlassFish. The result was:
1) The server side stacktrace (the first one in my previous post) does not appear.
2) The client side stacktrace (the second one in my previous post) still appears.
I did not try asadmin, but I guess the result may be the same as WEB console.

> Does this issue actually prevent things from working for you?

Yes, because my client application fails at the very beginning of initialization with the (2) stacktrace. So, I'm using B36 now.

Thanks.
- Ryosuke.