Hi Bruce,

Which version of the 'org.apache.felix.framework' bundle are you running
with ?

Cheers,
Stefan

On 11/14/14 11:15 PM, "Bruce Edge" <[email protected]> wrote:

>Here¹s the full stack trace from the sling error.log triggered by
>³adding² a bundle to the server from inside eclipse.
>This shows the original felix NPE, the eclipse console did not.
>
>14.11.2014 14:11:21.716 *INFO* [qtp124750626-43]
>org.apache.sling.tooling.support.install.impl.InstallServlet Unable to
>install/update bundle com.nim.ct.dam.bundle.ingest
>org.osgi.framework.BundleException: Could not create bundle object.
>        at org.apache.felix.framework.Felix.installBundle(Felix.java:2960)
>        at 
>org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextIm
>pl.java:165)
>        at 
>org.apache.sling.tooling.support.install.impl.InstallServlet.installOrUpda
>teBundle(InstallServlet.java:242)
>        at 
>org.apache.sling.tooling.support.install.impl.InstallServlet.installBasedO
>nUploadedJar(InstallServlet.java:149)
>        at 
>org.apache.sling.tooling.support.install.impl.InstallServlet.doPost(Instal
>lServlet.java:101)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>        at 
>org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(Servle
>tHandler.java:339)
>        at 
>org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletH
>andler.java:300)
>        at 
>org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(Servle
>tPipeline.java:93)
>        at 
>org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilte
>r(InvocationFilterChain.java:50)
>        at 
>org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(Http
>FilterChain.java:31)
>        at 
>org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLogge
>rFilter.java:75)
>        at 
>org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterH
>andler.java:108)
>        at 
>org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHan
>dler.java:80)
>        at 
>org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilte
>r(InvocationFilterChain.java:46)
>        at 
>org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(Http
>FilterChain.java:31)
>        at 
>org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(Filte
>rPipeline.java:76)
>        at 
>org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatche
>r.java:49)
>        at 
>org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherSe
>rvlet.java:67)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>        at 
>org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
>        at 
>org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
>        at 
>org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.ja
>va:229)
>        at 
>org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.ja
>va:1086)
>        at 
>org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
>        at 
>org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.jav
>a:193)
>        at 
>org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.jav
>a:1020)
>        at 
>org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:1
>35)
>        at 
>org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHa
>ndlerCollection.java:255)
>        at 
>org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java
>:116)
>        at org.eclipse.jetty.server.Server.handle(Server.java:370)
>        at 
>org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttp
>Connection.java:494)
>        at 
>org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnec
>tion.java:982)
>        at 
>org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(Abs
>tractHttpConnection.java:1043)
>        at 
>org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
>        at 
>org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
>        at 
>org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.ja
>va:82)
>        at 
>org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoin
>t.java:667)
>        at 
>org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint
>.java:52)
>        at 
>org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.jav
>a:608)
>        at 
>org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java
>:543)
>        at java.lang.Thread.run(Thread.java:745)
>Caused by: java.lang.NullPointerException: null
>        at 
>org.apache.felix.framework.BundleProtectionDomain.<init>(BundleProtectionD
>omain.java:46)
>        at 
>org.apache.felix.framework.Felix.setBundleProtectionDomain(Felix.java:877)
>        at 
>org.apache.felix.framework.BundleImpl.addRevision(BundleImpl.java:1213)
>        at 
>org.apache.felix.framework.BundleImpl.<init>(BundleImpl.java:113)
>        at org.apache.felix.framework.Felix.installBundle(Felix.java:2907)
>        ... 42 common frames omitted
>
>From: Bruce Edge 
><[email protected]<mailto:[email protected]>>
>Reply-To: "[email protected]<mailto:[email protected]>"
><[email protected]<mailto:[email protected]>>
>Date: Friday, November 14, 2014 at 7:47 AM
>To: "[email protected]<mailto:[email protected]>"
><[email protected]<mailto:[email protected]>>
>Subject: Re: State of sling eclipse plugins for IDE deploy/undeploy.
>
>HI Robert,
>
>Regarding the sling console log, I tried in debug mode and got no output
>on the console at all. Specifically, while viewing the sling console,
>right click on the sling server and choose Debug. No console output at
>all, although I can see the debugger attach in the debug view form the
>threads displayed.
>
>BTW, as the sling server is on a VM, I changed the "Specify how to
>install bundles on the server²
>from: Install bundles directly from the filesystem
>to:  Install bundles via bundle upload
>As my eclipse instance doesn¹t have access to the target VM¹s filesystem
>
>If I disconnect the server and start again with ³Start² rather than
>³Debug², I get a lot of output on the console, ending with:
>
>
>[November 14, 2014 7:33:26 AM PST] ListChildrenCommand -> / : JcrResult[
>success:true] (27 ms
>
>Then when I ³add² my bundle to the server I get an error dialog with:
>
>
>Failed installing bundle : Unable to install/update bundle
>com.nim.ct.dam.bundle.ingest : Could not create bundle object.
>
>Unable to install/update bundle com.nim.ct.dam.bundle.ingest : Could not
>create bundle object.
>
>
>and an exception in the log:
>
>
>[November 14, 2014 7:36:30 AM PST] InstallJarredBundle ->
>/Users/bedge/git/server/content/dam/postIngest/target/classes : FAILED
>(45 ms)
>
>org.apache.sling.ide.osgi.OsgiClientException: Unable to install/update
>bundle com.nim.ct.dam.bundle.ingest : Could not create bundle object.
>
>at 
>org.apache.sling.ide.osgi.impl.HttpOsgiClient$LocalBundleInstaller.install
>Bundle(HttpOsgiClient.java:216)
>
>at 
>org.apache.sling.ide.osgi.impl.HttpOsgiClient.installLocalBundle(HttpOsgiC
>lient.java:191)
>
>at 
>org.apache.sling.ide.osgi.impl.TracingOsgiClient.logInstallLocalBundle(Tra
>cingOsgiClient.java:73)
>
>at 
>org.apache.sling.ide.osgi.impl.TracingOsgiClient.installLocalBundle(Tracin
>gOsgiClient.java:101)
>
>at 
>org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publish
>BundleModule(SlingLaunchpadBehaviour.java:347)
>
>at 
>org.apache.sling.ide.eclipse.core.internal.SlingLaunchpadBehaviour.publish
>Module(SlingLaunchpadBehaviour.java:219)
>
>at 
>org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(Se
>rverBehaviourDelegate.java:1091)
>
>at 
>org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(S
>erverBehaviourDelegate.java:1183)
>
>at 
>org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModu
>lePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.j
>ava:137)
>
>at 
>org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBe
>haviourDelegate.java:774)
>
>at 
>org.apache.sling.ide.eclipse.core.internal.ServerBehaviourDelegateWithModu
>lePublishSupport.publish(ServerBehaviourDelegateWithModulePublishSupport.j
>ava:54)
>
>at 
>org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3157)
>
>at 
>org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345
>)
>
>at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54
>
>Note that this same bundle does deploy with maven.
>
>-Bruce
>
>From: Robert Munteanu
><[email protected]<mailto:[email protected]><mailto:[email protected]>>
>Reply-To: 
>"[email protected]<mailto:[email protected]><mailto:users@sling.
>apache.org>" 
><[email protected]<mailto:[email protected]><mailto:users@sling.
>apache.org>>
>Date: Friday, November 14, 2014 at 5:07 AM
>To: 
>"[email protected]<mailto:[email protected]><mailto:users@sling.
>apache.org>" 
><[email protected]<mailto:[email protected]><mailto:users@sling.
>apache.org>>
>Subject: Re: State of sling eclipse plugins for IDE deploy/undeploy.
>
>Hi Bruce,
>
>On Thu, Nov 13, 2014 at 8:57 AM, Bruce Edge
><[email protected]<mailto:[email protected]><mailt
>o:[email protected]>> wrote:
>Also, I found 2 plugins that seem to be similar,
>http://docs.adobe.com/content/docs/en/dev-tools/aem-eclipse.html
>http://sling.apache.org/documentation/development/ide-tooling.html
>Which to people use?
>
>I settled on the non-adobe one as I'm not using CQ.
>
>Well, that's the right approach. For now, the Adobe plugins add a new
>project wizard and some AEM branding. The new project wizard generates
>a project based on AEM libraries so it would not deploy on Sling at
>all. The rest of the features come from the Sling IDE Tooling anyway.
>
>
>Does anyone actually use the eclipse sling plugin to add/remove bundles
>to/from a sling server?
>
>I got a doPost SlingAllMethodsServlet working, but only through the maven
>plugin, i.e.:
>mvn org.apache.sling:maven-sling-plugin:install-file
>-Dsling.file=ingest-2.2.2.jar
>
>Connecting to a sling server from the plugin's server manager works, as
>does the debugging. So just the deploy/undeploy seems broken.
>I'm running on nonstandard ports (not 8080) for conflict reasons, is
>there anything that needs to change other than in the server's config?
>
>
>That should work, I'm using it for day-to-day work. A couple of questions:
>
>1. Do you have anything in the sling log that indicates an error
>deploying from Eclipse?
>2. If you open the Sling console ( see [1] ) do you see anything
>related to installing local bundles?
>
>Thanks,
>
>Robert
>
>[1]: 
>https://sling.apache.org/documentation/development/ide-tooling.html#gather
>ing-debug-information
>
>
>I do have the port setup in the pom:
>             <plugin>
>                 <groupId>org.apache.sling</groupId>
>                 <artifactId>maven-sling-plugin</artifactId>
>                 <version>2.1.0</version>
>                 <configuration>
>                  
><slingUrl>http://localhost:8090/system/console</slingUrl>
>                     <user>admin</user>
>                     <password>admin</password>
>                 </configuration>
>             </plugin>
>
>-Bruce
>
>


Reply via email to