3 Replies Latest reply on Feb 13, 2002 4:50 AM by Adrian Brock

    Error starting jboss 2.4.1

    Michael Noel Newbie

      My OS is Linux 6.2 and I am using the KDE flavor. I get the following error after executing run_with_tomcat.sh:


      ./run_with_tomcat.sh
      JBOSS_CLASSPATH=:/usr/java/jdk1.3.1_01/lib/tools.jar:run.jar:../lib/crimson.jar
      jboss.home = /usr/JBoss-2.4.1_Tomcat-3.2.3/jboss
      Using JAAS LoginConfig: file:/usr/JBoss-2.4.1_Tomcat-3.2.3/jboss/conf/tomcat/auth.conf
      Using configuration "tomcat"
      log4j:ERROR Could not instantiate class [org.jboss.logging.log4j.ConsoleAppender].
      java.lang.ClassNotFoundException: org.jboss.logging.log4j.ConsoleAppender
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:120)
      at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:301)
      at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:116)
      at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:612)
      at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:595)
      at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:502)
      at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:410)
      at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:309)
      at org.apache.log4j.PropertyWatchdog.doOnChange(PropertyConfigurator.java:665)
      at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:80)
      at org.apache.log4j.helpers.FileWatchdog.(FileWatchdog.java:49)
      at org.apache.log4j.PropertyWatchdog.(PropertyConfigurator.java:657)
      at org.apache.log4j.PropertyConfigurator.configureAndWatch(PropertyConfigurator.java:373)
      at org.jboss.logging.Log4jService.start(Log4jService.java:122)
      at org.jboss.logging.Log4jService.preRegister(Log4jService.java:189)
      at com.sun.management.jmx.MBeanServerImpl.preRegisterInvoker(MBeanServerImpl.java:2245)
      at com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.java:513)
      at javax.management.loading.MLet.getMBeansFromURL(MLet.java:523)
      at javax.management.loading.MLet.getMBeansFromURL(MLet.java:369)
      at org.jboss.Main.(Main.java:182)
      at org.jboss.Main$1.run(Main.java:116)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:112)
      log4j:ERROR Could not instantiate appender named "Console".
      log4j:ERROR Could not instantiate class [org.jboss.logging.log4j.JBossCategory$JBossCategoryFactory].
      java.lang.ClassNotFoundException: org.jboss.logging.log4j.JBossCategory$JBossCategoryFactory
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:120)
      at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:301)
      at org.apache.log4j.PropertyConfigurator.configureCategoryFactory(PropertyConfigurator.java:459)
      at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:411)
      at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:309)
      at org.apache.log4j.PropertyWatchdog.doOnChange(PropertyConfigurator.java:665)
      at org.apache.log4j.helpers.FileWatchdog.checkAndConfigure(FileWatchdog.java:80)
      at org.apache.log4j.helpers.FileWatchdog.(FileWatchdog.java:49)
      at org.apache.log4j.PropertyWatchdog.(PropertyConfigurator.java:657)
      at org.apache.log4j.PropertyConfigurator.configureAndWatch(PropertyConfigurator.java:373)
      [kleon@localhost bin]$ ./run_with_tomcat.sh
      JBOSS_CLASSPATH=:/usr/java/jdk1.3.1_01/lib/tools.jar:run.jar:../lib/crimson.jar
      jboss.home = /usr/JBoss-2.4.1_Tomcat-3.2.3/jboss
      ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



      I believe my run_with_tomcat.sh is the generic one:

      more run.sh
      #!/bin/sh

      # Minimal jar file to get JBoss started.

      JBOSS_CLASSPATH=$JBOSS_CLASSPATH:run.jar

      # Add all login modules for JAAS-based security
      # and all libraries that are used by them here
      JBOSS_CLASSPATH=$JBOSS_CLASSPATH

      # Check for SUN(tm) JVM w/ HotSpot support
      #
      HOTSPOT=`java -version 2>&1 | grep HotSpot`"x"
      if [ "$HOTSPOT" != "x" ]; then
      HOTSPOT="-server"
      else
      HOTSPOT=""
      fi

      # Add the XML parser jars and set the JAXP factory names
      # Crimson parser JAXP setup(default)
      JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/crimson.jar
      JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
      JAXP="$JAXP -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl"

      echo JBOSS_CLASSPATH=$JBOSS_CLASSPATH
      #$JAVA_HOME/java $HOTSPOT $JAXP -classpath $JBOSS_CLASSPATH org.jboss.Main $@
      /usr/java/jdk1.3.1_01/bin/java $HOTSPOT $JAXP -classpath $JBOSS_CLASSPATH org.jboss.Main $@

      ----

      Thanks for any help.

        • 1. Re: Error starting jboss 2.4.1
          Adrian Brock Master

          Can you post the Log4jService config in jboss/conf/tomcat/jboss.conf?

          Do you have log4j.jar in /usr/java/jdk1.3.1_01/jre/lib/ext?

          Regards,
          Adrian

          • 2. Re: Error starting jboss 2.4.1
            Michael Noel Newbie

            Adrian,
            Thanks replying so soon.
            Yes I do have the log4j.jar in the directory you mention.

            HOLD EVERYTHING!!
            I just found out that the lead on my project has updated
            to jboss 3.0. So my new problem now is trying to install
            ver 3.0. I am trying to get the latest version by going thru the jboss CVS. Problem right now is trying to download the jCVS client.


            I downloaded the [install anywhere file] install-jcvs-unix-522.bin file, I change perms to 777 and run it. It starts, prompts for the JVM to use and then just STOPS. Any help would be appreciated.

            Thanks.

            • 3. Re: Error starting jboss 2.4.1
              Adrian Brock Master

              Sorry,
              I don't use jCVS so I can't help with that.

              The log4j in jre/lib/ext won't work with JBoss.

              log4j uses the old Class.forName() so it needs to be loaded
              in the same classloader as Log4jService to work
              correctly.

              Regards,
              Adrian