• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jboss is not running.Exception in thread "main"

 
anjali junghare
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
anjali junghare
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter.
 
anjali junghare
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved the problem I was using wrong version of ant
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic