Tuesday, October 21, 2008

JBossWS Eclipse JUnit Error

I played with JBossWS for the first time this evening. I'm runningEclipse with JBossTools installed. It was easy enough to compile (Ant task) and import the project into Eclipse.

However, when I ran the tests I got a "Java Virtual Machine Error." The popup read "Could not find the main class. Program will exit." There's an post about this in the JBoss forums but no answer.

The tests run from Ant (even within Eclipse.) While running the tests from the command line a second time I noticed the following message :

tests-prepare: [echo] [echo] ----------------------------------------------- [echo] jboss.home = C:/tools/servers/jboss/jboss-4.2.3.GA [echo] excludesfile = C:\tools\jbossws\jbossws-native-3.0.4.GA\jbossws-native-bin-dist/tests/resources/test-exclude s-jboss423.txt [echo] java.home = C:\tools\java\j2se5.0u16\jre

It's pointing to the jre of my java home for some reason. I check the environment variable by running, echo %JAVA_HOME%, but it is pointing to the base install not just the jre.

Searching through the project for "jre" doesn't return anything. I hate to give up before I find a solution, but I had stuff to get done.

I ran the "ant eclipse" task again and imported into a fresh Eclipse install. No problem running the tests.

I'll try to reproduce and file a Jira issue. I thought I'd post this just in case anyone else is banging their head against the same wall.

No comments: