Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Problems deploying war file
Problems deploying war file [message #546176] Mon, 12 July 2010 01:58 Go to next message
Imran Khan is currently offline Imran Khan
Messages: 2
Registered: July 2010
Junior Member
Hi,

I am new to the osgi/virgo environment, so please excuse my ignorance.

I am trying to deploy a standard war file which makes use of standard spring annotations, mvc etc. I am able to deploy it on standard tomcat 6.024. However I get a spring bean creation exception when I deploy it to virgo.

The stacktrace is as follows:

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.ogs.gaming.dao.impl.CasinoDaoImpl]: Constructor threw exception; nested exception is org.eclipse.virgo.kernel.serviceability.Assert$FatalAssertionException: input packageImports must not contain duplicate items
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:72)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:948)
	... 81 common frames omitted
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:159)
	at org.eclipse.virgo.kernel.userregion.internal.importexpansion.ImportExpansionHandler.mergePromotedImports(ImportExpansionHandler.java:150)
	at org.eclipse.virgo.kernel.userregion.internal.importexpansion.ImportExpansionHandler.mergePromotedImports(ImportExpansionHandler.java:143)
	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:83)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:571)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:546)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:477)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:465)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:445)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:381)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:457)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:135)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at com.ogs.gaming.dao.impl.CasinoDaoImpl.<init>(CasinoDaoImpl.java:28)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
	... 83 common frames omitted


Can someone tell me specifically what "input packageImports must not contain duplicate items" means?

Thanks,

Imran
Re: Problems deploying war file [message #546206 is a reply to message #546176] Mon, 12 July 2010 07:45 Go to previous message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
The error is because some MANIFEST.MF, presumably in the WAR file, has import-package (or possibly import-bundle or import-library) headers which import the same package more than once. I'm not sure this should actually be an error whenever it is encountered, but that's the current behaviour and you should be able to change the manifest to avoid the problem.
Previous Topic:Why Don't They Do Bundles This Way Instead?
Next Topic:Problems deploying war file
Goto Forum:
  


Current Time: Tue Sep 16 11:40:55 GMT 2014

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

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