Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6
ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #998047] Wed, 09 January 2013 04:00 Go to next message
Jean-Pierre Bergamin is currently offline Jean-Pierre Bergamin
Messages: 51
Registered: March 2011
Location: Zürich, CH
Member
Hello everyone

We are upgrading Virgo from 3.0.3 to 3.6 and face a ClassNotFoundException we cannot explain. The same setup worked in 3.0.3 though.

[2013-01-09 09:35:45.814] start-signalling-2           <DE0006E> Start failed for bundle 'net.junisphere.eranger.core.config' version '1.0.0.RELEASE'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dbUpdateExecutor' defined in URL [bundleentry://164.fwk1495622108/META-INF/spring/db-update-context.xml]: Cannot create inner bean 'net.junisphere.eranger.domain.internal.neo4j.dbupdate.VersionUpdate#dd63e54' of type [net.junisphere.eranger.domain.internal.neo4j.dbupdate.VersionUpdate] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.junisphere.eranger.domain.internal.neo4j.dbupdate.VersionUpdate#dd63e54' defined in URL [bundleentry://164.fwk1495622108/META-INF/spring/db-update-context.xml]: Cannot create inner bean 'net.junisphere.eranger.domain.internal.neo4j.dbupdate.task.AddUuidToPropertyValueNodes#2e5b9f90' of type [net.junisphere.eranger.domain.internal.neo4j.dbupdate.task.AddUuidToPropertyValueNodes] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.junisphere.eranger.domain.internal.neo4j.dbupdate.task.AddUuidToPropertyValueNodes#2e5b9f90': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.data.neo4j.support.Neo4jTemplate net.junisphere.eranger.domain.internal.neo4j.dbupdate.AbstractTask.neo4j; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customNeo4jConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.validation.Validator org.springframework.data.neo4j.config.Neo4jConfiguration.validator; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in URL [bundleentry://164.fwk1495622108/META-INF/spring/module-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type javax.validation.spi.ValidationProvider not present
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:60)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:325)
	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:290)
	at org.eclipse.gemini.blueprint.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:137)
	at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.junisphere.eranger.domain.internal.neo4j.dbupdate.VersionUpdate#dd63e54' defined in URL [bundleentry://164.fwk1495622108/META-INF/spring/db-update-context.xml]: Cannot create inner bean 'net.junisphere.eranger.domain.internal.neo4j.dbupdate.task.AddUuidToPropertyValueNodes#2e5b9f90' of type [net.junisphere.eranger.domain.internal.neo4j.dbupdate.task.AddUuidToPropertyValueNodes] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.junisphere.eranger.domain.internal.neo4j.dbupdate.task.AddUuidToPropertyValueNodes#2e5b9f90': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.data.neo4j.support.Neo4jTemplate net.junisphere.eranger.domain.internal.neo4j.dbupdate.AbstractTask.neo4j; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customNeo4jConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.validation.Validator org.springframework.data.neo4j.config.Neo4jConfiguration.validator; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in URL [bundleentry://164.fwk1495622108/META-INF/spring/module-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type javax.validation.spi.ValidationProvider not present
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
	... 24 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.junisphere.eranger.domain.internal.neo4j.dbupdate.task.AddUuidToPropertyValueNodes#2e5b9f90': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.data.neo4j.support.Neo4jTemplate net.junisphere.eranger.domain.internal.neo4j.dbupdate.AbstractTask.neo4j; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customNeo4jConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.validation.Validator org.springframework.data.neo4j.config.Neo4jConfiguration.validator; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in URL [bundleentry://164.fwk1495622108/META-INF/spring/module-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type javax.validation.spi.ValidationProvider not present
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
	... 34 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.data.neo4j.support.Neo4jTemplate net.junisphere.eranger.domain.internal.neo4j.dbupdate.AbstractTask.neo4j; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customNeo4jConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.validation.Validator org.springframework.data.neo4j.config.Neo4jConfiguration.validator; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in URL [bundleentry://164.fwk1495622108/META-INF/spring/module-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type javax.validation.spi.ValidationProvider not present
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:506)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
	... 38 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customNeo4jConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.validation.Validator org.springframework.data.neo4j.config.Neo4jConfiguration.validator; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in URL [bundleentry://164.fwk1495622108/META-INF/spring/module-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type javax.validation.spi.ValidationProvider not present
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:353)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
	... 40 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private javax.validation.Validator org.springframework.data.neo4j.config.Neo4jConfiguration.validator; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in URL [bundleentry://164.fwk1495622108/META-INF/spring/module-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type javax.validation.spi.ValidationProvider not present
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:506)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
	... 60 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validator' defined in URL [bundleentry://164.fwk1495622108/META-INF/spring/module-context.xml]: Initialization of bean failed; nested exception is java.lang.TypeNotPresentException: Type javax.validation.spi.ValidationProvider not present
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:848)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:790)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707)
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478)
	... 62 common frames omitted
Caused by: java.lang.TypeNotPresentException: Type javax.validation.spi.ValidationProvider not present
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
	at sun.reflect.generics.reflectiveObjects.WildcardTypeImpl.getUpperBounds(WildcardTypeImpl.java:130)
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:327)
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:362)
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:321)
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:362)
	at com.sun.beans.TypeResolver.resolve(TypeResolver.java:172)
	at com.sun.beans.TypeResolver.resolveInClass(TypeResolver.java:93)
	at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:387)
	at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:114)
	at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:72)
	at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:56)
	at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1130)
	at java.beans.Introspector.getBeanInfo(Introspector.java:414)
	at java.beans.Introspector.getBeanInfo(Introspector.java:161)
	at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:224)
	at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:149)
	at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:324)
	at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:331)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1242)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1101)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
	... 71 common frames omitted
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: javax.validation.spi.ValidationProvider in KernelBundleClassLoader: [bundle=org.springframework.context_3.1.0.RELEASE]
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:139)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
	... 94 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.validation.spi.ValidationProvider
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:135)
	... 98 common frames omitted


The class javax.validation.spi.ValidationProvider is available as shown in the console:

osgi> clhas javax.validation.spi.ValidationProvider

Bundles containing [javax/validation/spi/ValidationProvider]
  84    com.springsource.javax.validation
        /javax/validation/spi/ValidationProvider.class


Any clues why this class cannot be loaded in Virgo 3.6?


Best regards,
James
Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #998287 is a reply to message #998047] Wed, 09 January 2013 13:20 Go to previous messageGo to next message
Chris Frost is currently offline Chris Frost
Messages: 227
Registered: January 2010
Location: Southampton, England
Senior Member

Hi,

We don't ship the com.springsource.javax.validation bundle with either version of Virgo so can you tell me how you are making it available to your application, using the ext/use repositories. Also, which packaging of Virgo are you running on. Virgo Tomcat/Kernel/Nano etc..?

There has been a lot of change in this area but I can't see anything specific to that bundle or package so I can't think of anything obvious. I will ask a colleague to have a look as well but the information asked for above will be helpful.

Chris.


------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #998327 is a reply to message #998287] Wed, 09 January 2013 15:06 Go to previous messageGo to next message
Jean-Pierre Bergamin is currently offline Jean-Pierre Bergamin
Messages: 51
Registered: March 2011
Location: Zürich, CH
Member
Hi Chris

We provide the com.springsource.javax.validation bundle in the repository/usr repo on Virgo Tomcat 3.6.0.
Our bundle that uses the validation bundle, explicitely imports the javax.validation.spi package, because bundlor is not able to resolve it automatically.

Well... What differs from our current deployment on Virgo 3.0 is that we now are using the spring version 3.1 that comes with virgo 3.6. But the classloading problem still is strange. It somehow sees to be a similiar issue that has been fixed quite a while ago: https://issuetracker.springsource.com/browse/DMS-1930

We're glad for any hints how we can fix this class loading issue.


Thanks so far,
James
Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #998811 is a reply to message #998327] Thu, 10 January 2013 13:23 Go to previous messageGo to next message
Chris Frost is currently offline Chris Frost
Messages: 227
Registered: January 2010
Location: Southampton, England
Senior Member

Hi,

I have had an initial look at this and I can't see anything obvious. I have asked a question on the mailing dev mailing list to get some of the other committers to have a look, one of them may know more than me.

Chris.


------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #999074 is a reply to message #998047] Fri, 11 January 2013 04:25 Go to previous messageGo to next message
Hristo Iliev is currently offline Hristo Iliev
Messages: 156
Registered: May 2010
Location: Sofia, Bulgaria
Senior Member

Hi James,

Can you please try clload command as well? It will check if your application loader can access the class.

Regards,
Hristo Iliev
Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #999085 is a reply to message #999074] Fri, 11 January 2013 04:56 Go to previous messageGo to next message
Chris Frost is currently offline Chris Frost
Messages: 227
Registered: January 2010
Location: Southampton, England
Senior Member

Also, one of the other committers has reported the same problem, ClassNotFoundException: javax.validation.spi.ValidationProvider but not all the time, say 4 out of every 5 times? Could you try this a few times and see what happens. If you get this to work just once then it will confirm the problem as a timing issue.

Thanks, Chris.


------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #999164 is a reply to message #999085] Fri, 11 January 2013 08:41 Go to previous messageGo to next message
Florian Waibel is currently offline Florian Waibel
Messages: 86
Registered: June 2010
Member
Seems to make a difference which JVM is used:

Running with OpenJDK Runtime Environment i wasn't able to start the application (tried about 10 times)
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

results in
Caused by: java.lang.ClassNotFoundException: javax.validation.spi.ValidationProvider
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:135)
        ... 43 common frames omitted


Running with Java(TM) SE Runtime Environment
java version "1.6.0_38"
Java(TM) SE Runtime Environment (build 1.6.0_38-b05)
Java HotSpot(TM) Server VM (build 20.13-b02, mixed mode)


I got in about 75% of the attempts the different exception below and in the other 25% Virgo succeeds in launching the application/plan.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0': Invocation of init method failed; nested exception is javax.validation.ValidationException: Unable to find a default provider

[Updated on: Fri, 11 January 2013 09:10]

Report message to a moderator

Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #1000272 is a reply to message #999164] Mon, 14 January 2013 07:07 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Check that the setting of WABHeaders is the same on your 3.0.3 and 3.6 installs.
Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #1000323 is a reply to message #999085] Mon, 14 January 2013 09:26 Go to previous messageGo to next message
Jean-Pierre Bergamin is currently offline Jean-Pierre Bergamin
Messages: 51
Registered: March 2011
Location: Zürich, CH
Member
Chris Frost wrote on Fri, 11 January 2013 04:56
Could you try this a few times and see what happens. If you get this to work just once then it will confirm the problem as a timing issue.

We tried it dozens of times, but it never worked - both on Windows 7 and on Ubuntu. We tried it with Oracles Java 1.6.0_37 and 1.7.0_10. So it does not seem to be a timing issue.

Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #1000326 is a reply to message #1000272] Mon, 14 January 2013 09:32 Go to previous messageGo to next message
Jean-Pierre Bergamin is currently offline Jean-Pierre Bergamin
Messages: 51
Registered: March 2011
Location: Zürich, CH
Member
Glyn Normington wrote on Mon, 14 January 2013 07:07
Check that the setting of WABHeaders is the same on your 3.0.3 and 3.6 installs.

The settings on both virgo versions is "WABHeaders=strict". The bundle in question also is a "normal" bundle and not a Web Application Bundle.
Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #1000329 is a reply to message #1000326] Mon, 14 January 2013 09:39 Go to previous messageGo to next message
Jean-Pierre Bergamin is currently offline Jean-Pierre Bergamin
Messages: 51
Registered: March 2011
Location: Zürich, CH
Member
I allowed myself to open a bug report for this: https://bugs.eclipse.org/bugs/show_bug.cgi?id=398081

I set up a minimal sample project that shows this behaviour: https://bitbucket.org/ractive/validation-test
Re: ClassNotFoundException: javax.validation.spi.ValidationProvider after upgrade to Virgo 3.6 [message #1000693 is a reply to message #1000329] Tue, 15 January 2013 04:16 Go to previous message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
Thanks. Let's continue the discussion in the bug as there does seem to be a reproducible problem.
Previous Topic:ActiveMQ Integration
Next Topic:IllegalArgumentException: MALFORMED while processing my servlet XML
Goto Forum:
  


Current Time: Sun Apr 20 07:00:24 EDT 2014

Powered by FUDForum. Page generated in 0.03782 seconds