camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: java.lang.VerifyError: Cannot inherit from final class
Date Sat, 19 Dec 2009 07:46:17 GMT
Hi

It smells like having mixed .jars with different Camel versions. Make
100% sure that all Camel jars are v2.1.0.


On Fri, Dec 18, 2009 at 10:20 PM, Gedaliya <dkatz@schonfeld.com> wrote:
>
> I am trying to upgrade from Camel 2.0-M2 to 2.1.0
>
> In 2.0-M2 the following code works just fine. In 2.1.0 it does not:
>
> [...]
>
> CamelContext c = (CamelContext)applicationContext.getBean("camel");
> // Get the endpoints for this camel context
> String endPoints[] = applicationContext.getBeanNamesForType(Endpoint.class);
> // Find the time endpoints
> for (int i=0; i< endPoints.length; i++)
> {
>   // If the endpoint is a timerendpoint, create a file object for it
>   // and put it in the array
>   endPoint = (Endpoint)applicationContext.getBean(endPoints[i]);
>
> [...]
>
> In Camel 2.1.0 it throws an exception:
>
> Caused by: java.lang.VerifyError: Cannot inherit from final class
>        at java.lang.ClassLoader.defineClass1(Native Method)
>        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>        at
> org.apache.camel.impl.DefaultPackageScanClassResolver.addIfMatching(DefaultPackageScanClassResolver.java:405)
>        at
> org.apache.camel.impl.DefaultPackageScanClassResolver.loadImplementationsInDirectory(DefaultPackageScanClassResolver.java:347)
>        at
> org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:256)
>        at
> org.apache.camel.impl.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:180)
>        at
> org.apache.camel.impl.DefaultPackageScanClassResolver.findAnnotated(DefaultPackageScanClassResolver.java:100)
>        at
> org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:63)
>        at
> org.apache.camel.impl.converter.DefaultTypeConverter.checkLoaded(DefaultTypeConverter.java:379)
>        at
> org.apache.camel.impl.converter.DefaultTypeConverter.doConvertTo(DefaultTypeConverter.java:160)
>        at
> org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:120)
>        at
> org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:113)
>        at
> org.apache.camel.util.IntrospectionSupport.convert(IntrospectionSupport.java:277)
>        at
> org.apache.camel.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:233)
>        at
> org.apache.camel.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:200)
>        at
> org.apache.camel.util.EndpointHelper.setProperties(EndpointHelper.java:152)
>        at
> org.apache.camel.impl.DefaultComponent.setProperties(DefaultComponent.java:229)
>        at
> org.apache.camel.component.jetty.JettyHttpComponent.createEndpoint(JettyHttpComponent.java:125)
>        at
> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:78)
>        at
> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:416)
>        at
> org.apache.camel.spring.CamelEndpointFactoryBean.createEndpoint(CamelEndpointFactoryBean.java:96)
>        at
> org.apache.camel.spring.CamelEndpointFactoryBean.isSingleton(CamelEndpointFactoryBean.java:62)
>        at
> org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:87)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1288)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:217)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>        at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>        at
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
>        at
> com.schonfeld.eventhub.controller.PollFileController.init(PollFileController.java:68)
>
> [...]
>
> --
> View this message in context: http://old.nabble.com/java.lang.VerifyError%3A-Cannot-inherit-from-final-class-tp26849871p26849871.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message