1 Reply Latest reply on Aug 29, 2011 12:08 PM by thomas.diesler

    run.sh -c minimal

    cseg

      I can start 'all', 'web' and 'default' with no errors.

       

      However, when I try to run run.sh -c minimal, I get:

       

      org.osgi.framework.BundleException: Cannot install bundle, name and version already installed: jbosgi-hotdeploy:1.0.10

      org.osgi.framework.BundleException: Cannot install bundle, name and version already installed: jboss-osgi-common:1.0.6

      org.osgi.framework.BundleException: Cannot install bundle, name and version already installed: org.apache.felix.log:1.0.0

      org.osgi.framework.BundleException: Cannot install bundle, name and version already installed: osgi.cmpn:4.2.0.200908310645

       

      These are exactly the bundles that are in the minimal directory.

       

      Then I created a copy of minimal and called it 'empy' and removed all the jars from the deploy directory.  I was able to start 'empty' with no errors.

       

      But if I then rename the 'minimal' directory to something else, then empty doesn't start any more.

       

      So I conclude from these experiments that the minimal configuration is somehow automatically included in the other configurations and for this reason you cannot start the minimal configuration directly.

       

      What I was looking for was a really minimal configuration.  So for that I can use 'empty' and add what I want to it.

       

      Is that the right way to go?

        • 1. Re: run.sh -c minimal
          thomas.diesler

          I cannot confirm this

           

          [tdiesler@tdvaio runtime]$ bin/run.sh -c minimal
          =========================================================================
          
            JBossOSGi Bootstrap Environment
          
            OSGI_HOME: /home/tdiesler/jboss-osgi-1.0.0/runtime
          
            JAVA: /usr/java/jdk1.6/bin/java
          
            JAVA_OPTS: -Dprogram.name=run.sh -Dosgi.home=/home/tdiesler/jboss-osgi-1.0.0/runtime -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.vfs.leakDebugging=true -Djava.net.preferIPv4Stack=true
          
          =========================================================================
          
          18:01:13,586 INFO  [msc] JBoss MSC version 1.0.0.CR2
          18:01:13,770 INFO  [BundleManager] JBossOSGi Framework Core - 1.0.0
          18:01:13,987 INFO  [BundleManager] Install bundle: system.bundle:0.0.0
          18:01:14,034 WARN  [vfs] VFS was unable to set the URLStreamHandlerFactory.  This will have unpredictable results
          18:01:14,209 INFO  [BundleManager] Install bundle: org.apache.felix.log:1.0.0
          18:01:14,229 INFO  [BundleManager] Install bundle: jboss-osgi-common:1.0.6
          18:01:14,231 INFO  [BundleManager] Install bundle: jbosgi-hotdeploy:1.0.10
          18:01:14,612 INFO  [BundleManager] Install bundle: osgi.cmpn:4.2.0.200908310645
          18:01:14,631 INFO  [StartLevelPlugin] Starting bundles for start level: 1
          18:01:14,723 INFO  [HostBundleState] Bundle started: org.apache.felix.log:1.0.0
          18:01:14,737 INFO  [DeploymentScannerImpl] Start DeploymentScanner: [scandir=.../server/minimal/deploy,interval=2000ms]
          18:01:14,739 INFO  [HostBundleState] Bundle started: jbosgi-hotdeploy:1.0.10
          18:01:14,775 INFO  [HostBundleState] Bundle started: jboss-osgi-common:1.0.6
          18:01:14,778 INFO  [FrameworkActive] OSGi Framework started
          18:01:14,779 INFO  [OSGiBootstrapBean] JBossOSGi Runtime booted in 1.213sec
          18:01:14,788 INFO  [HostBundleState] Bundle started: osgi.cmpn:4.2.0.200908310645
          18:01:14,793 INFO  [DeploymentScannerImpl] JBossOSGi Runtime started in 0.055000sec
          

           

          Have a look at the conf/jboss-osgi-framework.properties files in the respective configurations. There you should see the auto install/start set of bundles. For minimal this would be

           

          # Bundles that need to be installed with the Framework automatically 
          org.jboss.osgi.auto.install=\
             file://${osgi.home}/server/minimal/deploy/org.osgi.compendium.jar
          
          # Bundles that need to be started automatically 
          org.jboss.osgi.auto.start=\
             file://${osgi.home}/server/minimal/deploy/org.apache.felix.log.jar, \
             file://${osgi.home}/server/minimal/deploy/jboss-osgi-common.jar, \
             file://${osgi.home}/server/minimal/deploy/jbosgi-hotdeploy.jar   
          
          

           

          For an even more minimal cofiguration, you can remove all settings from that properties file. The

           

          # Properties to configure the Framework
          org.osgi.framework.storage=${osgi.server.home}/data/osgi-store
          org.osgi.framework.storage.clean=onFirstInit
          

           

          you might want to keep