You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by asookazian2 <as...@gmail.com> on 2014/04/02 00:53:08 UTC
Installing EAR in karaf 3.0.0 getting exception
Hi I have an EAR with a JAR exposing SOAP web service and several other
supporting JARs. I tried to install on karaf 3.0.0 and getting this
exception please help thx. I converted the EJB to a POJO but keeping EAR
for now. Is there a better way?
2014-04-01 15:43:19,241 | ERROR | Local user karaf | ShellUtil
| 48 - org.apache.karaf.shell.console - 3.0.0 | Exception caught while
executing command
org.apache.karaf.shell.console.MultiException: Error installing bundles:
Unable to install bundle
file:/Users/arbisookazian/Documents/temp/RelationRegistry.jar
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_51]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
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.$BlueprintCommand109161592.execute(Unknown
Source)[48:org.apache.karaf.shell.console:3.0.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_51]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_51]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_51]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_51]
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.$BlueprintCommand109161592.execute(Unknown
Source)[48:org.apache.karaf.shell.console:3.0.0]
at
org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[48:org.apache.karaf.shell.console:3.0.0]
at
org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[48:org.apache.karaf.shell.console:3.0.0]
at
org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[48:org.apache.karaf.shell.console:3.0.0]
at
org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[48:org.apache.karaf.shell.console:3.0.0]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[48:org.apache.karaf.shell.console:3.0.0]
at
org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[48:org.apache.karaf.shell.console:3.0.0]
at
org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at
org.apache.karaf.shell.console.impl.jline.ConsoleImpl$DelegateSession.execute(ConsoleImpl.java:497)
at
org.apache.karaf.shell.console.impl.jline.ConsoleImpl.run(ConsoleImpl.java:198)
at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]
at
org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.doRun(ConsoleFactoryService.java:118)[48:org.apache.karaf.shell.console:3.0.0]
at
org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3$1.run(ConsoleFactoryService.java:109)
at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_51]
at
org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)[49:org.apache.karaf.jaas.modules:3.0.0]
at
org.apache.karaf.shell.console.impl.jline.ConsoleFactoryService$3.run(ConsoleFactoryService.java:107)[48:org.apache.karaf.shell.console:3.0.0]
Caused by: java.lang.Exception: Unable to install bundle
file:/Users/arbisookazian/Documents/temp/RelationRegistry.jar
at org.apache.karaf.bundle.command.Install.doExecute(Install.java:45)
... 32 more
Caused by: org.osgi.framework.BundleException: Could not create bundle
object.
at org.apache.felix.framework.Felix.installBundle(Felix.java:2952)
at
org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
at org.apache.karaf.bundle.command.Install.doExecute(Install.java:43)
... 32 more
Caused by: java.lang.NullPointerException
--
View this message in context: http://karaf.922171.n3.nabble.com/Installing-EAR-in-karaf-3-0-0-getting-exception-tp4032523.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Installing EAR in karaf 3.0.0 getting exception
Posted by Achim Nierbeck <bc...@googlemail.com>.
With self-packed jar/bundle/war/zips you have to be careful, if the
Manifest isn't the first entry the bundle, whatsoever can't be read.
regards, Achim
2014-04-02 19:23 GMT+02:00 asookazian2 <as...@gmail.com>:
> After some digging/experimentation, I ended up re-extracting fresh karaf
> 3.0.0. Deploying a known good mega-bundle WAR. Extracting and compressing
> using Mac Finder utility to .zip then convert to .war (via Get Info) and
> the
> install fails with same exception. So it's not the contents necessarily of
> the EAR/WAR that is causing the problem but the fact that I am modifying
> files and then compressing to WAR/EAR format via Mac Finder and then
> installing in karaf.
>
> I was going down this route b/c the META-INF/MANIFEST.MF file was not being
> added to the EAR file during maven build. I guess I need to troubleshoot
> that part so that the EAR is close to "perfect" prior to install so no need
> to extract then compress the EAR.
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Installing-EAR-in-karaf-3-0-0-getting-exception-tp4032523p4032541.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Software Architect / Project Manager / Scrum Master
Re: Installing EAR in karaf 3.0.0 getting exception
Posted by asookazian2 <as...@gmail.com>.
After some digging/experimentation, I ended up re-extracting fresh karaf
3.0.0. Deploying a known good mega-bundle WAR. Extracting and compressing
using Mac Finder utility to .zip then convert to .war (via Get Info) and the
install fails with same exception. So it's not the contents necessarily of
the EAR/WAR that is causing the problem but the fact that I am modifying
files and then compressing to WAR/EAR format via Mac Finder and then
installing in karaf.
I was going down this route b/c the META-INF/MANIFEST.MF file was not being
added to the EAR file during maven build. I guess I need to troubleshoot
that part so that the EAR is close to "perfect" prior to install so no need
to extract then compress the EAR.
--
View this message in context: http://karaf.922171.n3.nabble.com/Installing-EAR-in-karaf-3-0-0-getting-exception-tp4032523p4032541.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Installing EAR in karaf 3.0.0 getting exception
Posted by asookazian2 <as...@gmail.com>.
I learned that the file extension supposedly doesn't matter as we have
another EAR that installs fine on same version of karaf.
Foo --> META-INF --> MANIFEST.MF
Foo --> OSGI-INF --> blueprint --> blueprint.xml
Foo --> lib --> some supporting JARs
Foo --> web services JAR
where Foo is the EAR name....
--
View this message in context: http://karaf.922171.n3.nabble.com/Installing-EAR-in-karaf-3-0-0-getting-exception-tp4032523p4032524.html
Sent from the Karaf - User mailing list archive at Nabble.com.