6 Replies Latest reply: Mar 16, 2012 11:11 AM by anonym5789456 RSS

    ClassNotFoundException when trying to run JBoss-esb-server-4.9

    Newbie

      Hi,

       

      I'm trying to run jboss-esb on a Windows 2008 server but I get an error when running run.bat.

      It seems like run.jar is the wrong file, but that's surprise me.

      Output is below, can anybody tell me how I can solve this?

       

       

      C:\JBoss\jbossesb-server-4.9\bin>run.bat

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

       

        JBoss Bootstrap Environment

       

        JBOSS_HOME: C:\JBoss\jbossesb-server-4.9

       

        JAVA: C:\Program Files\Java\jdk1.6.0_23\bin\java

       

        JAVA_OPTS: -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n  -Djava.library.path="C:\JBoss\jbosse

      sb-server-4.9\bin\native;C:\IBM\informix\bin;C:\Program Files\ibm\gsk8\lib;C:\Program Files\ibm\gsk8\bin;C:\Windows\syst

      em32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\" -Dprogram.name=run.bat -server -Xm

      s128m -Xmx512m -XX:PermSize=200M -XX:MaxPermSize=200M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInt

      erval=3600000

       

        CLASSPATH: C:\Program Files\Java\jdk1.6.0_23\lib\tools.jar;C:\JBoss\jbossesb-server-4.9\bin\run.jar

       

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

       

      Listening for transport dt_socket at address: 8787

      Exception in thread "main" java.lang.NoClassDefFoundError: Files\Java\jdk1/6/0_23\lib\tools/jar;C:\JBoss\jbossesb-server

      -4/9\bin\run/jar    org/jboss/Main

      Caused by: java.lang.ClassNotFoundException: Files\Java\jdk1.6.0_23\lib\tools.jar;C:\JBoss\jbossesb-server-4.9\bin\run.j

      ar    org.jboss.Main

              at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

      Could not find the main class: Files\Java\jdk1.6.0_23\lib\tools.jar;C:\JBoss\jbossesb-server-4.9\bin\run.jar    org.jbos

      s.Main .  Program will exit.

      Press any key to continue . . .

        • 1. Re: ClassNotFoundException when trying to run JBoss-esb-server-4.9
          Tom Cunningham Master

          It looks like unescaped spaces are causing you problems.     Notice that it can't find :

          "Files\Java\jdk1.6.0_23\lib\tools.jar;C:\JBoss\jbossesb-server-4.9\bin\run.jar "

           

          The space immediately precedes "Files" in "Program Files".      I usually use the c:\Progra~1\Java\jdk1.6.0_23\lib\tools.jar;C:\JBoss\jbossesb-server-4.9\bin\run.jar (notice the short name of Progra~1) so that I don't have to deal with issues like this.

          • 2. Re: ClassNotFoundException when trying to run JBoss-esb-server-4.9
            Newbie

            Hmmm, that seems to get me a bit further, thanks.

            But now I get the following funny fact, seems like java is missing an argument:

             

            C:\JBoss\jbossesb-server-4.9\bin>run.bat

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

             

              JBoss Bootstrap Environment

             

              JBOSS_HOME: C:\JBoss\jbossesb-server-4.9

             

              JAVA: C:\Java\jdk1.6.0_23\bin\java

             

              JAVA_OPTS: -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n  -Djava.library.path="C:\JBoss\jbosse

            sb-server-4.9\bin\native;C:\IBM\informix\bin;C:\Program Files\ibm\gsk8\lib;C:\Program Files\ibm\gsk8\bin;C:\Windows\syst

            em32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\" -Dprogram.name=run.bat -server -Xm

            s128m -Xmx512m -XX:PermSize=200M -XX:MaxPermSize=200M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInt

            erval=3600000

             

              CLASSPATH: C:\Java\jdk1.6.0_23\lib\tools.jar;C:\JBoss\jbossesb-server-4.9\bin\run.jar

             

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

             

            Listening for transport dt_socket at address: 8787

            Usage: java [-options] class [args...]

                       (to execute a class)

               or  java [-options] -jar jarfile [args...]

                       (to execute a jar file)

             

            where options include:

                -client       to select the "client" VM

                -server       to select the "server" VM

                -hotspot      is a synonym for the "client" VM  [deprecated]

                              The default VM is client.

             

                -cp <class search path of directories and zip/jar files>

                -classpath <class search path of directories and zip/jar files>

                              A ; separated list of directories, JAR archives,

                              and ZIP archives to search for class files.

                -D<name>=<value>

                              set a system property

                -verbose[:class|gc|jni]

                              enable verbose output

                -version      print product version and exit

                -version:<value>

                              require the specified version to run

                -showversion  print product version and continue

                -jre-restrict-search | -jre-no-restrict-search

                              include/exclude user private JREs in the version search

                -? -help      print this help message

                -X            print help on non-standard options

                -ea[:<packagename>...|:<classname>]

                -enableassertions[:<packagename>...|:<classname>]

                              enable assertions

                -da[:<packagename>...|:<classname>]

                -disableassertions[:<packagename>...|:<classname>]

                              disable assertions

                -esa | -enablesystemassertions

                              enable system assertions

                -dsa | -disablesystemassertions

                              disable system assertions

                -agentlib:<libname>[=<options>]

            • 3. Re: ClassNotFoundException when trying to run JBoss-esb-server-4.9
              Tom Cunningham Master

              Your JAVA_OPTS seem to have the same problem as well.    

              • 4. Re: ClassNotFoundException when trying to run JBoss-esb-server-4.9
                Newbie

                Allright, where can I set them?

                • 5. Re: ClassNotFoundException when trying to run JBoss-esb-server-4.9
                  Tom Cunningham Master

                  Check your settings for the PATH and JAVA_HOME environment variables.    

                  • 6. Re: ClassNotFoundException when trying to run JBoss-esb-server-4.9
                    Newbie

                    "%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\" must've freaked him out.

                    I removed it from my path and JBoss-ESB starts. Weird ***.

                    Thanks a bunch for you advice, Tom.