I've been searching all over for why I'm getting this error, but when I run
jaxws-tools wsgen, I am getting this:
*C:\cygwin\home\samerrel\downloads\jaxws-samples\example2>jaxws-tools wsgen
-cp %
cp%;output/WEB-INF/classes -wsdl -r output/WEB-INF/WSDL -d
output/WEB-INF/classe
s samples.example2.HelloWorld
Using GERONIMO_BASE: C:\IBM\WebSphere\AppServerCE
Using GERONIMO_HOME: C:\IBM\WebSphere\AppServerCE
Using GERONIMO_TMPDIR: var\temp
Using JRE_HOME: C:\IBM\Java50\jre
Exception in thread "main" java.lang.UnsupportedClassVersionError:
(samples/exam
ple2/HelloWorld) bad major version at offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:228)
at java.security.SecureClassLoader.defineClass(
SecureClassLoader.java:14
8)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:557)
at java.net.URLClassLoader.access$400(URLClassLoader.java:120)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:962)
at java.security.AccessController.doPrivileged(AccessController.java
:275
)
at java.net.URLClassLoader.findClass(URLClassLoader.java:488)
at java.lang.ClassLoader.loadClass(ClassLoader.java:607)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at com.sun.tools.ws.wscompile.CompileTool.getClass(CompileTool.java
:865)
at com.sun.tools.ws.wscompile.CompileTool.isValidWSGenClass
(CompileTool.
java:452)
at com.sun.tools.ws.wscompile.CompileTool.parseArguments(
CompileTool.jav
a:427)
at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:49)
at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen
(WSToolsObjectFac
toryImpl.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.
java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.apache.geronimo.jaxws.builder.JAXWSTools.invoke(
JAXWSTools.java:1
90)
at org.apache.geronimo.jaxws.builder.JAXWSTools.invoke(
JAXWSTools.java:1
74)
at org.apache.geronimo.jaxws.builder.JAXWSTools.invokeWsgen(
JAXWSTools.j
ava:161)
at org.apache.geronimo.jaxws.builder.JAXWSToolsCLI.main(
JAXWSToolsCLI.ja
va:64)*
Here are the contents of the HelloWorld.java file:
*// demonstrate web service with supplied wsdl and endpoint interface
package samples.example2;
import javax.jws.WebService;
@WebService(endpointInterface="samples.example2.HelloWorldSEI",
wsdlLocation="WEB-INF/WSDL/HelloWorldService.wsdl")
public class HelloWorld {
public String sayGreeting(String input){
return("Example2 hello, " + input);
}
}*
As you can tell I'm running IBM's JDK 5 and I'm using WebSphere Application
Server Community Edition. When I ran wsgen on this file using the standard
WebSphere Application Server's wsgen, I don't run into any problems. I only
get this problem with the community edition/Geronimo.
Any help or pointers in the right direction would be greatly appreciated.
Regards,
Sam Merrell