Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Problems deploying war file
Problems deploying war file [message #588049] 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$FatalAssertio nException: input packageImports must not contain duplicate items
at org.springframework.beans.BeanUtils.instantiateClass(BeanUti ls.java:141)
at org.springframework.beans.factory.support.SimpleInstantiatio nStrategy.instantiate(SimpleInstantiationStrategy.java:72)
at org.springframework.beans.factory.support.AbstractAutowireCa pableBeanFactory.instantiateBean(AbstractAutowireCapableBean Factory.java:948)
... 81 common frames omitted
Caused by: org.eclipse.virgo.kernel.serviceability.Assert$FatalAssertio nException: 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.convertImportedPackageListToM ap(AbstractTrackedPackageImports.java:322)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion .BundleTrackedPackageImports.getInitialImportedPackages(Bund leTrackedPackageImports.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(StandardTracked PackageImportsFactory.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(ImportExpansion Handler.java:150)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion .ImportExpansionHandler.mergePromotedImports(ImportExpansion Handler.java:143)
at org.eclipse.virgo.kernel.userregion.internal.importexpansion .ImportExpansionHandler.expandImports(ImportExpansionHandler .java:121)
at org.eclipse.virgo.kernel.userregion.internal.equinox.Transfo rmedManifestProvidingBundleFileWrapper$TransformedManifestPr ovidingBundleFile.getEntry(TransformedManifestProvidingBundl eFileWrapper.java:160)
at org.eclipse.osgi.baseadaptor.bundlefile.BundleFileWrapperCha in.getEntry(BundleFileWrapperChain.java:44)
at org.eclipse.core.runtime.internal.adaptor.ClasspathManifest. getManifest(ClasspathManifest.java:49)
at org.eclipse.core.runtime.internal.adaptor.EclipseClassLoadin gHook.processClass(EclipseClassLoadingHook.java:83)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineC lass(ClasspathManager.java:571)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findCla ssImpl(ClasspathManager.java:546)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClassImpl(ClasspathManager.java:477)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass_LockClassLoader(ClasspathManager.java:465)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLoc alClass(ClasspathManager.java:445)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.fin dLocalClass(DefaultClassLoader.java:211)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass (BundleLoader.java:381)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:457)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:398)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:105)
at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelB undleClassLoader.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(Nativ e Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Native ConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(De legatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:5 13)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUti ls.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 #588066 is a reply to message #588049] 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:Problems deploying war file
Next Topic:ClassNotFoundException inside PAR
Goto Forum:
  


Current Time: Tue Sep 16 09:28:13 GMT 2014

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

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