Re: inverse-classloading error
djencks wrote: I'm having trouble distinguishing between this and the previous error. Are you sure this isn't leftover in the log from a previous failed run? You might want to start with a fresh copy of geronimo just to be certain you are seeing only the most up to date problems :-) Could you show the environment element from your geronimo plan? I clean the geronimo.log and installed WAR again. At the same time the Geronimo console displays the message: The application was successfully deployed. The application was successfully started and geronimo.log: (same time) - 13:51:47,763 WARN [ConfigurationUtil] Could not load gbean default/globalsafe/1208796686919/war?J2EEApplication=null,j2eeType=WebModule,name=default/globalsafe/1208796686919/war org.apache.geronimo.gbean.InvalidConfigurationException: Getter return type in wrong classloader: type: interface javax.transaction.UserTransaction wanted in classloader: [org.apache.geronimo.kernel.classloader.JarFileClassLoader id=default/globalsafe/1208796686919/war] actual: [org.apache.geronimo.kernel.classloader.JarFileClassLoader id=org.apache.geronimo.configs/jee-specs/2.0.2/car] at org.apache.geronimo.gbean.runtime.GBeanAttribute.init(GBeanAttribute.java:241) at org.apache.geronimo.gbean.runtime.GBeanInstance.init(GBeanInstance.java:245) at org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.java:354) at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:433) at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:187) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:530) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:511) at org.apache.geronimo.kernel.config.SimpleConfigurationManager$$FastClassByCGLIB$$ce77a924.invoke(generated) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96) at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$dbf181f0.startConfiguration(generated) at org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67) at java.lang.Thread.run(Thread.java:619) - geronimo-web.xml: - ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1; xmlns:naming=http://geronimo.apache.org/xml/ns/naming-1.2; xmlns:sys=http://geronimo.apache.org/xml/ns/deployment-1.2; environment dependencies dependency groupIdorg.apache.geronimo.configs/groupId artifactIdjavamail/artifactId version2.0.2/version typecar/type /dependency dependency groupIdconsole.dbpool/groupId artifactIdjdbc%2FGlobalSafeDS/artifactId /dependency /dependencies non-overridable-classes filterjavax.transaction./filter /non-overridable-classes inverse-classloading/ /environment context-root/globalsafe/context-root resource-ref !-- Used in web.xml -- ref-namemail/MailSession/ref-name !-- Default Geronimo mail session -- resource-linkmail/MailSession/resource-link /resource-ref resource-ref ref-namejdbc/GlobalSafeDS/ref-name resource-linkjdbc/GlobalSafeDS/resource-link /resource-ref /web-app - An important information: If I remove inverse-classloading and non-overridable-classes my app started and run!! But I have some problems with the common-lang of geronimo which is version 2.0, and I need the 2.1. If I use the hidden-classes my application work without any error: hidden-classes filterorg.apache.commons/filter /hidden-classes But I would like to do the inverse ... I want
Re: inverse-classloading error
djencks wrote: Out of curiousity, what does your app do if there is no transaction manager available in the tomcat environment? Ok :) I use Spring + Hibernate 3 on my app and these frameworks that use the class TransactionManager. Complete trace in the tomcat 6 (without WEB-INF\lib\jta.jar): - org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessions' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/transaction/TransactionManager java.lang.NoClassDefFoundError: javax/transaction/TransactionManager at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getDeclaredMethods(Class.java:1791) at java.beans.Introspector$1.run(Introspector.java:1272) at java.security.AccessController.doPrivileged(Native Method) at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1270) at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1136) at java.beans.Introspector.getBeanInfo(Introspector.java:387) at java.beans.Introspector.getBeanInfo(Introspector.java:159) at org.springframework.beans.CachedIntrospectionResults.init(CachedIntrospectionResults.java:150) at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:87) at org.springframework.beans.BeanWrapperImpl.setIntrospectionClass(BeanWrapperImpl.java:237) at org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:195) at org.springframework.beans.BeanWrapperImpl.setWrappedInstance(BeanWrapperImpl.java:179) at org.springframework.beans.BeanWrapperImpl.init(BeanWrapperImpl.java:132) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:487) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:362) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:186) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1046) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:186) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1046) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:145) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:186) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1046) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857) at
Re: inverse-classloading error
On Apr 20, 2008, at 5:24 AM, bgbraga wrote: Hi, I want to load all of my WEB-INF/lib jar and the other jars from geronimo ... But this command generated an error. environment inverse-classloading/ /environment ERROR: 15:52:33,442 WARN [ConfigurationUtil] Could not load gbean default/globalsafe/1208630537244/war? J2EEApplication=null,j2eeType=WebModule,name=default/globalsafe/ 1208630537244/war org.apache.geronimo.gbean.InvalidConfigurationException: Getter return type in wrong classloader: type: interface javax.transaction.UserTransaction wanted in classloader: [org.apache.geronimo.kernel.classloader.JarFileClassLoader id=default/globalsafe/1208630537244/war] actual: [org.apache.geronimo.kernel.classloader.JarFileClassLoader id=org.apache.geronimo.configs/jee-specs/2.0.2/car] snip --- I have javax.transaction.UserTransaction in WEB-INF\lib\jta.jar I don't understand why the error is happening ... I can not have the jta.jar? well, no, unless you are willing to work harder. jta is a server component, so if you include it in your app and set classloading so your app classes are loaded first, you are certain to run into trouble. I thought the error you are getting was moderately clear about the problem that is occuring. I'm afraid my imagination is not up to thinking of a scenario in which having a transaction api jar in your app would provide any benefit. However, if you want to keep it, you can override the effect of inverse-classloading/ for particular packages using non- overrideable-classes filters. non-overridable-classes filterjavax.transaction./filter /non-overridable-classes I'm generally against default restrictions on how an application classloader can be set up but maybe we should think about including javax.transaction in the default non-overridable-classes filters. thanks david jencks -- View this message in context: http://www.nabble.com/inverse- classloading-error-tp16790691s134p16790691.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: inverse-classloading error
djencks wrote: well, no, unless you are willing to work harder. jta is a server component, so if you include it in your app and set classloading so your app classes are loaded first, you are certain to run into trouble. I thought the error you are getting was moderately clear about the problem that is occuring. I'm afraid my imagination is not up to thinking of a scenario in which having a transaction api jar in your app would provide any benefit. Hi David, Thanks for you reply. I will explain: I have an application that HAVE to run on Tomcat 6 for a customer and now in Apache Geronimo to another. If I deploy it in the tomcat without the WEB-INF\lib\jta.jar this error occurs: java.lang.NoClassDefFoundError: javax/transaction/TransactionManager The tomcat doesn't have jta.jar as common lib. OK? The tomcat of this customer is a external host and we can not change the folder common lib. Then I need to keep this WAR interoperable with multiple servers (tomcat, geronimo, etc). I can not remove the jta.jar. Understand? djencks wrote: However, if you want to keep it, you can override the effect of inverse-classloading/ for particular packages using non- overrideable-classes filters. That removed the error from deploy. But the application isn't started. I will check that. djencks wrote: I'm generally against default restrictions on how an application classloader can be set up but maybe we should think about including javax.transaction in the default non-overridable-classes filters. I'm using Geronimo with Tomcat. Then I think you should do this for all server components that don't exist in tomcat as jta. So you can keep interoperable between Geronimo and Tomcat more easily. This error appeared to be silly, but I really need the jta.jar in my lib. -- View this message in context: http://www.nabble.com/inverse-classloading-error-tp16790691s134p16797376.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
Re: inverse-classloading error
I'm having trouble distinguishing between this and the previous error. Are you sure this isn't leftover in the log from a previous failed run? You might want to start with a fresh copy of geronimo just to be certain you are seeing only the most up to date problems :-) Could you show the environment element from your geronimo plan? Out of curiousity, what does your app do if there is no transaction manager available in the tomcat environment? thanks david jencks On Apr 20, 2008, at 2:32 PM, bgbraga wrote: bgbraga wrote: That removed the error from deploy. But the application isn't started. I will check that. In deploy shows that message but the application is not started: The application was successfully deployed. The application was successfully started New error (in log): 16:04:47,000 INFO [Mapping] C:\java\servers\geronimo-tomcat6-2.0.2\repository\org\apache \geronimo\configs\webconsole-tomcat\2.0.2\webconsole- tomcat-2.0.2.car\framework.war\WEB-INF\data\xml is not a URL, trying to convert it to a file URL 16:04:47,001 INFO [Mapping] Loading mapping descriptors from pageregistrymapping.xml 16:15:27,684 WARN [ConfigurationUtil] Could not load gbean default/globalsafe/1208718914237/war? J2EEApplication=null,j2eeType=WebModule,name=default/globalsafe/ 1208718914237/war org.apache.geronimo.gbean.InvalidConfigurationException: Getter return type in wrong classloader: type: interface javax.transaction.UserTransaction wanted in classloader: [org.apache.geronimo.kernel.classloader.JarFileClassLoader id=default/globalsafe/1208718914237/war] actual: [org.apache.geronimo.kernel.classloader.JarFileClassLoader id=org.apache.geronimo.configs/jee-specs/2.0.2/car] at org.apache.geronimo.gbean.runtime.GBeanAttribute.init (GBeanAttribute.java:241) at org.apache.geronimo.gbean.runtime.GBeanInstance.init (GBeanInstance.java:245) at org.apache.geronimo.kernel.basic.BasicKernel.loadGBean (BasicKernel.java:354) at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration GBeans(ConfigurationUtil.java:433) at org.apache.geronimo.kernel.config.KernelConfigurationManager.start (KernelConfigurationManager.java:187) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf iguration(SimpleConfigurationManager.java:530) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf iguration(SimpleConfigurationManager.java:511) at org.apache.geronimo.kernel.config.SimpleConfigurationManager$ $FastClassByCGLIB$$ce77a924.invoke(generated) at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke (FastMethodInvoker.java:38) at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke (GBeanOperation.java:124) at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke (GBeanInstance.java:830) at org.apache.geronimo.gbean.runtime.RawInvoker.invoke (RawInvoker.java:57) at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke (RawOperationInvoker.java:35) at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept (ProxyMethodInterceptor.java:96) at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$ $dbf181f0.startConfiguration(generated) at org.apache.geronimo.deployment.plugin.local.StartCommand.run (StartCommand.java:67) at java.lang.Thread.run(Thread.java:619) -- View this message in context: http://www.nabble.com/inverse- classloading-error-tp16790691s134p16798992.html Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.