I've deployed the latest Sling build from trunk into Apache Felix (via Pax-Runner).

After removing the pax-runner directory and starting again from scratch, the problem seems to be related to uninstalling a bundle.

$ rm -rf runner/
$ mvn pax:provision # from project that just deploys sling with dependencies
$ cd ../gather-sling
$ mvn clean install sling:install
...
[INFO] [sling:install]
[INFO] Installing Bundle org.gatherdata.app.gather-sling.sandbox(/ Users/akollegger/Developer/gather/workspaces/apps/gather-sling/sling- sandbox/target/sling-sandbox-1.0-SNAPSHOT.jar) to http://localhost:8090/system/console via POST
[INFO] Bundle installed
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL

This procedure results in an installed and active gather-sling bundle. I can also repeatedly run `mvn sling:install` and everything works. But if I uninstall with sling:uninstall then further sling:installs will result in an installed but inactive bundle, which can't even be started by the Felix Web Management Console. Also, updating the bundle through the Web Console doesn't work.

Once in this state, the only way to get an active bundle is to uninstall (through either mvn:uninstall or the Web Console), then install with the Web Console.

A further note: I'm not sure if the uninstall is completely successful. The output looks like this:

[INFO] Building gather-sling - sandbox (content)
[INFO]    task-segment: [sling:uninstall]
[INFO] ------------------------------------------------------------------------
[INFO] [sling:uninstall]
[INFO] Unistalling Bundle org.gatherdata.app.gather-sling.sandbox) from http://localhost:8090/system/console via POST
[INFO] Removing file system provider configurations...
Jul 23, 2009 8:41:04 AM org.apache.commons.httpclient.HttpMethodBase getResponseBody WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
[INFO] Bundle uninstalled
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------

Thoughts?

Best,
Andreas

On Jul 23, 2009, at 2:30 AM, Carsten Ziegeler wrote:

Andreas Kollegger wrote:
There seems to be a difference between uploading a bundle through the
Felix WebConsole v1.2.10 and using the maven-sling-plugin
v.2.0.5-SNAPSHOT sling:install goal, which is confusing me. Both methods
seem to install the bundle fine, but a bundle installed through
maven-sling-plugin can't be started. The same bundle, when uploaded
directly through the WebConsole, starts just fine. I haven't noticed any errors in the console when using the maven-sling-plugin, and it reports
that the install was successful.

Am I possible missing something in my plugin setup? All I configured was
the slingUrl to use for the system console.

         <plugin>
             <groupId>org.apache.sling</groupId>
             <artifactId>maven-sling-plugin</artifactId>
             <version>2.0.5-SNAPSHOT</version>
             <configuration>

<slingUrl>http://localhost:${org.osgi.service.http.port}/system/ console</slingUrl>

             </configuration>
         </plugin>

Or do I possibly have a version mismatch

Hmm, no I don't think so - I'm using the plugin with different versions
of the web console (including 1.2.10) and it works for me :)

Are you using the launchpad or do you have Sling deployed into a
different servlet engine?

What does the output from the sling maven plugin show?

Regards
Carsten

--
Carsten Ziegeler
[email protected]

Reply via email to