users@glassfish.java.net

IllegalStateException: WEB9031 on reload/redeploy

From: <glassfish_at_javadesktop.org>
Date: Sun, 12 Sep 2010 22:44:27 PDT

Every time I restart/redeploy my application I get the exception below, which according to the reference docs:

"This problem usually indicates that the classloader of a web application was cached, and an attempt is being made to have it load resources even though the web application with which the classloader used to be associated has already been undeployed"

The only solution is to restart Glassfish.
I'm not doing anything with the classloader in my app and I not sure where the issue lies here, is this likely to be a Glassfish problem or should I be looking elsewhere - OpenJPA / Wicket / Weld.... ?

java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [META-INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration], because it has not yet been started, or was already stopped
     at org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2085)
     at org.glassfish.web.loader.WebappClassLoader.findResource(WebappClassLoader.java:1018)
     at org.glassfish.web.loader.WebappClassLoader.getResourceAsStream(WebappClassLoader.java:1255)
     at org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown Source)
     at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source)
     at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
     at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source)
     at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
     at org.apache.xerces.parsers.DOMParser.<init>(Unknown Source)
     at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
     at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
     at org.apache.openjpa.lib.xml.XMLFactory.getDOMParser(XMLFactory.java:107)
     at org.apache.openjpa.jdbc.sql.SQLErrorCodeReader.parse(SQLErrorCodeReader.java:107)
     at org.apache.openjpa.jdbc.sql.DBDictionary.endConfiguration(DBDictionary.java:4621)
     at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:507)
     at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:432)
     at org.apache.openjpa.jdbc.sql.DBDictionaryFactory.newDBDictionary(DBDictionaryFactory.java:199)
     at org.apache.openjpa.jdbc.sql.DBDictionaryFactory.newDBDictionary(DBDictionaryFactory.java:100)
     at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getDBDictionaryInstance(JDBCConfigurationImpl.java:595)
     at org.apache.openjpa.jdbc.meta.MappingRepository.endConfiguration(MappingRepository.java:1489)
     at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:507)
     at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:432)
     at org.apache.openjpa.lib.conf.PluginValue.instantiate(PluginValue.java:104)
     at org.apache.openjpa.conf.MetaDataRepositoryValue.instantiate(MetaDataRepositoryValue.java:68)
     at org.apache.openjpa.lib.conf.ObjectValue.instantiate(ObjectValue.java:83)
     at org.apache.openjpa.conf.OpenJPAConfigurationImpl.newMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:939)
     at org.apache.openjpa.conf.OpenJPAConfigurationImpl.getMetaDataRepositoryInstance(OpenJPAConfigurationImpl.java:930)
     at org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:626)
     at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:193)
     at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
     at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:213)
     at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:57)
     at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
     at com.sun.enterprise.container.common.impl.EntityManagerWrapper.createQuery(EntityManagerWrapper.java:424)
     at com.myapp.service.RefdataServiceImpl.countries(RefdataServiceImpl.java:29)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1056)
     at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1128)
     at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5292)
     at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:615)
     at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
     at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
     at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:47)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)
     at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
     at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:567)
     at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:157)
     at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:139)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:858)
     at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:797)
     at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:367)
     at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5264)
     at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5252)
     at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:190)
     at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:84)
     at $Proxy195.countries(Unknown Source)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:304)
     at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:54)
     at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:163)
     at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:298)
     at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)
     at org.jboss.weld.util.CleanableMethodHandler.invoke(CleanableMethodHandler.java:43)
     at com.myapp.service.RefdataService_$$_javassist_23.countries(RefdataService_$$_javassist_23.java)
     at com.myapp.webapp.Myapp$1.load(Myapp.java:57)
     at com.myapp.webapp.Myapp$1.load(Myapp.java:52)
     at org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:120)
     at org.apache.wicket.Component.getDefaultModelObject(Component.java:1720)
     at org.apache.wicket.markup.html.list.ListView.getViewSize(ListView.java:220)
     at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:511)
     at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131)
     at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
     at org.apache.wicket.Component.beforeRender(Component.java:1105)
     at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)
     at org.apache.wicket.Component.onBeforeRender(Component.java:3946)
     at org.apache.wicket.Page.onBeforeRender(Page.java:1531)
     at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
     at org.apache.wicket.Component.beforeRender(Component.java:1105)
     at org.apache.wicket.Component.prepareForRender(Component.java:2292)
     at org.apache.wicket.Page.prepareForRender(Page.java:1521)
     at org.apache.wicket.Component.prepareForRender(Component.java:2329)
     at org.apache.wicket.Page.renderPage(Page.java:892)
     at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
     at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
     at org.jboss.weld.wicket.WeldWebRequestCycleProcessor.respond(WeldWebRequestCycleProcessor.java:30)
     at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
     at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
     at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
     at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
     at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
     at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:317)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
     at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
     at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
     at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
     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:637)[i][/i][i][/i][i][/i][b][/b][i][/i]
[Message sent by forum member 'gilberthuph']

http://forums.java.net/jive/thread.jspa?messageID=482481