[ 
https://issues.apache.org/jira/browse/GERONIMO-4113?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joe Bohn updated GERONIMO-4113:
-------------------------------

    Fix Version/s:     (was: 2.0.x)
                   2.0.3

> Cannot deploy context specific Valve GBeans on Tomcat
> -----------------------------------------------------
>
>                 Key: GERONIMO-4113
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-4113
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Tomcat
>    Affects Versions: 1.1.1, 2.0, 2.0.1, 2.0.2, 2.1, 2.1.1
>            Reporter: Kevan Miller
>            Assignee: Kevan Miller
>             Fix For: 2.0.3, 2.1.2, 2.2
>
>
> If you deploy a web app with a plan similar to the following:
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0";
>          xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";>
>   <dep:environment>
>     <dep:moduleId>
>       <dep:groupId>org.mytest</dep:groupId>
>       <dep:artifactId>myvalve</dep:artifactId>
>       <dep:version>1.0</dep:version>
>     </dep:moduleId>
>   </dep:environment>
>   <context-root>/foo</context-root>
>   <valve-chain>AValve</valve-chain>
>     <gbean name="AValve" class="org.apache.geronimo.tomcat.ValveGBean">       
>                                                                    
>         <attribute name="className">org.foo.bar.MyValve</attribute>
>         <attribute name="initParams">
>             pattern=common
>         </attribute>
>     </gbean>
> </web-app>
> Will result in the following exception:
> 23:26:36,605 ERROR [GBeanInstanceState] Error while starting; GBean is now in 
> the FAILED state: 
> abstractName="org.apache.geronimo.plugins/welcome/2.1/war?J2EEApplication=null,WebModule=org.apache.geronimo.plugins/welcome/2.1/war,j2eeType=TomcatValve,name=AValve"
> java.lang.ClassNotFoundException: org.foo.bar.MyValve in classloader 
> org.apache.geronimo.configs/tomcat6/2.1.2-SNAPSHOT/car
>       at 
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:428)
>       at 
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:278)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
>       at java.lang.Class.forName0(Native Method)
>       at java.lang.Class.forName(Class.java:164)
>       at org.apache.geronimo.tomcat.ValveGBean.<init>(ValveGBean.java:67)
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>       at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>       at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
>       at 
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
>       at 
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
>       at 
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187)
>       at 
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:581)
>       at 
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:562)
>       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.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>       at 
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>       at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
>       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.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>       at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>       at 
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>       at 
> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
>       at 
> com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
>       at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
>       at 
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
>       at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
>       at 
> javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1410)
>       at 
> javax.management.remote.rmi.RMIConnectionImpl.access$100(RMIConnectionImpl.java:81)
>       at 
> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1247)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at 
> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1350)
>       at 
> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:784)
>       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 sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
>       at sun.rmi.transport.Transport$1.run(Transport.java:153)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>       at 
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
>       at 
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
>       at java.lang.Thread.run(Thread.java:613)
> Sure seems like we should be using the war classloader, in this instance, not 
> the TomcatClassloader. Agreed?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to