*
The moose likes JBoss/WildFly and the fly likes Jboss not starting aka shutting down Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Jboss not starting aka shutting down" Watch "Jboss not starting aka shutting down" New topic
Author

Jboss not starting aka shutting down

Kyle Lamson
Greenhorn

Joined: Dec 23, 2009
Posts: 5
I am using JBoss-4.2.2.GA on Windows XP and using jdk1.5.0_15.

Jboss worked fine the last year, then my machine had to be re-imaged and everything re-installed.

When I click the run.bat, the window opens and immediately closes again. I reinstalled and still the same shutting down.

I went to the JBoss source on our network and tried running it, the window stayed open a moment, but shut down before any text appears. I went to the same network source and ran it with a laptop and it ran fine, so the source of the install is not corrupt, it is my machine.

The funny thing is that JBoss is loaded in Eclipse as the server and through eclipse I can start it just fine. Only in the direct run.bat clicking mode it will not open the command window. Trying to run it through a DOS command window does not work either.

IIS is not installed at all.

In the environment variables JBoss_Home is C:\jboss-4.2.2.GA & Java_Home is C:\Program Files\Java\jdk1.5.0_15

As mentioned above I tested the source files on another machine and they are not corrupt.

Any one have any suggestions on what I can look for? My fellow programmers and server folks are at a loss as well.

Thank You, Gunalche’esh, Ha’w'aa

Kyle




Thank You, Gunalche’esh, Ha’w'aa

Kyle

--
Kyle J. Lamson
Analyst Programmer III
State of Alaska
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

Kyle, welcome to Java Ranch!

Double-clicking the run.bat file is never a good idea. Instead, open a command prompt, cd to C:\jboss-4.2.2.GA\bin, and then run run.bat. If there is any output, and you can't fix the problem based on it, post it. If there is no output, edit the run.bat file and comment out the "echo" command on the first line. Then run it again and post the output (if that still does not help).

Most likely the issue is either the setting of JAVA_HOME, or the well known findstr issue: (jboss findstr)


JBoss In Action
Kyle Lamson
Greenhorn

Joined: Dec 23, 2009
Posts: 5
Thank you Peter.

Here is what I got commenting out the Echo as you suggested:

C:\>rem @echo off

C:\>rem ------------------------------------------------------------------------
-

C:\>rem JBoss Bootstrap Script for Win32

C:\>rem ------------------------------------------------------------------------
-

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

C:\>set DIRNAME=.\

C:\>if "Windows_NT" == "Windows_NT" set DIRNAME=C:\jboss-4.2.2.GA\bin\

C:\>set PROGNAME=run.bat

C:\>if "Windows_NT" == "Windows_NT" set PROGNAME=run.bat

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

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

C:\jboss-4.2.2.GA>popd

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

C:\>if exist "C:\jboss-4.2.2.GA\bin\native" set PATH=C:\jboss-4.2.2.GA\bin\nativ
e;C:\oracle\product\10.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOW
S\System32\Wbem;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls\ENGLISH;C:\Progr
am Files\Java\jdk1.5.0_15\jre\bin;C:\Program Files\QuickTime\QTSystem\;C:\Progra
m Files\Rational\common;C:\Program Files\Rational\ClearCase\bin;c:\orawin95\bin;
C:\Novell\Client32;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\ORAWIN\BIN;C:\ORAWIN95\BIN

C:\>if exist "C:\jboss-4.2.2.GA\bin\native" set JAVA_OPTS= -Djava.library.path="
C:\oracle\product\10.2.0\client_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\
System32\Wbem;C:\WINDOWS\system32\nls;C:\WINDOWS\system32\nls\ENGLISH;C:\Program
Files\Java\jdk1.5.0_15\jre\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program
Files\Rational\common;C:\Program Files\Rational\ClearCase\bin;c:\orawin95\bin;C:
\Novell\Client32;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\ORAWIN\BIN;C:\ORAWIN95\BIN"

C:\>rem Read all command line arguments

C:\>REM

C:\>REM The env variable commented out in favor of using to include

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

C:\>REM

C:\>REM set ARGS=

C:\>REM :loop

C:\>REM if [] == [] goto endloop

C:\>REM set ARGS=

C:\>REM shift

C:\>REM goto loop

C:\>REM :endloop

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

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

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

C:\>if not "C:\Program Files\Java\jdk1.5.0_15" == "" goto ADD_TOOLS

C:\>set JAVA=C:\Program Files\Java\jdk1.5.0_15\bin\java

C:\>rem A full JDK with toos.jar is not required anymore since jboss web package
s

C:\>rem the eclipse jdt compiler and javassist has its own internal compiler.

C:\>if not exist "C:\Program Files\Java\jdk1.5.0_15\lib\tools.jar" goto SKIP_TOO
LS

C:\>rem If JBOSS_CLASSPATH or JAVAC_JAR is empty, don't include it, as this will


C:\>rem result in including the local directory in the classpath, which makes

C:\>rem error tracking harder.

C:\>if not "" == "" set RUNJAR=;C:\jboss-4.2.2.GA\bin\run.jar

C:\>if "" == "" set RUN_CLASSPATH=C:\jboss-4.2.2.GA\bin\run.jar

C:\>if "C:\jboss-4.2.2.GA\bin\run.jar" == "" set RUN_CLASSPATH=;C:\jboss-4.2.2.G
A\bin\run.jar

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

C:\>rem Setup JBoss specific properties

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

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

C:\>"C:\Program Files\Java\jdk1.5.0_15\bin\java" -version 2>&1 | findstr /I h
otspot 1>nul


--------------------------------------------------------------

As for the rest:
I get no error messages to work off or print here, the window just shuts down as fast as it opens.

It does the same if I run it through the command window

I am not sure how to follow the "findstr," but I did check and findstr is in my windows/system32 folder.

The code in the bat file seems right:

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


Thanks for your time and help and Merry Christmas.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9960
    
163

C:\Program Files\Java\jdk1.5.0_15


Do not install Java in a folder containing spaces. Move it to a different folder (for ex: C:\Java\jdk1.5.0_15). Then set the JAVA_HOME to point to this new location.

[My Blog] [JavaRanch Journal]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

If Jaikiran's suggestion (which I highly recommend) doesn't help, you can always comment out those three line:



Our you could always set the -server option (assuming you have the Sun JDK):



By the way, I have seen these lines fail for inexplicable reasons - sometimes you have to run the individual commands manually from the command prompt to get to the root cause.
Kyle Lamson
Greenhorn

Joined: Dec 23, 2009
Posts: 5
OK, now those above me are very intent on everyone using the exact same development workspace which requires Java be in the default place, Program Files.

Personally I feel it is more important that the bloody thing works. So just to be sure (I am new to Java development), can I just move the folder and repoint the variable or must I re-install? Man, all this just to create a Flex app, Grrrrrr

Thanks
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9960
    
163

Kyle Lamson wrote:
So just to be sure (I am new to Java development), can I just move the folder and repoint the variable


Yes, that should be enough. No need to re-install.
Kyle Lamson
Greenhorn

Joined: Dec 23, 2009
Posts: 5
Excellant! Much appreciated and I will let you know how it goes. Only half a day today and then vacation, but I will try to test it before I go.

Cheers
Kyle Lamson
Greenhorn

Joined: Dec 23, 2009
Posts: 5
Excellent Gentlemen!

Alone they did not work but got an error message for me, then the two combined got it working.

Just moving did not help, so I commented out the lines above, now it opened and gave me a "Path error". So I went into the Environmental Variables and pointed them specifically to the jre\bin within the jdk as it was looking for java.exe in a bin folder in the JDK which did not exist. After re-pointing it it was still off as it was adding a second \bin\ to the path. Once I backed off my bin and left it going to the jre level everything worked fine.

Guess I will need to update our documentation... I have been working on this for over 2 weeks off and on.

By the way I removed the comments of the lines you mentioned above Pete and it still works fine.

Finally I can get back to programming with the new year.

Pete, Jaikiran... I am much obliged. Happy New Year... a week vacation for me.

But first I book mark and specially note this forum... Java is not my strong point so I will likely be back.

Cheers
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jboss not starting aka shutting down
 
Similar Threads
problem in starting jboss 7
Jboss
another Eclipse & JBoss question
The console/command window disappears (jboss via run.bat)
Starting JBoss