[jboss-jira] [JBoss JIRA] (AS7-5443) Lookup of application resources failed in PreDestroy

Eduardo Martins (JIRA) jira-events at lists.jboss.org
Mon Sep 3 10:44:37 EDT 2012


    [ https://issues.jboss.org/browse/AS7-5443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715443#comment-12715443 ] 

Eduardo Martins commented on AS7-5443:
--------------------------------------

This seems to be true only for java:app/appName and java:Module/ModuleName , the services which manage these bindings are not included in the deps for the component, thus there is no guarantee that these are still up when the component's @PreDestroy kicks off.

Adding PR where the app and module context processors account the names of "special" jndi binding services, such as the ones above, and then the ModuleJNDIBindingProcessor adds these to the module JNDI binding deps.
                
> Lookup of application resources failed in PreDestroy
> ----------------------------------------------------
>
>                 Key: AS7-5443
>                 URL: https://issues.jboss.org/browse/AS7-5443
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Naming
>    Affects Versions: 7.2.0.Alpha1
>            Reporter: Cheng Fang
>            Assignee: Eduardo Martins
>
> JNDI lookup (e.g., java:app/AppName)in servlet or ejb @PreDestroy method failed:
> {noformat}
> 13:33:32,223 INFO  [stdout] (MSC service thread 1-16) In preDestroy of test.TestServlet at bea6b3
> 13:33:32,224 ERROR [stderr] (MSC service thread 1-16) javax.naming.NameNotFoundException: Error looking up AppName, service service jboss.naming.context.java.app.test.AppName is not started
> 13:33:32,224 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:126)
> 13:33:32,224 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:74)
> 13:33:32,224 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179)
> 13:33:32,224 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:129)
> 13:33:32,224 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:215)
> 13:33:32,224 ERROR [stderr] (MSC service thread 1-16) 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
> 13:33:32,224 ERROR [stderr] (MSC service thread 1-16) 	at javax.naming.InitialContext.doLookup(InitialContext.java:265)
> 13:33:32,224 ERROR [stderr] (MSC service thread 1-16) 	at test.TestServlet.preDestroy(TestServlet.java:25)
> 13:33:32,224 ERROR [stderr] (MSC service thread 1-16) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at java.lang.reflect.Method.invoke(Method.java:597)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:130)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.ee.component.ManagedReferenceReleaseInterceptorFactory$ManagedReferenceReleaseInterceptor.processInvocation(ManagedReferenceReleaseInterceptorFactory.java:90)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
> 13:33:32,225 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.ee.component.ManagedReferenceReleaseInterceptorFactory$ManagedReferenceReleaseInterceptor.processInvocation(ManagedReferenceReleaseInterceptorFactory.java:90)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.ee.component.BasicComponentInstance.destroy(BasicComponentInstance.java:119)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.web.deployment.component.WebComponentInstantiator$1.release(WebComponentInstantiator.java:63)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.web.deployment.WebInjectionContainer.destroyInstance(WebInjectionContainer.java:69)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1389)
> 13:33:32,226 ERROR [stderr] (MSC service thread 1-16) 	at org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1682)
> 13:33:32,227 ERROR [stderr] (MSC service thread 1-16) 	at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3985)
> 13:33:32,227 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.as.web.deployment.WebDeploymentService.stop(WebDeploymentService.java:118)
> 13:33:32,227 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911)
> 13:33:32,227 ERROR [stderr] (MSC service thread 1-16) 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874)
> 13:33:32,227 ERROR [stderr] (MSC service thread 1-16) 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 13:33:32,227 ERROR [stderr] (MSC service thread 1-16) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 13:33:32,227 ERROR [stderr] (MSC service thread 1-16) 	at java.lang.Thread.run(Thread.java:680)
> {noformat}
> jndi service and application resources should be available in @PreDestroy.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list