11 Replies Latest reply on Sep 12, 2008 1:25 PM by peterj

    newbie - JBoss

    velasquez

      Hi,

      I had changed the JBoss default port to 80 and confirmed that no other applications are using this port.
      I have set the JBOSS_Home. Also set the Java class path

      When I start run.bat a dos window appears and immediately gets closed.

      please guide me what other steps i should do to start JBoss.

      Thanks.

        • 1. Re: newbie - JBoss
          peterj

          Most likely you are running into one of two problems:

          1) You have not installed a JDK and/or have not set JAVA_HOME to reference it.

          2) You are running into the "findstr" issue - see http://wiki.jboss.org/wiki/FindstrCommandNotFound

          If neither of these solves your issue, then open a command prompt, 'cd' to the jboss_home/bin directory, and enter:

          run

          Post all of the output in the command prompt window, including the 'run' command line.

          Also, what version of JBossAS and JDK are you using?

          • 2. Re: newbie - JBoss
            velasquez

            Hi Peter,

            I had already set the JAVA_HOME, findstr.exe
            is in c:\windows\system32. Do I need to change anything in run.bat.

            I am using JBoss 4.2.2 and jdk1.6.0_07.

            • 3. Re: newbie - JBoss
              velasquez

               

              "velasquez" wrote:
              Hi,

              I had changed the JBoss default port to 80 and confirmed that no other applications are using this port.
              I have set the JBOSS_Home. Also set the Java class path

              When I start run.bat a dos window appears and immediately gets closed.

              please guide me what other steps i should do to start JBoss.

              Thanks.


              Hi Peter,

              I had already set the JAVA_HOME, findstr.exe
              is in c:\windows\system32. Do I need to change anything in run.bat.

              I am using JBoss 4.2.2 and jdk1.6.0_07.


              • 4. Re: newbie - JBoss
                jaikiran

                As suggested by Peter, try this and post the output:

                "PeterJ" wrote:

                If neither of these solves your issue, then open a command prompt, 'cd' to the jboss_home/bin directory, and enter:

                run

                Post all of the output in the command prompt window, including the 'run' command line.





                • 5. Re: newbie - JBoss
                  peterj

                  If, when you enter the 'run' command, you get no output and it just goes back to the command line, edit the run.bat file, commenting out the "@echo off" line and try it again - post that output.

                  • 6. Re: newbie - JBoss
                    velasquez

                     

                    "PeterJ" wrote:
                    If, when you enter the 'run' command, you get no output and it just goes back to the command line, edit the run.bat file, commenting out the "@echo off" line and try it again - post that output.



                    Hi Peter,

                    Please find the output.

                    C:\jboss-4.2.2\bin>rem JBoss Bootstrap Script for Win32

                    C:\jboss-4.2.2\bin>rem ---------------------------------------------------------
                    ----------------

                    C:\jboss-4.2.2\bin>rem $Id: run.bat 63249 2007-05-30 13:20:25Z dimitris@jboss.or
                    g $

                    C:\jboss-4.2.2\bin>set DIRNAME=.\

                    C:\jboss-4.2.2\bin>if "Windows_NT" == "Windows_NT" set DIRNAME=C:\jboss-4.2.2\bi
                    n\

                    C:\jboss-4.2.2\bin>set PROGNAME=run.bat

                    C:\jboss-4.2.2\bin>if "Windows_NT" == "Windows_NT" set PROGNAME=run.bat

                    C:\jboss-4.2.2\bin>pushd C:\jboss-4.2.2\bin\..

                    C:\jboss-4.2.2>set JBOSS_HOME=C:\jboss-4.2.2

                    C:\jboss-4.2.2>popd

                    C:\jboss-4.2.2\bin>REM Add bin/native to the PATH if present

                    C:\jboss-4.2.2\bin>if exist "C:\jboss-4.2.2\bin\native" set PATH=C:\jboss-4.2.2\
                    bin\native;C:\GTK\bin;c:\ruby\bin;C:\Oracle\bin;.;C:\Program Files\Java\jdk1.6.0
                    _07\bin;C:\Softwares\Ant\apache-ant-1.7.1-bin\apache-ant-1.7.1\bin;C:\Program Fi
                    les\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\90
                    \DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files
                    \Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Micros
                    oft Visual Studio 8\Common7\IDE\PrivateAssemblies\

                    C:\jboss-4.2.2\bin>if exist "C:\jboss-4.2.2\bin\native" set JAVA_OPTS= -Djava.li
                    brary.path="C:\GTK\bin;c:\ruby\bin;C:\Oracle\bin;.;C:\Program Files\Java\jdk1.6.
                    0_07\bin;C:\Softwares\Ant\apache-ant-1.7.1-bin\apache-ant-1.7.1\bin;C:\Program F
                    iles\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Microsoft SQL Server\9
                    0\DTS\Binn\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program File
                    s\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files\Micro
                    soft Visual Studio 8\Common7\IDE\PrivateAssemblies\"

                    C:\jboss-4.2.2\bin>rem Read all command line arguments

                    C:\jboss-4.2.2\bin>REM

                    C:\jboss-4.2.2\bin>REM The env variable commented out in favor of using to inc
                    lude

                    C:\jboss-4.2.2\bin>REM all args in java command line. See bug #840239. [jpl]

                    C:\jboss-4.2.2\bin>REM

                    C:\jboss-4.2.2\bin>REM set ARGS=

                    C:\jboss-4.2.2\bin>REM :loop

                    C:\jboss-4.2.2\bin>REM if [] == [] goto endloop

                    C:\jboss-4.2.2\bin>REM set ARGS=

                    C:\jboss-4.2.2\bin>REM shift

                    C:\jboss-4.2.2\bin>REM goto loop

                    C:\jboss-4.2.2\bin>REM :endloop

                    C:\jboss-4.2.2\bin>rem Find run.jar, or we can't continue

                    C:\jboss-4.2.2\bin>set RUNJAR=C:\jboss-4.2.2\bin\run.jar

                    C:\jboss-4.2.2\bin>if exist "C:\jboss-4.2.2\bin\run.jar" goto FOUND_RUN_JAR

                    C:\jboss-4.2.2\bin>if not "C:\Program Files\Java\jdk1.6.0_07" == "" goto ADD_TOO
                    LS

                    C:\jboss-4.2.2\bin>set JAVA=C:\Program Files\Java\jdk1.6.0_07\bin\java

                    C:\jboss-4.2.2\bin>rem A full JDK with toos.jar is not required anymore since jb
                    oss web packages

                    C:\jboss-4.2.2\bin>rem the eclipse jdt compiler and javassist has its own intern
                    al compiler.

                    C:\jboss-4.2.2\bin>if not exist "C:\Program Files\Java\jdk1.6.0_07\lib\tools.jar
                    " goto SKIP_TOOLS

                    C:\jboss-4.2.2\bin>rem If exists, point to the JDK javac compiler in case the us
                    er wants to

                    C:\jboss-4.2.2\bin>rem later override the eclipse jdt compiler for compiling JSP
                    pages.

                    C:\jboss-4.2.2\bin>set JAVAC_JAR=C:\Program Files\Java\jdk1.6.0_07\lib\tools.jar


                    C:\jboss-4.2.2\bin>rem If JBOSS_CLASSPATH or JAVAC_JAR is empty, don't include i
                    t, as this will

                    C:\jboss-4.2.2\bin>rem result in including the local directory in the classpath,
                    which makes

                    C:\jboss-4.2.2\bin>rem error tracking harder.

                    C:\jboss-4.2.2\bin>if not "C:\Program Files\Java\jdk1.6.0_07\lib\tools.jar" == "
                    " set RUNJAR=C:\Program Files\Java\jdk1.6.0_07\lib\tools.jar;C:\jboss-4.2.2\bin\
                    run.jar

                    C:\jboss-4.2.2\bin>if "" == "" set RUN_CLASSPATH=C:\Program Files\Java\jdk1.6.0_
                    07\lib\tools.jar;C:\jboss-4.2.2\bin\run.jar

                    C:\jboss-4.2.2\bin>if "C:\Program Files\Java\jdk1.6.0_07\lib\tools.jar;C:\jboss-
                    4.2.2\bin\run.jar" == "" set RUN_CLASSPATH=;C:\Program Files\Java\jdk1.6.0_07\li
                    b\tools.jar;C:\jboss-4.2.2\bin\run.jar

                    C:\jboss-4.2.2\bin>set JBOSS_CLASSPATH=C:\Program Files\Java\jdk1.6.0_07\lib\too
                    ls.jar;C:\jboss-4.2.2\bin\run.jar

                    C:\jboss-4.2.2\bin>rem Setup JBoss specific properties

                    C:\jboss-4.2.2\bin>set JAVA_OPTS= -Dprogram.name=run.bat

                    C:\jboss-4.2.2\bin>rem Add -server to the JVM options, if supported

                    C:\jboss-4.2.2\bin>"C:\Program Files\Java\jdk1.6.0_07\bin\java" -version 2>&1
                    | findstr /I hotspot 1>nul
                    'findstr' is not recognized as an internal or external command,
                    operable program or batch file.

                    C:\jboss-4.2.2\bin>

                    • 7. Re: newbie - JBoss
                      peterj

                      Note this:

                      C:\jboss-4.2.2\bin>"C:\Program Files\Java\jdk1.6.0_07\bin\java" -version 2>&1
                      | findstr /I hotspot 1>nul
                      'findstr' is not recognized as an internal or external command, operable program or batch file.


                      You are encountering the findstr problem. See http://wiki.jboss.org/wiki/FindstrCommandNotFound.

                      As an alternative, you can comment out the lines in run.bat that use findstr:

                      rem Add -server to the JVM options, if supported
                      rem "%JAVA%" -version 2>&1 | findstr /I hotspot > nul
                      rem if not errorlevel == 1 (set JAVA_OPTS=%JAVA_OPTS% -server)
                      


                      • 8. Re: newbie - JBoss
                        velasquez

                         

                        "PeterJ" wrote:
                        Note this:

                        C:\jboss-4.2.2\bin>"C:\Program Files\Java\jdk1.6.0_07\bin\java" -version 2>&1
                        | findstr /I hotspot 1>nul
                        'findstr' is not recognized as an internal or external command, operable program or batch file.


                        You are encountering the findstr problem. See http://wiki.jboss.org/wiki/FindstrCommandNotFound.

                        As an alternative, you can comment out the lines in run.bat that use findstr:

                        rem Add -server to the JVM options, if supported
                        rem "%JAVA%" -version 2>&1 | findstr /I hotspot > nul
                        rem if not errorlevel == 1 (set JAVA_OPTS=%JAVA_OPTS% -server)
                        



                        Hi Peter,

                        Thank you for your reply. The server started but I had another problem with MBeans. Could you please guide me.


                        --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
                        ObjectName: jboss:service=Naming
                        State: FAILED
                        Reason: java.rmi.server.ExportException: Port already in use: 1098; nested exc
                        eption is:
                        java.net.BindException: Address already in use: JVM_Bind
                        I Depend On:
                        jboss.system:service=ThreadPool
                        jboss:service=NamingBeanImpl
                        Depends On Me:
                        jboss.mq:service=DestinationManager
                        jboss.mq:service=Invoker
                        jboss.mq:service=InvocationLayer,type=UIL
                        jboss.mq:service=InvocationLayer,type=UILXA
                        jboss.mq:service=InvocationLayer,type=UIL2,alias=UIL2ConnectionFactory
                        jboss.mq:service=InvocationLayer,type=UIL2XA,alias=UIL2XAConnectionFactory
                        jboss.jms:alias=QueueConnectionFactory
                        jboss.jms:alias=TopicConnectionFactory
                        jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory
                        jboss.jmx:alias=jmx/rmi/RMIAdaptor
                        jboss:service=Mail


                        at org.jboss.deployment.MainDeployer.checkIncompleteDeployments(MainDepl
                        oyer.java:1385)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:785)
                        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                        java:39)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                        sorImpl.java:25)
                        at java.lang.reflect.Method.invoke(Method.java:597)
                        at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
                        er.java:155)
                        at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
                        at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
                        or.java:133)
                        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                        at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
                        BeanOperationInterceptor.java:142)
                        at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                        at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
                        java:264)
                        at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                        at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                        at $Proxy5.deploy(Unknown Source)
                        at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
                        at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
                        at org.jboss.Main.boot(Main.java:200)
                        at org.jboss.Main$1.run(Main.java:508)
                        at java.lang.Thread.run(Thread.java:619)
                        18:54:36,039 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8
                        666
                        18:54:36,054 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
                        18:54:36,070 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBos
                        s_4_2_2_GA date=200710221139)] Started in 15s:813ms




                        • 9. Re: newbie - JBoss
                          peterj
                          • 10. Re: newbie - JBoss
                            velasquez

                            Thank you Peter for all your help.. JBoss started without any errors

                            • 11. Re: newbie - JBoss
                              peterj

                              You are welcome. I'm glad that you are up and running.