users@glassfish.java.net

Re: Strange error on glassfish console.

From: Tim Quinn <tim.quinn_at_oracle.com>
Date: Fri, 7 Jan 2011 11:04:15 -0600

Edmondo,

While it makes sense to follow Ludo's advice, here is another
possibility based on similar kinds of problems reported in the past.

It looks as if you have redeployed your application. But the class
loader which GlassFish created for your app for the earlier deployment
- and which GlassFish cleans up when the app is disabled or undeployed
- is still being used by your asynchronous work.

It is clearer to look at the (long) stack trace in two main parts.
The second part is the last few lines:

>> was requested to find class com.bloomberglp.blpapi.impl.c$b after
>> done was invoked from the following stack trace
>> java.lang.Throwable
>> at
>> com
>> .sun
>> .enterprise
>> .loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:706)
>> at
>> com
>> .sun
>> .enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:
>> 626)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>> at com.bloomberglp.blpapi.impl.c$a.<init>(TimeQueue.java:144)
>> at com.bloomberglp.blpapi.impl.c.a(TimeQueue.java:241)
>> at com.bloomberglp.blpapi.impl.bJ.e(TimerEventManager.java:369)
>> at com.bloomberglp.blpapi.impl.bJ.c(TimerEventManager.java:300)
>> at com.bloomberglp.blpapi.impl.bJ.a(TimerEventManager.java:23)
>> at com.bloomberglp.blpapi.impl.di.run(TimerEventManager.java:137)
>> at java.lang.Thread.run(Thread.java:619)

which shows what code triggered the use of the class loader AFTER
GlassFish had cleaned it up. The message leading up to that point
shows what code had "closed" the class loader. And if you look
through that, you'll see that the loader's done method was invoked
because the corresponding app was being unloaded, and that's because
it was being undeployed as part of a deployment.

Nomally Java EE apps that need to use timers use EJB timers, because
the Java EE spec does not really support the idea of application code
creating its own timers. It might be that the Bloomberg software you
are using does that and there is no way to provide your own EJB timer
for it to use. If so, then the Java EE compliant way to deal with
this would be to build a Java EE connector for the Bloomberg software
and then refer to the connector from your app.

- Tim

On Jan 7, 2011, at 10:17 AM, Ludovic Champenois wrote:

> On 1/7/11 3:30 AM, Edmondo Porcu wrote:
>> Dear all,
>> I am running an EAR app which receives asynchronous notification
>> from an information source. It all runs fine but this is what
>> happened:
>>
>>
>> ATTENTION: LDR5207: ASURLClassLoader EarLibClassLoader :
>> doneCalled = true
>> doneSnapshot = ASURLClassLoader.done() called ON EarLibClassLoader :
>> urlSet = [URLEntry : file:/C:/glassfish3/glassfish/domains/domain1/
>> eclipseApps/Gottware/lib/Curves.jar, URLEntry : file:/C:/glassfish3/
>> glassfish/domains/domain1/eclipseApps/Gottware/lib/Gottware-
>> datamodels.jar/, URLEntry : file:/C:/glassfish3/glassfish/domains/
>> domain1/eclipseApps/Gottware/lib/Gottware-realtime-consumer.jar/,
>> URLEntry : file:/C:/glassfish3/glassfish/domains/domain1/
>> eclipseApps/Gottware/lib/Gottware-realtime-producer.jar/,
>> URLEntry : file:/C:/glassfish3/glassfish/domains/domain1/
>> eclipseApps/Gottware/lib/Gottware-remote-interfaces.jar/,
>> URLEntry : file:/C:/glassfish3/glassfish/domains/domain1/
>> eclipseApps/Gottware/lib/Gottware-taglib.jar/, URLEntry : file:/C:/
>> glassfish3/glassfish/domains/domain1/eclipseApps/Gottware/lib/
>> Gottware-utils.jar/, URLEntry : file:/C:/glassfish3/glassfish/
>> domains/domain1/eclipseApps/Gottware/lib/GottwareMatlab.jar/,
>> URLEntry : file:/C:/glassfish3/glassfish/domains/domain1/
>> eclipseApps/Gottware/lib/GottwareXlsUtils.jar/, URLEntry : file:/C:/
>> glassfish3/glassfish/domains/domain1/eclipseApps/Gottware/lib/
>> javabuilder.jar, URLEntry : file:/C:/glassfish3/glassfish/domains/
>> domain1/eclipseApps/Gottware/lib/jxl.jar]
>> doneCalled = false
>> Parent -> org.glassfish.internal.api.DelegatingClassLoader_at_747fb9e1
>> AT Fri Jan 07 12:12:04 CET 2011
>> BY :java.lang.Throwable: printStackTraceToString
>> at
>> com.sun.enterprise.util.Print.printStackTraceToString(Print.java:634)
>> at
>> com
>> .sun.enterprise.loader.ASURLClassLoader.done(ASURLClassLoader.java:
>> 170)
>> at
>> com
>> .sun
>> .enterprise
>> .loader.ASURLClassLoader.preDestroy(ASURLClassLoader.java:153)
>> at
>> org
>> .glassfish
>> .javaee
>> .full.deployment.EarClassLoader.preDestroy(EarClassLoader.java:96)
>> at
>> org
>> .glassfish
>> .internal.data.ApplicationInfo.unload(ApplicationInfo.java:280)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:760)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:
>> 790)
>> at
>> org
>> .glassfish
>> .deployment.admin.UndeployCommand.execute(UndeployCommand.java:184)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $1.execute(CommandRunnerImpl.java:310)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl.access
>> $900(CommandRunnerImpl.java:83)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $ExecutionContext.execute(CommandRunnerImpl.java:1235)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $ExecutionContext.execute(CommandRunnerImpl.java:1224)
>> at
>> org
>> .glassfish
>> .deployment.admin.DeployCommand.handleRedeploy(DeployCommand.java:
>> 414)
>> at
>> org
>> .glassfish
>> .deployment.admin.DeployCommand.execute(DeployCommand.java:210)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $1.execute(CommandRunnerImpl.java:305)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl.access
>> $900(CommandRunnerImpl.java:83)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $ExecutionContext.execute(CommandRunnerImpl.java:1235)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $ExecutionContext.execute(CommandRunnerImpl.java:1224)
>> at
>> com
>> .sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:
>> 365)
>> at
>> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:
>> 204)
>> at
>> com
>> .sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:
>> 166)
>> at
>> com
>> .sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:
>> 100)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
>> at
>> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:
>> 791)
>> at
>> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
>> at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:
>> 954)
>> at
>> com
>> .sun
>> .grizzly
>> .http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
>> at
>> com
>> .sun
>> .grizzly
>> .DefaultProtocolChain
>> .executeProtocolFilter(DefaultProtocolChain.java:135)
>> at
>> com
>> .sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:
>> 102)
>> at
>> com
>> .sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:
>> 88)
>> at
>> com
>> .sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:
>> 76)
>> at
>> com
>> .sun
>> .grizzly
>> .ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
>> at
>> com
>> .sun
>> .grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:
>> 57)
>> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
>> at com.sun.grizzly.util.AbstractThreadPool
>> $Worker.doWork(AbstractThreadPool.java:330)
>> at com.sun.grizzly.util.AbstractThreadPool
>> $Worker.run(AbstractThreadPool.java:309)
>> at java.lang.Thread.run(Thread.java:619)
>> Parent -> org.glassfish.internal.api.DelegatingClassLoader_at_747fb9e1
>> was requested to find class com.bloomberglp.blpapi.impl.c$b after
>> done was invoked from the following stack trace
>> java.lang.Throwable
>> at
>> com
>> .sun
>> .enterprise
>> .loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:706)
>> at
>> com
>> .sun
>> .enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:
>> 626)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>> at com.bloomberglp.blpapi.impl.c$a.<init>(TimeQueue.java:144)
>> at com.bloomberglp.blpapi.impl.c.a(TimeQueue.java:241)
>> at com.bloomberglp.blpapi.impl.bJ.e(TimerEventManager.java:369)
>> at com.bloomberglp.blpapi.impl.bJ.c(TimerEventManager.java:300)
>> at com.bloomberglp.blpapi.impl.bJ.a(TimerEventManager.java:23)
>> at com.bloomberglp.blpapi.impl.di.run(TimerEventManager.java:137)
>> at java.lang.Thread.run(Thread.java:619)
>>
>> ATTENTION: LDR5207: ASURLClassLoader EarClassLoader :
>> doneCalled = true
>> doneSnapshot = ASURLClassLoader.done() called ON EarClassLoader :
>> urlSet = [URLEntry : file:/C:/glassfish3/glassfish/domains/domain1/
>> eclipseApps/Gottware/Gottware-ejb_jar/, URLEntry : file:/C:/
>> glassfish3/glassfish/domains/domain1/generated/ejb/Gottware/
>> Gottware-ejb_jar, URLEntry : file:/C:/glassfish3/glassfish/domains/
>> domain1/eclipseApps/Gottware/blpjavaapi.jar]
>> doneCalled = false
>> Parent -> org.glassfish.internal.api.DelegatingClassLoader_at_3a9300bf
>> AT Fri Jan 07 12:12:04 CET 2011
>> BY :java.lang.Throwable: printStackTraceToString
>> at
>> com.sun.enterprise.util.Print.printStackTraceToString(Print.java:634)
>> at
>> com
>> .sun.enterprise.loader.ASURLClassLoader.done(ASURLClassLoader.java:
>> 170)
>> at
>> com
>> .sun
>> .enterprise
>> .loader.ASURLClassLoader.preDestroy(ASURLClassLoader.java:153)
>> at
>> org
>> .glassfish
>> .javaee
>> .full.deployment.EarClassLoader.preDestroy(EarClassLoader.java:93)
>> at
>> org
>> .glassfish
>> .internal.data.ApplicationInfo.unload(ApplicationInfo.java:280)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:760)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.server.ApplicationLifecycle.undeploy(ApplicationLifecycle.java:
>> 790)
>> at
>> org
>> .glassfish
>> .deployment.admin.UndeployCommand.execute(UndeployCommand.java:184)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $1.execute(CommandRunnerImpl.java:310)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl.access
>> $900(CommandRunnerImpl.java:83)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $ExecutionContext.execute(CommandRunnerImpl.java:1235)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $ExecutionContext.execute(CommandRunnerImpl.java:1224)
>> at
>> org
>> .glassfish
>> .deployment.admin.DeployCommand.handleRedeploy(DeployCommand.java:
>> 414)
>> at
>> org
>> .glassfish
>> .deployment.admin.DeployCommand.execute(DeployCommand.java:210)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $1.execute(CommandRunnerImpl.java:305)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl.access
>> $900(CommandRunnerImpl.java:83)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $ExecutionContext.execute(CommandRunnerImpl.java:1235)
>> at com.sun.enterprise.v3.admin.CommandRunnerImpl
>> $ExecutionContext.execute(CommandRunnerImpl.java:1224)
>> at
>> com
>> .sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:
>> 365)
>> at
>> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:
>> 204)
>> at
>> com
>> .sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:
>> 166)
>> at
>> com
>> .sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:
>> 100)
>> at
>> com
>> .sun
>> .enterprise
>> .v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
>> at
>> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:
>> 791)
>> at
>> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
>> at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:
>> 954)
>> at
>> com
>> .sun
>> .grizzly
>> .http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
>> at
>> com
>> .sun
>> .grizzly
>> .DefaultProtocolChain
>> .executeProtocolFilter(DefaultProtocolChain.java:135)
>> at
>> com
>> .sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:
>> 102)
>> at
>> com
>> .sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:
>> 88)
>> at
>> com
>> .sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:
>> 76)
>> at
>> com
>> .sun
>> .grizzly
>> .ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
>> at
>> com
>> .sun
>> .grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:
>> 57)
>> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
>> at com.sun.grizzly.util.AbstractThreadPool
>> $Worker.doWork(AbstractThreadPool.java:330)
>> at com.sun.grizzly.util.AbstractThreadPool
>> $Worker.run(AbstractThreadPool.java:309)
>> at java.lang.Thread.run(Thread.java:619)
>> Parent -> org.glassfish.internal.api.DelegatingClassLoader_at_3a9300bf
>> was requested to find class com.bloomberglp.blpapi.impl.c$b after
>> done was invoked from the following stack trace
>> java.lang.Throwable
>> at
>> com
>> .sun
>> .enterprise
>> .loader.ASURLClassLoader.findClassData(ASURLClassLoader.java:706)
>> at
>> com
>> .sun
>> .enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:
>> 626)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>> at com.bloomberglp.blpapi.impl.c$a.<init>(TimeQueue.java:144)
>> at com.bloomberglp.blpapi.impl.c.a(TimeQueue.java:241)
>> at com.bloomberglp.blpapi.impl.bJ.e(TimerEventManager.java:369)
>> at com.bloomberglp.blpapi.impl.bJ.c(TimerEventManager.java:300)
>> at com.bloomberglp.blpapi.impl.bJ.a(TimerEventManager.java:23)
>> at com.bloomberglp.blpapi.impl.di.run(TimerEventManager.java:137)
>> at java.lang.Thread.run(Thread.java:619)
>>
>> this looks like a problem in the classloader, am I right?
>>
> It depends I think on which Eclipse GlassFish plugin you are
> using...We recently update it (last month) to solve issues regarding
> exploded directory deployment versus non exploded for GlassFish
> v3.0.x (not impacting GlassFish 3.1).
> Which eclipse plugin for GlassFish are you using? Update to latest
> one, undeploy completely the app from eclipse and deploy a fresh one.
> Ludo
>> Best Regards
>> Edmondo
>>
>