Miles to go …

April 18, 2011

TOTD #160: OSGi bundles not auto-starting in GlassFish 3.1 ?

Filed under: General — arungupta @ 4:00 am

You are copying OSGi bundles in the "domains/domain1/autodeploy/bundles" directory of GlassFish 3.1 and yet the OSGi bundles are not starting. This is because the "fileinstall" bundle which is responsible for autostarting bundles had to be disabled in the final build. This can be easily fixed by executing the following commands:

asadmin delete-jvm-options --target server-config \
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell, \
org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell, \
org.apache.felix.gogo.command
asadmin create-jvm-options --target server-config \
-Dorg.glassfish.additionalOSGiBundlesToStart=org.apache.felix.shell, \
org.apache.felix.gogo.runtime,org.apache.felix.gogo.shell, \
org.apache.felix.gogo.command,org.apache.felix.shell.remote, \
org.apache.felix.fileinstall

Note, these commands are whitespace sensitive so ensure the entire command is executed in one line. More details and other options are discussed at users@glassfish.

Learn more about building OSGi-enabled Java EE Applications using NetBeans (screencast #32) and Eclipse (screencast #38).

Technorati: totd osgi glassfish fileinstall

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot
Related posts:
  1. TOTD #118: Managing OSGi bundles in GlassFish v3 – asadmin, filesystem, telnet console, web browser, REST, osgish
  2. TOTD #125: Creating an OSGi bundles using NetBeans and deploying in GlassFish
  3. TOTD #126: Creating an OSGi bundles using Eclipse and deploying in GlassFish
  4. TOTD #127: Embedding GlassFish in an existing OSGi runtime – Eclipse Equinox
  5. TOTD #34: Using Felix Shell with GlassFish

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.
Powered by WordPress