tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 38630] - Environment (java:comp/env/) sometimes not available
Date Wed, 15 Feb 2006 16:02:00 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38630>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38630





------- Additional Comments From boris@folgmann.de  2006-02-15 17:01 -------
On a clean start-up this static initializer IS called the first time inside
contextInitialized() of my ContextListener. The problem here is the
StandardManager that seems to be invoked too early (in some cases) by catalina.
When there are saved sessions the StandardManager loads my UserCoreBean objects,
which use all the same global Singleton which offers the environment bases
config data. Normally sessions and therfore UserCoreBeans are not created before
contextInitialized() is done. Since StandardManager is enabled by default for
all webapps one can expect that it does its job right and is not executed before
the webapp.xml deployment descriptor is fully parsed and executed.

See complete trace here:

SCHWERWIEGEND: Exception loading sessions from persistent storage
java.lang.ExceptionInInitializerError
        at com.folgmann.UserCoreBean.<clinit>(UserCoreBean.java:111)
        at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)
        at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1641)
        at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:47)
        at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:175)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:172)
        at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:515)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
        at
org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1342)
        at
org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:885)
        at
org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:416)
        at
org.apache.catalina.session.StandardManager.load(StandardManager.java:343)
        at
org.apache.catalina.session.StandardManager.start(StandardManager.java:657)
        at org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:499)
        at
org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig.java:317)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:638)
        at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4270)
        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
        at
org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
        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
org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
        at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:216)
        at org.apache.commons.digester.Rule.end(Rule.java:230)
        at org.apache.commons.digester.Digester.endElement(Digester.java:1130)
        at
org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
        at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.commons.digester.Digester.parse(Digester.java:1666)
        at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
        at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
        at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
        at org.apache.catalina.core.StandardService.start(StandardService.java:480)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
        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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
[...]
Caused by: javax.naming.NameNotFoundException: Name java:comp is not bound in
this Context
[...]


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message