This is just a quick fix post for those whom are having this problem when running JBoss 6.x with Netbeans 7.x. This problem will occur when after you have installed a newly unzipped JBoss 6.x app server and getting it register with Netbeans 7 through the “Service” tab -> Servers tree -> “Add Server“, and when you try to start the server, it will hang with the error message:Calling C:\Java\jboss-6.1.0-final\bin\run.conf.bat ============================================================================ JBoss Bootstrap Environment JBOSS_HOME: C:\Java\jboss-6.1.0-final JAVA: C:\Program Files\Java\jdk1.6.0_30\bin\java JAVA_OPTS: -Dprogram.name=run.bat -Dlogging.configuration=file:logging.properties -Xms128m -Xmx512m -XX:MaxPermSize=256m -server CLASSPATH: C:\Program Files\Java\jdk1.6.0_30\lib\tools.jar;C:\Java\jboss-6.1.0-final\bin\run.jar ============================================================================ Unable to read the logging configuration from 'file:logging.properties' (java.io.FileNotFoundException:logging.properties (The system cannot find the file specified
Solution for Microsoft Windows
If you are running on windows, you can fix this issue before you start the JBoss server through Netbeans:
- Go to the “bin” directory where you’ve installed JBoss
- Edit the “run.bat” file
- Search for the line “set JAVA_OPTS=-Dprogram.name=%PROGNAME% -Dlogging.configuration=file:%DIRNAME%logging.properties %JAVA_OPTS%“
Change the %DIRNAME% to your absolute path to the “bin” directory of your installed JBoss.e.g.set JAVA_OPTS=-Dprogram.name=%PROGNAME% -Dlogging.configuration=file:”C:\Java\jboss-6.1.0-final\bin\logging.properties” %JAVA_OPTS%- I’m adding the double quote ” so that if your directory name has spaces, it will still be legitimate.
- Try to start your server through Netbeans again, it should be working fine after this.
Solution for Unix/Linux
If you are running on any flavor of Unix or Linux, you can fix this issue before you start the JBoss server through Netbeans:
- Go to the “bin” directory where you’ve installed JBoss
- Edit the “run.sh” file
- Search for the line JAVA_OPTS=”${JAVA_OPTS:+$JAVA_OPTS -Dlogging.configuration=file:${DIRNAME}/logging.properties}”
- Change the ${DIRNAME} to your absolute path to the “bin” directory of your installed JBoss.e.g.JAVA_OPTS=”${JAVA_OPTS:+$JAVA_OPTS -Dlogging.configuration=file:/java/jboss-6.1.0-final/bin/logging.properties}”
- Try to start your server through Netbeans again, it should be working fine after this.
Hope it helps.
Hey... thanks for the hint. Using an old app and was just about to quit trying to get this running until I happened upon your post. Had already spent most of the day trying to find something that worked.
ReplyDelete