You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Justin Qiu (JIRA)" <ji...@apache.org> on 2015/06/03 12:11:50 UTC

[jira] [Commented] (KARAF-3241) WAR fails to deploy due to duplicate package import

    [ https://issues.apache.org/jira/browse/KARAF-3241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14570587#comment-14570587 ] 

Justin Qiu commented on KARAF-3241:
-----------------------------------

I just met the same issue. Since I am using servicemix 5.4 whose karaf version is 2.3, so I can't switch the bug fixing release easily. Is there any workaround can help me run a war under servicemix 5.4?

> WAR fails to deploy due to duplicate package import
> ---------------------------------------------------
>
>                 Key: KARAF-3241
>                 URL: https://issues.apache.org/jira/browse/KARAF-3241
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-webcontainer
>    Affects Versions: 3.0.1, 3.0.2
>            Reporter: Harald Wellmann
>             Fix For: 3.0.4
>
>
> With the {{war}} feature installed, a plain old WAR copied to the {{deploy}} directory may fail to deploy due to duplicate package imports in the on-the-fly manifest.
> The same problem occurs when installing the bundle interactively using the war: protocol, e.g.
> {code}
> bundle:install war:mvn:org.apache.wicket/wicket-examples/1.5.3/war
> {code}
> Stacktrace:
> {noformat}
> 2014-09-18 15:33:04,031 | ERROR | Local user karaf | ShellUtil                        | 37 - org.apache.karaf.shell.console - 3.0.1 | Exception caught while executing command
> org.apache.karaf.shell.console.MultiException: Error installing bundles:
> 	Unable to install bundle war:mvn:org.apache.wicket/wicket-examples/1.5.3/war
> 	at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:92)
> 	at org.apache.karaf.bundle.command.Install.doExecute(Install.java:69)
> 	at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
> 	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
> 	at org.apache.karaf.shell.commands.basic.AbstractCommand.execute(AbstractCommand.java:33)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_67]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_67]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_67]
> 	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_67]
> 	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
> 	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
> 	at org.apache.karaf.shell.console.commands.$BlueprintCommand2053417194.execute(Unknown Source)[37:org.apache.karaf.shell.console:3.0.1]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_67]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_67]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_67]
> 	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_67]
> 	at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:54)
> 	at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:119)
> 	at org.apache.karaf.shell.console.commands.$BlueprintCommand2053417194.execute(Unknown Source)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
> 	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl$DelegateSession.execute(ConsoleImpl.java:521)
> 	at org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:212)
> 	at java.lang.Thread.run(Thread.java:745)[:1.7.0_67]
> 	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:126)[37:org.apache.karaf.shell.console:3.0.1]
> 	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:117)
> 	at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_67]
> 	at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)[38:org.apache.karaf.jaas.modules:3.0.1]
> 	at org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:115)[37:org.apache.karaf.shell.console:3.0.1]
> Caused by: java.lang.Exception: Unable to install bundle war:mvn:org.apache.wicket/wicket-examples/1.5.3/war
> 	at org.apache.karaf.bundle.command.Install.doExecute(Install.java:45)
> 	... 32 more
> Caused by: org.osgi.framework.BundleException: Duplicate import: javax.servlet.jsp.el
> 	at org.apache.felix.framework.util.manifestparser.ManifestParser.normalizeImportClauses(ManifestParser.java:342)
> 	at org.apache.felix.framework.util.manifestparser.ManifestParser.<init>(ManifestParser.java:163)
> 	at org.apache.felix.framework.BundleRevisionImpl.<init>(BundleRevisionImpl.java:118)
> 	at org.apache.felix.framework.BundleImpl.createRevision(BundleImpl.java:1199)
> 	at org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:96)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2899)
> 	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
> 	at org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
> 	... 32 more
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)