0 Replies Latest reply on Aug 6, 2006 11:01 AM by Robert Söding

    JBoss AS won't start on Java 1.5 (in contrast to 1.4)

    Robert Söding Newbie

      Ubuntu Linux 6.06
      Sun JDK 1.5_06, resp. 1.4_12
      JBoss AS 4.0.4 GA

      When I try to start a freshly unzipped distribution of JBoss AS (by using run.sh), the following exception gets thrown:

      =========================================================================
      
       JBoss Bootstrap Environment
      
       JBOSS_HOME: /media/hde1/home/robert/opt/jboss-4.0.4.GA
      
       JAVA: /usr/lib/j2sdk1.5-sun/bin/java
      
       JAVA_OPTS: -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dprogram.name=run.sh
      
       CLASSPATH: /media/hde1/home/robert/opt/jboss-4.0.4.GA/bin/run.jar:/usr/lib/j2sdk1.5-sun/lib:/usr/lib/j2sdk1.5-sun/external-jars:/usr/lib/j2sdk1.5-sun/jre/lib/ext
      
      =========================================================================
      
      Failed to boot JBoss:
      java.lang.NullPointerException
       at java.util.Properties$LineReader.readLine(Properties.java:365)
       at java.util.Properties.load(Properties.java:293)
       at org.jboss.Version.loadProperties(Version.java:262)
       at org.jboss.Version.<init>(Version.java:59)
       at org.jboss.Version.getInstance(Version.java:71)
       at org.jboss.system.server.ServerImpl.<init>(ServerImpl.java:72)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at java.lang.Class.newInstance0(Class.java:350)
       at java.lang.Class.newInstance(Class.java:303)
       at org.jboss.system.server.ServerLoader.createServer(ServerLoader.java:274)
       at org.jboss.system.server.ServerLoader.load(ServerLoader.java:253)
       at org.jboss.Main.boot(Main.java:188)
       at org.jboss.Main$1.run(Main.java:464)
       at java.lang.Thread.run(Thread.java:595)


      In contrast, when I edit the JAVA_HOME property in $JBOSS_HOME/bin/run.conf to point to the Sun JDK 1.4, JBoss AS starts without this error.

      org.jboss.Version.loadProperties() (in $JBOSS_HOME/bin/run.jar):
      InputStream in =
       Version.class.getResourceAsStream("/org/jboss/version.properties");


      Debugging the server in Eclipse shows that the error occurs because the stream object is null when loaded via Java 1.5.

      Please note that the classpath is the same in both cases.

      Any ideas?

      Thanks
      Robert