File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Starting server(JBoss) from eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Starting server(JBoss) from eclipse" Watch "Starting server(JBoss) from eclipse" New topic

Starting server(JBoss) from eclipse

akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
I am facing problem trying to start jboss(4.2) from eclipse. I have edited the jboss42.serverdef file to have the start main class as my application main class rather than the jboss one. Also kept all the necessary jars in its classpath, but i get so many exceptions, to name a few - noclassdeffounderror for many of the jboss classes, EJB3ServiceException for jbossws etc...

Why is this showing so many noclassdeffounderror? For starting the jboss server I believe only the basic startup jars like run.jar etc should be sufficient. All the rest of the jars will be located by the server itself from its library directories.

What makes me suspect eclipse is that when i start the server with my .bat script from command prompt, everything works just fine. What i started from command prompt is the same setup and my bat file contains exactly the same set of jars and argumets that i have configured in eclipse server startup.

I am using eclipse galileo

Please help

Peter Johnson

Joined: May 14, 2008
Posts: 5852

Try comparing the boot.log file from when you start on the command line and when you start in Eclipse. Also compare the console logs up to the first exception. That might give you some idea as to what is different.

Also, try setting the _JAVA_LAUNCHER_DEBUG env var. That will print out info about what java.exe is doing to launch the Java app.

If none of that hints at what the issue is, then post the console log up through the first exception stack trace you are getting.

Also, just to be clear:

a) You have a batch file (similar to run.bat) that runs your class and starts the app server. This batch file successfulyl starts the app server from the command line.

b) Within Eclipse, you are creating a server instance (File | New | Other | Server, and then choosing a server option which references your customized app server) and then starting the server using the Server View.

JBoss In Action
akhil achuthan
Ranch Hand

Joined: Mar 29, 2006
Posts: 69
Oops... my mistake.. i confess....

The problem saw a wrong argument for JBOSS_HOME go into the org.jboss.Main.main() while invoking. This main class in invoked from within my application with a set of arguments....

given it correct and everything worked just fine........

Thanks Peter
I agree. Here's the link:
subject: Starting server(JBoss) from eclipse
It's not a secret anymore!