permaculture playing cards*
The moose likes JBoss/WildFly and the fly likes Jboss is not running.Exception in thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Jboss is not running.Exception in thread "main"" Watch "Jboss is not running.Exception in thread "main"" New topic
Author

Jboss is not running.Exception in thread "main"

anjali junghare
Greenhorn

Joined: Aug 08, 2008
Posts: 9
I am practicing eJB on jboss.But My Jboss not running.I have set JBOSS_HOME,JAVA_HOME correctly.
It shows the following error.
C:\Program Files\jboss-4.0.0\bin>run.bat
===============================================================================
.
JBoss Bootstrap Environment
.
JBOSS_HOME: C:\Program Files\jboss-4.0.0\bin\\..
.
JAVA: C:\Program Files\Java\jdk1.6.0_07\bin\java
.
JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
.
CLASSPATH: C:\Program Files\Java\jdk1.6.0_07\lib\tools.jar;C:\Program Files\jb
oss-4.0.0\bin\\run.jar
.
===============================================================================
.
Exception in thread "main" java.lang.NoClassDefFoundError: Files\jboss-4/0/0\bin
\\//\lib\endorsed
Caused by: java.lang.ClassNotFoundException: Files\jboss-4.0.0\bin\\..\lib\endor
sed
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

There are several problems here.

1) JBossAS 4.0.0 is not qualified to run with JDK 6. You should use a 1.5 JDK.

2) Why are you running 4.0.0? The latest 4.0.x version is 4.0.5.

3) If you are just now starting out with EJB, you should be using EJB3. In which case you should be using JBossAS 4.2.3.

4) Never install either JBossAS or the JDK in Program Files. Spaces in path names cause problems with a variety of Java libraries. I have mine installed at c:\apps\java\jdk1.6.0._07 and d:\opt\jboss\jboss-4.2.3.GA. (Yes I know that Program Files is the default installation location for JDK 6, but I never place it there.)


JBoss In Action
anjali junghare
Greenhorn

Joined: Aug 08, 2008
Posts: 9
Thanks Peter.
anjali junghare
Greenhorn

Joined: Aug 08, 2008
Posts: 9
Hi,
I set everything as you told.jdk1.6.0_07 and jboss-4.2.3.GA are on c:\.I have Set the path,JBOSS_HOME,JAVA_HOME properly.
But now i am getting this Error.

C:\workbook\ex04_1>echo %JAVA_HOME%
C:\Java\jdk1.6.0_07

C:\workbook\ex04_1>echo %JBOSS_HOME%
C:\jboss-4.2.3.GA

C:\workbook\ex04_1>ECHO %PATH%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Common
Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\DLLShar
ed\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\Q
uickTime\QTSystem\;C:\workbook\ant\bin;C:\Java\jdk1.6.0_07\bin;C:\Java\jdk1.6.0_
07\jre\bin;C:\jboss-4.2.3.GA\bin

C:\workbook\ex04_1>ant
Buildfile: build.xml

BUILD FAILED
C:\workbook\ex04_1\${env.JBOSS_HOME}\client not found.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

In your original post you were trying to run the app server. In your latest post you are trying to run an ant script. Are you now able to run the app server? If not, let's work on that problem first before we get side-tracked on another issue.

By the way, I have no idea what build script you are running.
anjali junghare
Greenhorn

Joined: Aug 08, 2008
Posts: 9
I solved the problem I was using wrong version of ant
 
 
subject: Jboss is not running.Exception in thread "main"