Issue Details (XML | Word | Printable)

Key: GLASSFISH-19757
Type: Bug Bug
Status: Closed Closed
Resolution: Invalid
Priority: Major Major
Assignee: Mahesh Kannan
Reporter: Mahesh Kannan
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
glassfish

Attempt to load artifact after ClassLoader.done was called?

Created: 01/Mar/13 03:52 AM   Updated: 07/Mar/13 06:20 AM   Resolved: 07/Mar/13 06:20 AM
Component/s: batch
Affects Version/s: None
Fix Version/s: 4.0_b79

Time Tracking:
Not Specified

Tags:
Participants: Mahesh Kannan


 Description  « Hide

Looks like some wrong classloader is cached within the Batch runtime:

I am going to investigate this more before filing a bug on RI

[#|2013-02-28T19:48:34.312-0800|WARNING|glassfish 4.0|javax.enterprise.system.util|_ThreadID=124;_ThreadName=pool-27-thread-1;_TimeMillis=1362109714312;_LevelValue=900;|ASURLClassLoader EarClassLoader :
doneCalled = true
doneSnapshot = ASURLClassLoader.done() called ON EarClassLoader :
urlSet = [URLEntry : file:/space/work/glassfish/workspace/trunk/glassfish4/glassfish/domains/domain1/applications/devtest-intro-simple-batchletApp/devtest-intro-simple-batchlet-ejb_jar/, URLEntry : file:/space/work/glassfish/workspace/trunk/glassfish4/glassfish/domains/domain1/generated/ejb/devtest-intro-simple-batchletApp/devtest-intro-simple-batchlet-ejb_jar]
doneCalled = false
Parent -> org.glassfish.internal.api.DelegatingClassLoader@579169f6

AT Thu Feb 28 19:46:12 PST 2013
BY :[java.lang.Thread.getStackTrace(Thread.java:1567), com.sun.enterprise.loader.ASURLClassLoader.done(ASURLClassLoader.java:204), com.sun.enterprise.loader.ASURLClassLoader.preDestroy(ASURLClassLoader.java:172), org.glassfish.javaee.full.deployment.EarClassLoader.preDestroy(EarClassLoader.java:100), org.jvnet.hk2.internal.ServiceLocatorImpl.preDestroy(ServiceLocatorImpl.java:833), org.jvnet.hk2.internal.ServiceLocatorImpl.preDestroy(ServiceLocatorImpl.java:817), org.glassfish.internal.data.ApplicationInfo.clean(ApplicationInfo.java:451), com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:1068), com.sun.enterprise.v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:1096), org.glassfish.deployment.admin.UndeployCommand.execute(UndeployCommand.java:400), com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:528), com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:524), java.security.AccessController.doPrivileged(Native Method), javax.security.auth.Subject.doAs(Subject.java:356), com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:523), com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:547), com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1424), com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108), com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1759), com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1675), org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:387), org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:231), sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method), sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57), sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.lang.reflect.Method.invoke(Method.java:601), org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81), org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125), org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152), org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:93), org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:350), org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:345), org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102), org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:207), org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317), org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:183), org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:852), org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:321), org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:161), org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181), com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246), org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:164), org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:175), org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119), org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:273), org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200), org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:134), org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112), org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77), org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:820), org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113), org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115), org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55), org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135), org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564), org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544), java.lang.Thread.run(Thread.java:722)] Parent -> org.glassfish.internal.api.DelegatingClassLoader@579169f6
was requested to find resource META-INF/batch.xml after done was invoked from the following stack trace
java.lang.Throwable
at com.sun.enterprise.loader.ASURLClassLoader.findResource(ASURLClassLoader.java:503)
at java.lang.ClassLoader.getResource(ClassLoader.java:1138)
at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:227)
at com.sun.enterprise.loader.ASURLClassLoader.getResourceAsStream(ASURLClassLoader.java:866)
at com.ibm.batch.container.services.impl.DelegatingBatchArtifactFactoryImpl.getBatchXMLStreamFromClassLoader(DelegatingBatchArtifactFactoryImpl.java:113)
at com.ibm.batch.container.services.impl.DelegatingBatchArtifactFactoryImpl.initArtifactMapFromClassLoader(DelegatingBatchArtifactFactoryImpl.java:106)
at com.ibm.batch.container.services.impl.DelegatingBatchArtifactFactoryImpl.load(DelegatingBatchArtifactFactoryImpl.java:84)
at com.ibm.batch.container.artifact.proxy.ProxyFactory.loadArtifact(ProxyFactory.java:52)
at com.ibm.batch.container.artifact.proxy.ProxyFactory.createItemReaderProxy(ProxyFactory.java:95)
at com.ibm.batch.container.impl.ChunkStepControllerImpl.initializeChunkArtifacts(ChunkStepControllerImpl.java:707)
at com.ibm.batch.container.impl.ChunkStepControllerImpl.invokeCoreStep(ChunkStepControllerImpl.java:645)
at com.ibm.batch.container.impl.BaseStepControllerImpl.execute(BaseStepControllerImpl.java:156)
at com.ibm.batch.container.impl.JobControllerImpl.doExecutionLoop(JobControllerImpl.java:398)
at com.ibm.batch.container.impl.JobControllerImpl.executeJob(JobControllerImpl.java:184)
at com.ibm.batch.container.util.BatchWorkUnit.run(BatchWorkUnit.java:85)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

#]

[#|2013-02-28T19:48:34.331-0800|SEVERE|glassfish 4.0||_ThreadID=124;_ThreadName=Thread-4;_TimeMillis=1362109714331;_LevelValue=1000;|Exception in thread "pool-27-thread-1"|#]

[#|2013-02-28T19:48:34.332-0800|SEVERE|glassfish 4.0||_ThreadID=124;_ThreadName=Thread-4;_TimeMillis=1362109714332;_LevelValue=1000;|com.ibm.batch.container.exception.BatchContainerRuntimeException: This job failed unexpectedly.
at com.ibm.batch.container.util.BatchWorkUnit.run(BatchWorkUnit.java:99)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: com.ibm.batch.container.exception.BatchContainerRuntimeException: java.lang.RuntimeException: Wrappering earlier uncaught exception:
at com.ibm.batch.container.impl.JobControllerImpl.executeJob(JobControllerImpl.java:241)
at com.ibm.batch.container.util.BatchWorkUnit.run(BatchWorkUnit.java:85)
... 3 more
Caused by: java.lang.RuntimeException: Wrappering earlier uncaught exception:
at com.ibm.batch.container.impl.BaseStepControllerImpl.execute(BaseStepControllerImpl.java:197)
at com.ibm.batch.container.impl.JobControllerImpl.doExecutionLoop(JobControllerImpl.java:398)
at com.ibm.batch.container.impl.JobControllerImpl.executeJob(JobControllerImpl.java:184)
... 4 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to load batch.xml
at com.ibm.batch.container.artifact.proxy.ProxyFactory.loadArtifact(ProxyFactory.java:54)
at com.ibm.batch.container.artifact.proxy.ProxyFactory.createItemReaderProxy(ProxyFactory.java:95)
at com.ibm.batch.container.impl.ChunkStepControllerImpl.initializeChunkArtifacts(ChunkStepControllerImpl.java:707)
at com.ibm.batch.container.impl.ChunkStepControllerImpl.invokeCoreStep(ChunkStepControllerImpl.java:645)
at com.ibm.batch.container.impl.BaseStepControllerImpl.execute(BaseStepControllerImpl.java:156)
... 6 more
Caused by: java.lang.IllegalStateException: Unable to load batch.xml
at com.ibm.batch.container.services.impl.DelegatingBatchArtifactFactoryImpl.getBatchXMLStreamFromClassLoader(DelegatingBatchArtifactFactoryImpl.java:116)
at com.ibm.batch.container.services.impl.DelegatingBatchArtifactFactoryImpl.initArtifactMapFromClassLoader(DelegatingBatchArtifactFactoryImpl.java:106)
at com.ibm.batch.container.services.impl.DelegatingBatchArtifactFactoryImpl.load(DelegatingBatchArtifactFactoryImpl.java:84)
at com.ibm.batch.container.artifact.proxy.ProxyFactory.loadArtifact(ProxyFactory.java:52)
... 10 more|#]



Mahesh Kannan added a comment - 07/Mar/13 06:20 AM

The issue was that the devtest (that I used to file this bug) didn't wait till the jobstatus became either 'COMPLETED' or 'FAILED'. After submitting the job (and before the job was actually executed by the RI) the test exited causing the web-app class loader to unload the application artifacts