Re: java.lang.LinkageError: Class org/apache/xbean/finder/ClassFinder violates loader constraints
Another thing I am noticing is that module.getClassFinder().getClass().getClassLoader() returns configs/j2ee-deployer/2.1.3/car classLoader, whereas ClassFinder.class.getClassLoader() return configs/openejb/2.1.3/car classLoader. On Tue, Nov 18, 2008 at 4:53 PM, Vamsavardhana Reddy [EMAIL PROTECTED]wrote: I am trying to invoke ClassFinder code from TuscanyModuleBuilderExtension I am creating for the Tuscany plugin. I have the following code ClassFinder cf = module.getClassFinder(); ListClass annotatedClasses = cf.findAnnotatedClasses(org.osoa.sca.annotations.Reference.class); The call in the second line above is throwing a LinkageError. Stack trace is given below. java.lang.LinkageError: Class org/apache/xbean/finder/ClassFinder violates loader constraints at org.apache.geronimo.tuscany.TuscanyModuleBuilderExtension.addGBeans(TuscanyModuleBuilderExtension.java:154) at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:497) at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165) at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133) 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.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116) at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61) at java.lang.Thread.run(Thread.java:595) My guess is that it is some class loader issue. Any ideas on how to fix this problem? -- Vamsi -- Vamsi
Re: java.lang.LinkageError: Class org/apache/xbean/finder/ClassFinder violates loader constraints
I think I ran into this problem while changing trunk to try to use transitive dependencies and introduced the xbean-finder classloader plugin to solve it. I think you'll have to move your development to trunk or backport the fix. Personally I'd use trunk. thanks david jencks On Dec 5, 2008, at 3:27 AM, Vamsavardhana Reddy wrote: Another thing I am noticing is that module.getClassFinder().getClass().getClassLoader() returns configs/ j2ee-deployer/2.1.3/car classLoader, whereas ClassFinder.class.getClassLoader() return configs/openejb/2.1.3/ car classLoader. On Tue, Nov 18, 2008 at 4:53 PM, Vamsavardhana Reddy [EMAIL PROTECTED] wrote: I am trying to invoke ClassFinder code from TuscanyModuleBuilderExtension I am creating for the Tuscany plugin. I have the following code ClassFinder cf = module.getClassFinder(); ListClass annotatedClasses = cf.findAnnotatedClasses(org.osoa.sca.annotations.Reference.class); The call in the second line above is throwing a LinkageError. Stack trace is given below. java.lang.LinkageError: Class org/apache/xbean/finder/ClassFinder violates loader constraints at org .apache .geronimo .tuscany .TuscanyModuleBuilderExtension .addGBeans(TuscanyModuleBuilderExtension.java:154) at org .apache .geronimo .tomcat .deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java: 497) at org .apache .geronimo .j2ee .deployment .SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165) at org .apache .geronimo .j2ee .deployment .EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java: 254) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java: 133) 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 .deployment .plugin .local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116) at org .apache .geronimo .deployment .plugin.local.DistributeCommand.run(DistributeCommand.java:61) at java.lang.Thread.run(Thread.java:595) My guess is that it is some class loader issue. Any ideas on how to fix this problem? -- Vamsi -- Vamsi
Re: java.lang.LinkageError: Class org/apache/xbean/finder/ClassFinder violates loader constraints
The openejb classloader is getting into the way because of the plugin's dependency on j2ee-corba-yoko/xxx/car. This is a dependency that is not required as of now (may be it will be reuquired if ejb binding is used). Removing this dependency got me past the linkage error. ++Vamsi On Fri, Dec 5, 2008 at 11:30 PM, David Jencks [EMAIL PROTECTED]wrote: I think I ran into this problem while changing trunk to try to use transitive dependencies and introduced the xbean-finder classloader plugin to solve it. I think you'll have to move your development to trunk or backport the fix. Personally I'd use trunk. thanks david jencks On Dec 5, 2008, at 3:27 AM, Vamsavardhana Reddy wrote: Another thing I am noticing is that module.getClassFinder().getClass().getClassLoader() returns configs/j2ee-deployer/2.1.3/car classLoader, whereas ClassFinder.class.getClassLoader() return configs/openejb/2.1.3/car classLoader. On Tue, Nov 18, 2008 at 4:53 PM, Vamsavardhana Reddy [EMAIL PROTECTED]wrote: I am trying to invoke ClassFinder code from TuscanyModuleBuilderExtension I am creating for the Tuscany plugin. I have the following code ClassFinder cf = module.getClassFinder(); ListClass annotatedClasses = cf.findAnnotatedClasses(org.osoa.sca.annotations.Reference.class); The call in the second line above is throwing a LinkageError. Stack trace is given below. java.lang.LinkageError: Class org/apache/xbean/finder/ClassFinder violates loader constraints at org.apache.geronimo.tuscany.TuscanyModuleBuilderExtension.addGBeans(TuscanyModuleBuilderExtension.java:154) at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:497) at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165) at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254) at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133) 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.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116) at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61) at java.lang.Thread.run(Thread.java:595) My guess is that it is some class loader issue. Any ideas on how to fix this problem? -- Vamsi -- Vamsi -- Vamsi