3 Replies Latest reply on Jun 17, 2009 11:30 AM by thomas.diesler

    Problem of running jboss-osgi-1.0.0beta2

      Hi All,

      After I installed jboss-osgi-1.0.0bet2 following the instructions of http://jbmuc.dyndns.org:8280/hudson/job/jbossosgi-jdk16/ws/jboss-osgi/distribution/target/auto-install-dest/docs/userguide/html/index.html, ( deselect OGGI-Integration, and choose Felix OSGiFramework), and started up the runtime, the web console( should be at http://localhost:8090/jboss-osgi) doesn't work.
      And an exception timely appeared

      18:18:07,796 ERROR [jboss-osgi-hotdeploy] Deployment error
      java.lang.NullPointerException
      at org.jboss.osgi.service.hotdeploy.internal.DeploymentScannerImpl.getBundles(DeploymentScannerImpl.java:232)
      at org.jboss.osgi.service.hotdeploy.internal.DeploymentScannerImpl.scan(DeploymentScannerImpl.java:146)
      at org.jboss.osgi.service.hotdeploy.internal.ScannerThread.run(ScannerThread.java:59)

      Anyone has hint about the reason? or any workaround?

      ====== startup log =====
      uweihuas-macbook:bin juweihua$ ./run.sh
      =========================================================================

      JBossOSGi Bootstrap Environment

      OSGI_HOME: /Users/juweihua/jboss-osgi-1.0.0.Beta2/runtime

      JAVA: /Library/Java/Home/bin/java

      JAVA_OPTS: -Dprogram.name=run.sh -Dosgi.home=/Users/juweihua/jboss-osgi-1.0.0.Beta2/runtime -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000

      =========================================================================

      18:04:17,193 INFO [FelixIntegration] OSGi Integration Felix - 1.0.0.Beta2
      18:04:17,571 INFO [FelixIntegration] Installed bundle [1]: org.osgi.compendium
      18:04:17,576 INFO [FelixIntegration] Installed bundle [2]: org.apache.felix.log
      18:04:17,585 INFO [FelixIntegration] Installed bundle [3]: jboss-osgi-common
      18:04:17,601 INFO [FelixIntegration] Installed bundle [4]: jboss-osgi-hotdeploy
      18:04:17,632 INFO [FelixIntegration] Started bundle: org.apache.felix.log
      18:04:17,717 INFO [FelixIntegration] Started bundle: jboss-osgi-common
      18:04:17,717 INFO [jboss-osgi-common] ServiceEvent REGISTERED
      18:04:17,718 INFO [jboss-osgi-common] BundleEvent STARTED
      18:04:17,718 INFO [jboss-osgi-common] ServiceEvent REGISTERED
      18:04:17,725 INFO [jboss-osgi-hotdeploy] BundleEvent RESOLVED
      18:04:17,733 INFO [jboss-osgi-hotdeploy] Start DeploymentScanner: [scandir=.../server/default/deploy,interval=2000ms]
      18:04:17,733 INFO [jboss-osgi-hotdeploy] ServiceEvent REGISTERED
      18:04:17,734 INFO [FelixIntegration] Started bundle: jboss-osgi-hotdeploy
      18:04:17,734 INFO [OSGiBootstrap] JBossOSGi Runtime booted in 0.541sec
      18:04:17,733 INFO [jboss-osgi-hotdeploy] BundleEvent STARTED
      18:04:17,791 INFO [jboss-osgi-common-core] BundleEvent INSTALLED
      18:04:17,792 INFO [jboss-osgi-common] Installed: jboss-osgi-common-core [5]
      18:04:17,818 INFO [jboss-osgi-jmx] BundleEvent INSTALLED
      18:04:17,824 INFO [jboss-osgi-common] Installed: jboss-osgi-jmx [6]
      18:04:17,830 INFO [jboss-osgi-common] Installed: jboss-osgi-jndi [7]
      18:04:17,832 INFO [jboss-osgi-jndi] BundleEvent INSTALLED
      18:04:17,842 INFO [jboss-osgi-common-core] BundleEvent STARTED
      18:04:17,842 INFO [jboss-osgi-common-core] BundleEvent RESOLVED
      18:04:17,862 INFO [jboss-osgi-jndi] BundleEvent RESOLVED
      18:04:17,864 INFO [jboss-osgi-jmx] BundleEvent RESOLVED
      18:04:17,960 INFO [jboss-osgi-jmx] ServiceEvent REGISTERED
      18:04:17,961 INFO [jboss-osgi-jmx] ServiceEvent REGISTERED
      18:04:17,986 INFO [jboss-osgi-jmx] BundleEvent STARTED
      18:04:18,281 INFO [jboss-osgi-jndi] JNDI started: JNP=localhost:1099, RMI=localhost:1098
      18:04:18,459 INFO [jboss-osgi-jndi] BundleEvent STARTED
      18:04:18,459 INFO [jboss-osgi-jndi] ServiceEvent REGISTERED
      18:04:18,459 INFO [jboss-osgi-jmx] MBeanServerConnection bound to: jmx/invoker/RMIAdaptor
      18:04:20,458 INFO [OSGiBootstrap] JBossOSGi Runtime started in 1.262sec


      Regards,
      Jackie Ju

        • 1. Re: Problem of running jboss-osgi-1.0.0beta2
          thomas.diesler

          It seems that

          scanLocation.listFiles()
          


          returns null, which would be the case if


          Returns:
          An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.


          The WebConsole is available in the web or all profile

          run.sh -c web
          run.sh -c all



          • 2. Re: Problem of running jboss-osgi-1.0.0beta2

            Hi Thomas,

            Thanks a lot for reply. Now it works !

            More or less, I think the user guide mis-lead me. It said "-c (--server-name) - The runtime profile to start. The default is the 'default' profile.", but didn't tell the webconsole is not in default profile.

            Thanks again for your kind help.


            Best Regards,
            Jackie Ju

            • 3. Re: Problem of running jboss-osgi-1.0.0beta2
              thomas.diesler

              Yes, I updated the docs.

              Please note, that OSGi has a build-in notion of lazy bundle activation - which I have not (yet) looked into.

              In theory this should bring startup time very close to boot time. i.e. the 'all' profile might start in < 1sec

              If this is true we can put the web console into the 'default' profile without negatively effecting the startup time.

              Perhaps you'd like to have a go?

              https://jira.jboss.org/jira/browse/JBOSGI-105