geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Jencks (JIRA)" <...@geronimo.apache.org>
Subject [jira] Created: (GERONIMO-1131) component context not available in tomcat servlet init methods
Date Fri, 04 Nov 2005 09:23:20 GMT
component context not available in tomcat servlet init methods
--------------------------------------------------------------

         Key: GERONIMO-1131
         URL: http://issues.apache.org/jira/browse/GERONIMO-1131
     Project: Geronimo
        Type: Bug
  Components: Tomcat  
    Versions: 1.0    
    Reporter: David Jencks
     Fix For: 1.0


It appears that in the tomcat integration, the servlet init method is not wrapped by the context
valve.  Therefore the component context is not available.  I believe the security and transaction
valves should also be traversed on the way to the init method.

Evidence is this stack trace from Jian Liao:

 well, still the same problem - javax.naming.NameNotFoundException
 I debug it and found that, the NameNotFoundException is thrown by org.apache.geronimo.naming.java.RootContext
 code:
 Context compCtx = (Context) compContext.get();
 if (compCtx == null) {
         // the component context was not set for this thread
         throw new NameNotFoundException(name);
 }


 the call stack:
 org.apache.geronimo.naming.java.RootContext.lookup(java.lang.String) line: 43
 org.apache.geronimo.naming.java.RootContext.lookup(java.lang.String) line: 43
 javax.naming.InitialContext.lookup(java.lang.String) line: 347
 org.apache.jetspeed.components.rdbms.ojb.ConnectionRepositoryEntry.afterPropertiesSet() line:
252
 org.springframework.beans.factory.support.DefaultListableBeanFactory(org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory).invokeInitMethods(java.lang.String,
java.lang.Object, org.springframework.beans.factory.support.RootBeanDefinition) line: 1072
 org.springframework.beans.factory.support.DefaultListableBeanFactory(org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory).createBean(java.lang.String,
org.springframework.beans.factory.support.RootBeanDefinition, java.lang.Object[], boolean)
line: 343
 org.springframework.beans.factory.support.DefaultListableBeanFactory(org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory).createBean(java.lang.String,
org.springframework.beans.factory.support.RootBeanDefinition, java.lang.Object[]) line: 260
 org.springframework.beans.factory.support.DefaultListableBeanFactory(org.springframework.beans.factory.support.AbstractBeanFactory).getBean(java.lang.String,
java.lang.Class, java.lang.Object[]) line: 221
 org.springframework.beans.factory.support.DefaultListableBeanFactory(org.springframework.beans.factory.support.AbstractBeanFactory).getBean(java.lang.String)
line: 145
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons()
line: 291
 org.springframework.web.context.support.XmlWebApplicationContext(org.springframework.context.support.AbstractApplicationContext).refresh()
line: 317
 org.springframework.web.context.support.XmlWebApplicationContext(org.springframework.web.context.support.AbstractRefreshableWebApplicationContext).refresh()
line: 131
 org.apache.jetspeed.components.SpringComponentManager.start() line: 206
 org.apache.jetspeed.engine.JetspeedEngine.start() line: 137
 org.apache.jetspeed.engine.JetspeedServlet.init(javax.servlet.ServletConfig) line: 135
 org.apache.catalina.core.StandardWrapper.loadServlet() line: 1091
 org.apache.catalina.core.StandardWrapper.load() line: 925
 org.apache.geronimo.tomcat.GeronimoStandardContext(org.apache.catalina.core.StandardContext).loadOnStartup(org.apache.catalina.Container[])
line: 3857
 org.apache.geronimo.tomcat.GeronimoStandardContext(org.apache.catalina.core.StandardContext).start()
line: 4118
 org.apache.geronimo.tomcat.GeronimoStandardContext.start() line: 164
 org.apache.catalina.core.StandardHost(org.apache.catalina.core.ContainerBase).addChildInternal(org.apache.catalina.Container)
line: 759
 org.apache.catalina.core.StandardHost(org.apache.catalina.core.ContainerBase).addChild(org.apache.catalina.Container)
line: 739
 org.apache.catalina.core.StandardHost.addChild(org.apache.catalina.Container) line: 524
 org.apache.geronimo.tomcat.TomcatContainer.addContext(org.apache.geronimo.tomcat.TomcatContext)
line: 287
 org.apache.geronimo.tomcat.TomcatContainer$$FastClassByCGLIB$$9370b073.invoke(int, java.lang.Object,
java.lang.Object[]) line: not available
 net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object, java.lang.Object[]) line: 53
 org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang.Object, java.lang.Object[])
line: 38
 org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Object, java.lang.Object[])
line: 118
 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(int, java.lang.Object[]) line: 779
 org.apache.geronimo.gbean.runtime.RawInvoker.invoke(int, java.lang.Object[]) line: 57
 org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(javax.management.ObjectName,
java.lang.Object[]) line: 36
 org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(java.lang.Object, java.lang.reflect.Method,
java.lang.Object[], net.sf.cglib.proxy.MethodProxy) line: 96
 org.apache.geronimo.tomcat.TomcatContainer$$EnhancerByCGLIB$$9b8a0a97.addContext(org.apache.geronimo.tomcat.TomcatContext)
line: not available
 org.apache.geronimo.tomcat.TomcatWebAppContext.doStart() line: 377
 org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance() line: 913
 org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart() line: 325
 org.apache.geronimo.gbean.runtime.GBeanInstanceState.start() line: 110
 org.apache.geronimo.gbean.runtime.GBeanInstance.start() line: 499
 org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStart() line: 154
 org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(javax.management.ObjectName)
line: 127
 org.apache.geronimo.gbean.runtime.GBeanSingleReference(org.apache.geronimo.gbean.runtime.AbstractGBeanReference).addTarget(javax.management.ObjectName)
line: 242
 org.apache.geronimo.gbean.runtime.GBeanSingleReference$1.running(javax.management.ObjectName)
line: 163
 org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(javax.management.ObjectName)
line: 155
 org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(org.apache.geronimo.kernel.basic.BasicLifecycleMonitor,
javax.management.ObjectName) line: 38
 org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent()
line: 231
 org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart() line: 350
 org.apache.geronimo.gbean.runtime.GBeanInstanceState.start() line: 110
 org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive() line: 132
 org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive() line: 516
 org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(javax.management.ObjectName)
line: 210
 org.apache.geronimo.kernel.config.Configuration.startRecursiveGBeans() line: 326
 org.apache.geronimo.kernel.config.Configuration$$FastClassByCGLIB$$7f4b4a9b.invoke(int, java.lang.Object,
java.lang.Object[]) line: not available
 net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object, java.lang.Object[]) line: 53
 org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang.Object, java.lang.Object[])
line: 38
 org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Object, java.lang.Object[])
line: 118
 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(java.lang.String, java.lang.Object[],
java.lang.String[]) line: 814
 org.apache.geronimo.kernel.basic.BasicKernel.invoke(javax.management.ObjectName, java.lang.String,
java.lang.Object[], java.lang.String[]) line: 180
 org.apache.geronimo.kernel.basic.BasicKernel.invoke(javax.management.ObjectName, java.lang.String)
line: 175
 org.apache.geronimo.kernel.config.ConfigurationManagerImpl.start(java.net.URI) line: 138
 org.apache.geronimo.kernel.config.ConfigurationManagerImpl$$FastClassByCGLIB$$fbed85d2.invoke(int,
java.lang.Object, java.lang.Object[]) line: not available
 net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object, java.lang.Object[]) line: 53
 org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang.Object, java.lang.Object[])
line: 38
 org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Object, java.lang.Object[])
line: 118
 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(java.lang.String, java.lang.Object[],
java.lang.String[]) line: 814
 org.apache.geronimo.kernel.basic.BasicKernel.invoke(javax.management.ObjectName, java.lang.String,
java.lang.Object[], java.lang.String[]) line: 180
 org.apache.geronimo.kernel.KernelGBean.invoke(javax.management.ObjectName, java.lang.String,
java.lang.Object[], java.lang.String[]) line: 125
 org.apache.geronimo.kernel.KernelGBean$$FastClassByCGLIB$$1cccefc9.invoke(int, java.lang.Object,
java.lang.Object[]) line: not available
 net.sf.cglib.reflect.FastMethod.invoke(java.lang.Object, java.lang.Object[]) line: 53
 org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(java.lang.Object, java.lang.Object[])
line: 38
 org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(java.lang.Object, java.lang.Object[])
line: 118
 org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(java.lang.String, java.lang.Object[],
java.lang.String[]) line: 814
 org.apache.geronimo.kernel.basic.BasicKernel.invoke(javax.management.ObjectName, java.lang.String,
java.lang.Object[], java.lang.String[]) line: 180
 org.apache.geronimo.kernel.jmx.MBeanServerDelegate.invoke(javax.management.ObjectName, java.lang.String,
java.lang.Object[], java.lang.String[]) line: 117
 mx4j.remote.rmi.RMIConnectionInvoker.invoke(javax.management.ObjectName, java.lang.String,
java.rmi.MarshalledObject, java.lang.String[], javax.security.auth.Subject) line: 219
 sun.reflect.GeneratedMethodAccessor151.invoke(java.lang.Object, java.lang.Object[]) line:
not available
 sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line:
25
 java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) line: 324
 mx4j.remote.rmi.RMIConnectionSubjectInvoker(mx4j.remote.rmi.RMIConnectionProxy).invoke(java.lang.Object,
java.lang.reflect.Method, java.lang.Object[]) line: 34
 mx4j.remote.rmi.RMIConnectionSubjectInvoker.chain(java.lang.Object, java.lang.reflect.Method,
java.lang.Object[]) line: 99
 mx4j.remote.rmi.RMIConnectionSubjectInvoker.access$000(mx4j.remote.rmi.RMIConnectionSubjectInvoker,
java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) line: 31
 mx4j.remote.rmi.RMIConnectionSubjectInvoker$1.run() line: 90
 java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction, java.security.AccessControlContext)
line: not available [native method]
 javax.security.auth.Subject.doAsPrivileged(javax.security.auth.Subject, java.security.PrivilegedExceptionAction,
java.security.AccessControlContext) line: 500
 mx4j.remote.MX4JRemoteUtils.subjectInvoke(javax.security.auth.Subject, javax.security.auth.Subject,
java.security.AccessControlContext, java.util.Map, java.security.PrivilegedExceptionAction)
line: 163
 mx4j.remote.rmi.RMIConnectionSubjectInvoker.subjectInvoke(java.lang.Object, java.lang.reflect.Method,
java.lang.Object[], javax.security.auth.Subject) line: 86
 mx4j.remote.rmi.RMIConnectionSubjectInvoker.invoke(java.lang.Object, java.lang.reflect.Method,
java.lang.Object[]) line: 80
 $Proxy0.invoke(javax.management.ObjectName, java.lang.String, java.rmi.MarshalledObject,
java.lang.String[], javax.security.auth.Subject) line: not available
 javax.management.remote.rmi.RMIConnectionImpl.invoke(javax.management.ObjectName, java.lang.String,
java.rmi.MarshalledObject, java.lang.String[], javax.security.auth.Subject) line: 221
 sun.reflect.GeneratedMethodAccessor168.invoke(java.lang.Object, java.lang.Object[]) line:
not available
 sun.reflect.DelegatingMethodAccessorImpl.invoke(java.lang.Object, java.lang.Object[]) line:
25
 java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) line: 324
 sun.rmi.server.UnicastServerRef2(sun.rmi.server.UnicastServerRef).dispatch(java.rmi.Remote,
java.rmi.server.RemoteCall) line: 261
 sun.rmi.transport.Transport$1.run() line: 148
 java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction, java.security.AccessControlContext)
line: not available [native method]
 sun.rmi.transport.tcp.TCPTransport(sun.rmi.transport.Transport).serviceCall(java.rmi.server.RemoteCall)
line: 144
 sun.rmi.transport.tcp.TCPTransport.handleMessages(sun.rmi.transport.Connection, boolean)
line: 460
 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run() line: 701
 java.lang.Thread.run() line: 534


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message