0

I am creating a simple Bundle in Eclipse Luna Java EE edition and am able to Run the bundle within Eclipse using Equinox framework.

When I export this bundle (Export->Plug-in Development->Deployable Plug-ins and fragments) directly into Karaf-3.0.3's deploy directory, the bundle doesn't start and the karaf log shows (NOTE: Karaf is deployed onto C:\Karaf303 directory). Thanks for any insights:

2015-02-16 09:47:26,747 | ERROR | \Karaf303/deploy | fileinstall                      | 7 - org.apache.felix.fileinstall - 3.4.2 | Failed to install artifact: C:\Karaf303\deploy\plugins
java.net.MalformedURLException: Invalid syntax for instruction [Bundle-SymbolicName=C:\Karaf303\deploy\plugins]. Take a look at http://www.aqute.biz/Code/Bnd.
    at org.ops4j.pax.swissbox.bnd.BndUtils.parseInstructions(BndUtils.java:302)[2:org.ops4j.pax.url.wrap:2.3.0]
    at org.ops4j.pax.url.wrap.internal.Parser.<init>(Parser.java:116)[2:org.ops4j.pax.url.wrap:2.3.0]
    at org.ops4j.pax.url.wrap.internal.Connection.<init>(Connection.java:67)[2:org.ops4j.pax.url.wrap:2.3.0]
    at org.ops4j.pax.url.wrap.internal.Activator$1.createConnection(Activator.java:59)[2:org.ops4j.pax.url.wrap:2.3.0]
    at org.ops4j.pax.url.wrap.internal.Activator$1.createConnection(Activator.java:49)[2:org.ops4j.pax.url.wrap:2.3.0]
    at org.ops4j.pax.url.commons.handler.HandlerActivator$Handler.openConnection(HandlerActivator.java:222)[2:org.ops4j.pax.url.wrap:2.3.0]
    at org.apache.felix.framework.URLHandlersStreamHandlerProxy.openConnection(URLHandlersStreamHandlerProxy.java:271)[org.apache.felix.framework-4.2.1.jar:]
    at java.net.URL.openConnection(URL.java:971)[:1.7.0_51]
    at java.net.URL.openStream(URL.java:1037)[:1.7.0_51]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:943)[7:org.apache.felix.fileinstall:3.4.2]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:865)[7:org.apache.felix.fileinstall:3.4.2]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:482)[7:org.apache.felix.fileinstall:3.4.2]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:358)[7:org.apache.felix.fileinstall:3.4.2]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:310)[7:org.apache.felix.fileinstall:3.4.2]
Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140

1 Answers1

0

Figured out what the problem was - Eclipse is exporting the jar to the specified deploy directory of Karaf, but is placing the jar under a sub-directory, plugins, under deploy. Moving the JAR directly under deploy made it deploy successfully.