• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Jboss not starting aka shutting down

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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


 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Kyle Lamson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 think she's lovely. It's this tiny ad that called her crazy:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic