2 Replies Latest reply on Mar 25, 2002 6:04 AM by ihunter

    ServiceNotFoundException on startup

    ihunter

      [BTW: This is a longish posting, but the problem is 'short', I've just provided a reasonable amount of info - I hope!]

      Hi good folks!

      We're going great guns with JB (v2.4.4 with Jetty), but now we've some to the 'get it auto started under Solaris' phase. Theres stuff in this forum, but it isn't exactly hitting my problem....

      I've created a backgound startup script (see bottom of email) and this works OK when started by the intended owner, but as soon as I attempt to use 'su' to start it from root, the server gives me the following....


      javax.management.ServiceNotFoundException:
      The specified URL is null
      at javax.management.loading.MLet.getMBeansFromURL(MLet.java:367)
      at org.jboss.Main.(Main.java:180)
      at org.jboss.Main$1.run(Main.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:106)



      I know this is a Solaris environment/user issue, the trouble is I can't figure what JB is trying to tell me.

      Below is the startup script [I'm executing this with the command line :-

      su - user -c $JBOSS_DIST/bin/startup.sh

      ], and following that is the environment as that script runs (call env just before executing JBoss).

      Any help much appreciated....

      Ian


      #!/bin/sh

      PATH=/usr/java1.3/bin:/usr/bin:/usr/local/bin
      PATH=${PATH}:/usr/local/ant/bin:/usr/local/mysql/bin
      JBOSS_DIST=/u4/JBoss-2.4.4_Jetty-3.1.3-1/jboss
      JAVA_HOME=/usr/java1.3
      JDK_HOME=${JAVA_HOME}
      LC_CTYPE=en_US.ISO8859-1

      export PATH
      export JBOSS_DIST
      export JAVA_HOME
      export JDK_HOME
      export LC_CTYPE
      env

      BASEDIR=`dirname $0`

      DATE=`date`

      JBOSS_CLASSPATH=${JAVA_HOME}/lib/tools.jar:${JBOSS_DIST}/bin/run.jar:${JBOSS_DI\
      ST}/lib/crimson.jar

      HOTSPOT=`java -version 2>&1 | grep -i hotspot`
      if [ ! -z "${HOTSPOT}" ]; then
      HOTSPOT="-server"
      fi

      JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.Documen\
      tBuilderFactoryImpl
      JAXP="$JAXP -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXPar\
      serFactoryImpl"

      echo " === START: ${DATE} === " >>${JBOSS_DIST}/log/jboss.log
      echo "Started JBoss ${DATE}"
      cmd="java ${HOTSPOT} ${JAXP} -classpath ${JBOSS_CLASSPATH} org.jboss.Main $@"
      ${cmd} >>${JBOSS_DIST}/log/jboss.log 2>&1 < /dev/null &
      echo $! > ${JBOSS_DIST}/log/jboss.pid





      HOME=/usr/twarrior
      HOSTNAME=cartezia1
      HOSTTYPE=sparc
      HZ=100
      JAVA_HOME=/usr/java1.3
      JBOSS_DIST=/u4/JBoss-2.4.4_Jetty-3.1.3-1/jboss
      JDK_HOME=/usr/java1.3
      LC_CTYPE=en_US.ISO8859-1
      LOGNAME=twarrior
      MACHTYPE=sparc-sun-solaris
      OSTYPE=solaris
      PATH=/usr/java1.3/bin:/usr/bin:/usr/local/bin:/usr/local/ant/bin:/usr/local/mysql/bin
      PWD=/usr/user
      SHELL=/usr/bin/bash
      SHLVL=1
      TERM=xterm
      TZ=GB