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.
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.