Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » 3.6 migration issues
3.6 migration issues [message #1231473] Tue, 14 January 2014 19:11 Go to next message
Jacob Hameiri is currently offline Jacob Hameiri
Messages: 43
Registered: December 2010
Member
Hi,
I am trying to update to virgo 3.6 from 3.0.1 and I am facing a problem I cant fix.

I have a war bundle that will not deploy, this is the exception I am getting:

20:55:49.413 [start-signalling-1] ERROR o.s.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configuration': Initialization of bean failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/virgo/kernel/userregion/internal/equinox/KernelBundleClassLoader) previously initiated loading for a different type with name "org/osgi/framework/BundleContext"
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) ~[org.springframework.context_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) ~[org.springframework.context_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.access$301(AbstractDelegatedExecutionApplicationContext.java:60) ~[org.eclipse.gemini.blueprint.core-1.0.2.RELEASE.jar:1.0.2.RELEASE]
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$1.run(AbstractDelegatedExecutionApplicationContext.java:168) ~[org.eclipse.gemini.blueprint.core-1.0.2.RELEASE.jar:1.0.2.RELEASE]
	at org.eclipse.gemini.blueprint.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85) ~[org.eclipse.gemini.blueprint.core-1.0.2.RELEASE.jar:1.0.2.RELEASE]
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.normalRefresh(AbstractDelegatedExecutionApplicationContext.java:164) ~[org.eclipse.gemini.blueprint.core-1.0.2.RELEASE.jar:1.0.2.RELEASE]
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext$NoDependenciesWaitRefreshExecutor.refresh(AbstractDelegatedExecutionApplicationContext.java:78) ~[org.eclipse.gemini.blueprint.core-1.0.2.RELEASE.jar:1.0.2.RELEASE]
	at org.eclipse.gemini.blueprint.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:157) ~[org.eclipse.gemini.blueprint.core-1.0.2.RELEASE.jar:1.0.2.RELEASE]
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384) ~[org.springframework.web_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) ~[org.springframework.web_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) [org.springframework.web_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797) [org.apache.catalina_7.0.35.v201302131125.jar:na]
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291) [org.apache.catalina_7.0.35.v201302131125.jar:na]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [org.apache.catalina_7.0.35.v201302131125.jar:na]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) [org.apache.catalina_7.0.35.v201302131125.jar:na]
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) [org.apache.catalina_7.0.35.v201302131125.jar:na]
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633) [org.apache.catalina_7.0.35.v201302131125.jar:na]
	at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:125) [org.eclipse.gemini.web.tomcat_2.2.2.RELEASE.jar/:2.2.2.RELEASE]
	at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:109) [org.eclipse.gemini.web.core_2.2.2.RELEASE.jar/:2.2.2.RELEASE]
	at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:122) [org.eclipse.virgo.web.core_3.6.2.RELEASE.jar/:3.6.2.RELEASE]
	at org.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor.onStarted(StandardArtifactStateMonitor.java:271) [org.eclipse.virgo.kernel.deployer_3.6.2.RELEASE.jar:3.6.2.RELEASE]
	at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.java:319) [org.eclipse.virgo.kernel.deployer_3.6.2.RELEASE.jar:3.6.2.RELEASE]
	at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:316) [org.eclipse.virgo.kernel.deployer_3.6.2.RELEASE.jar:3.6.2.RELEASE]
	at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:252) [org.eclipse.virgo.kernel.deployer_3.6.2.RELEASE.jar:3.6.2.RELEASE]
	at org.eclipse.virgo.nano.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:140) [org.eclipse.virgo.nano.core_3.6.2.RELEASE.jar:3.6.2.RELEASE]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_32]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_32]
	at java.lang.Thread.run(Thread.java:662) [na:1.6.0_32]
Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/virgo/kernel/userregion/internal/equinox/KernelBundleClassLoader) previously initiated loading for a different type with name "org/osgi/framework/BundleContext"
	at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.6.0_32]
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) ~[na:1.6.0_32]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615) ~[na:1.6.0_32]
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.defineClass(KernelBundleClassLoader.java:251) ~[na:na]
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:632) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:614) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:568) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) ~[org.eclipse.osgi-3.6.0.v20100517.jar:na]
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:146) ~[na:na]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247) ~[na:1.6.0_32]
	at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.6.0_32]
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) ~[na:1.6.0_32]
	at java.lang.Class.privateGetPublicMethods(Class.java:2547) ~[na:1.6.0_32]
	at java.lang.Class.getMethods(Class.java:1410) ~[na:1.6.0_32]
	at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1284) ~[na:1.6.0_32]
	at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1158) ~[na:1.6.0_32]
	at java.beans.Introspector.getBeanInfo(Introspector.java:408) ~[na:1.6.0_32]
	at java.beans.Introspector.getBeanInfo(Introspector.java:167) ~[na:1.6.0_32]
	at java.beans.Introspector.getBeanInfo(Introspector.java:230) ~[na:1.6.0_32]
	at java.beans.Introspector.<init>(Introspector.java:389) ~[na:1.6.0_32]
	at java.beans.Introspector.getBeanInfo(Introspector.java:167) ~[na:1.6.0_32]
	at java.beans.Introspector.getBeanInfo(Introspector.java:230) ~[na:1.6.0_32]
	at java.beans.Introspector.<init>(Introspector.java:389) ~[na:1.6.0_32]
	at java.beans.Introspector.getBeanInfo(Introspector.java:167) ~[na:1.6.0_32]
	at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:224) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:149) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:324) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptorInternal(BeanWrapperImpl.java:354) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.BeanWrapperImpl.isWritableProperty(BeanWrapperImpl.java:430) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1362) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) ~[org.springframework.beans_3.1.0.RELEASE.jar:3.1.0.RELEASE]
	... 34 common frames omitted



