war works in Tomcat, fails in Virgo with "packageImports must not contain duplicate items" [message #669265] |
Mon, 09 May 2011 15:58 |
Ryan Messages: 17 Registered: May 2011 |
Junior Member |
|
|
I'm new to Virgo and fairly new to OSGi. I'm trying to deploy an existing WAR to Virgo, which the docs say is supported, but it fails with an error that seems to be saying someone is trying to import the same package twice. The relevant stacktrace is at the end of this message. The Assert$FatalAssertionException shown is the root cause of a org.springframework.beans.BeanInstantiationException when one of my Spring contexts is starting. You can see that a class is being loaded, which gets into the Virgo ClassLoader. The class in question is StaticLoggerBinder from slf4j. From there, I can only guess what's happening. I found this post from last year with exactly the same problem, but I'm not sure what to do with the reply:
http://www.eclipse.org/forums/index.php/m/588049/
It's suggested that there's an import statement in a manifest file that's causing this duplicate import. My WAR doesn't have a manifest file. Would the jars in WEB-INF/lib affect this? What would I look for? If two jars inside the war import the same package, will that cause this error? How can I possibly fix that?
Caused by: org.eclipse.virgo.kernel.serviceability.Assert$FatalAssertionException: input packageImports must not contain duplicate items
at org.eclipse.virgo.kernel.serviceability.Assert.isNull(Assert.java:103)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion.AbstractTrackedPackageImports.convertImportedPackageListToMap(AbstractTrackedPackageImports.java:322)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion.BundleTrackedPackageImports.getInitialImportedPackages(BundleTrackedPackageImports.java:58)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion.BundleTrackedPackageImports.<init>(BundleTrackedPackageImports.java:43)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion.StandardTrackedPackageImportsFactory.create(StandardTrackedPackageImportsFactory.java:37)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion.ImportExpansionHandler.mergeImports(ImportExpansionHandler.java:160)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion.ImportExpansionHandler.mergePromotedImports(ImportExpansionHandler.java:151)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion.ImportExpansionHandler.mergePromotedImports(ImportExpansionHandler.java:144)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion.ImportExpansionHandler.expandImports(ImportExpansionHandler.java:121)
at org.eclipse.virgo.kernel.userregion.internal.equinox.TransformedManifestProvidingBundleFileWrapper$TransformedManifestProvidingBundleFile.getEntry(TransformedManifestProvidingBundleFileWrapper.java:160)
at org.eclipse.osgi.baseadaptor.bundlefile.BundleFileWrapperChain.getEntry(BundleFileWrapperChain.java:44)
at org.eclipse.core.runtime.internal.adaptor.ClasspathManifest.getManifest(ClasspathManifest.java:49)
at org.eclipse.core.runtime.internal.adaptor.EclipseClassLoadingHook.processClass(EclipseClassLoadingHook.java:87)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:575)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:550)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:481)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:469)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:393)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:469)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:135)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:230)
at org.slf4j.LoggerFactory.bind(LoggerFactory.java:138)
at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:112)
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:275)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248)
...
[Updated on: Mon, 09 May 2011 16:08] Report message to a moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04054 seconds