Im getting a really strange error that I cant for the life of me track down...
When using Jboss 5.0.1 (with some custom tweaks) and Eclipse I get the stack trace below when trying to submit a WS SOAP request.
My enviornment setup is:
Eclipse Ganymede Version: 3.4.2
Jboss 5.0.1 (with some custom tweaks)
Eclipse is running in JDK 1.5
Jboss is running in JDK 1.6
All of the myprojects in Eclipse are set to build with JDK 1.5, all launch environments (Except the Jboss server) are set to JDK 1.5. The reason JBoss needs 1.6 JDK is that it throws a whole bunch of versioning issues if its running on 1.5.
The strangest things is that if I use Eclipse to build the ear file and deploy it in the same JBoss instance outside of Eclipse everything works correctly, but as soon as I try and use Eclipse for deploynent the error above occurs. Its really strange as the JAVA_HOME in the JBoss run.bat is set to JDK 1.5 however if I do this in Eclipse it falls over. Im assuming ther is something within Eclipse that nees to be modified for this to work but as I said Ive tried everything I can think if with no joy.
Has anyone come across this before? and if so did you have any joy finding a work around?
Celinio Fernandes wrote:Hi,
I get the same exact problem. Same configuration, same error messages.
Did you find a solution to your problem ?
No solution as of yet...Im fairly sure I now understand the problem but cant figure it out....I had to put this aside as the deadline for the work was looming but I would like to find a solution thats for sure!
I think the problem is around how Eclipse sets up JaxB. Im leaning this was as the Jboss JaxB libs seem to be slightly different from the core sun ones and Im wondering if Eclipse is defaulting to the Sun Jars first and not the ones within the container you specify....like I said thats my thinking but I could be way off.
If you find a soltuon please come back and post it up there for future reference!
This happens when you start JBoss from Eclipse. If you start JBoss by running the run.sh (or run.bat in Windows), the error does not appear.
The root cause is a jar file conflict. When you start JBoss via run.sh, JVM uses the correct jar files provided with JBoss. But if you start JBoss via Eclipse, JVM does not use the JBoss bundled updated jars but uses the old ones available with JDK. As a developer, you may prefer to start JBoss via Eclipse during development. Here's how you do it:
1. In Eclipse, access the "Servers" view
2. Double click on JBoss server ("JBoss v5.0 at localhost"). The settings editor opens.
3. Double click on the "Open launch configuration" link found under "General Information". The launcher configuration editor opens.
4. Go to the "Arguments" tab. Your VM arguments might look like the following:
"-Dprogram.name=run.bat -Xms128m -Xmx512m -XX:MaxPermSize=256m"
5. Append the following to the above line after keeping a space (Note that you need to use the correct directory name where you have installed JBoss inside which you find the lib/endorsed directory):
Save everything and start the JBoss server.
Software Engineer(BSC):SCJP 1.5
(Knowledge is power when applied)