this is my manifest:


Manifest-Version: 1.0
Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[
 1.1.2,1.3)",org.eclipse.jetty.server
Bundle-Vendor: rtyo Sources
Bundle-Version: 1.1.1.1
Tool: Bundlor 1.1.2.RELEASE
Import-Library: org.springframework.spring
Bundle-Name: Rtyo File Server
Bundle-ManifestVersion: 2
Import-Package: javax.servlet,javax.servlet.http,org.apache.commons.co
 nfiguration,org.apache.commons.fileupload,org.apache.commons.fileuplo
 ad.disk,org.apache.commons.fileupload.servlet,org.apache.commons.io,o
 rg.apache.commons.lang,org.eclipse.gemini.blueprint.context,org.eclip
 se.jetty.util,org.eclipse.jetty.util.resource,org.eclipse.virgo.web.d
 m,org.slf4j,org.springframework.stereotype,org.springframework.util,o
 rg.springframework.web.bind.annotation,org.springframework.web.contex
 t
Bundle-SymbolicName: rtyo.fileserver
Web-ContextPath: repository



and this is my context file:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
	<osgi:reference id="configuration"
		interface="org.apache.commons.configuration.Configuration" />
	<osgi:reference id="props" interface="java.util.Properties" />
</beans>



Any ideas ?
Re: 3.6 migration issues [message #1231513 is a reply to message #1231473] Tue, 14 January 2014 21:25 Go to previous messageGo to next message
Jacob Hameiri is currently offline Jacob Hameiri
Messages: 43
Registered: December 2010
Member
this works:

Manifest-Version: 1.0
Import-Bundle: com.springsource.org.apache.taglibs.standard;version="[
 1.1.2,2.0)",org.eclipse.jetty.server
Bundle-Vendor: rtyo  Sources
Bundle-ClassPath: .,WEB-INF/classes
Bundle-Version: 1.1.1.1
Tool: Bundlor 1.1.2.RELEASE
Import-Library: org.springframework.spring;version="[3.0, 3.5)"
Bundle-Name: rtyo File Server
Bundle-ManifestVersion: 2
Import-Package: javax.servlet;version="[3.0.0, 3.1.0)",javax.servlet.h
 ttp,javax.servlet.jsp.jstl.core;version="[1.2.0, 2.0.0)",org.apache.c
 ommons.fileupload,org.apache.commons.fileupload.disk,org.apache.commo
 ns.fileupload.servlet,org.apache.commons.io,org.apache.commons.lang,o
 rg.eclipse.gemini.blueprint.service.importer;version="[1.0.2.RELEASE,
 1.0.2.RELEASE]",org.eclipse.gemini.blueprint.service.importer.support
 ;version="[1.0.2.RELEASE,1.0.2.RELEASE]",org.eclipse.jetty.util,org.e
 clipse.jetty.util.resource,org.eclipse.virgo.web.dm;version="[3.0.0, 
 4.0.0)",org.slf4j,org.springframework.stereotype;version="[3.0, 3.5)"
 ,org.springframework.util;version="[3.0, 3.5)",org.springframework.we
 b.bind.annotation;version="[3.0, 3.5)",org.springframework.web.contex
 t;version="[3.0, 3.5)"
Bundle-SymbolicName: rtyo.fileserver
Web-ContextPath: repository




Re: 3.6 migration issues [message #1231717 is a reply to message #1231513] Wed, 15 January 2014 08:44 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
I don't know what's causing the problem, but the loader constraint violation shows that there are two class loaders loading BundleContext and the corresponding instances of the BundleContext class are somehow colliding across a call. I notice that you define a bundle classpath in the manifest that works, so perhaps that's part of the cause. It seems that you should define bundle classpath, so presumably you can live with the working manifest?
Re: 3.6 migration issues [message #1231737 is a reply to message #1231717] Wed, 15 January 2014 09:23 Go to previous messageGo to next message
Jacob Hameiri is currently offline Jacob Hameiri
Messages: 43
Registered: December 2010
Member
yes, I can live with this, but my migration process is very hard for some reason, can you please take a look at this : http://www.eclipse.org/forums/index.php/t/637404/

thanks
Re: 3.6 migration issues [message #1231743 is a reply to message #1231737] Wed, 15 January 2014 09:35 Go to previous message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
I already looked at that post and drew a blank. I'm no expert on Gemini Blueprint, but it was a significant upgrade, so anything's possible.
Previous Topic:more 3.6 update issues
Next Topic:JBoss AS drops OSGI support
Goto Forum:
  


Current Time: Mon Oct 20 18:03:22 GMT 2014

Powered by FUDForum. Page generated in 0.01949 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software