This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Starting server(JBoss) from eclipse

 
akhil achuthan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Thanks
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
akhil achuthan
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic