任何人都可以帮我解决这个问题,并为我提供解决方案,因为我甚至无法弄清楚Apache Cxf或webservice调用或java版本号或web sphere 8.5.5会出现什么样的错误?< / p>
我使用 Apache cxf 2.7.8 版本,使用 web sphere 8.5.5版本发布 Soap网络服务, java 7.
Caused by: java.lang.UnsupportedClassVersionError: **JVMCFRE003 bad major version;** class=com/fd/foundation/frameworks/mybaitis/helloWorld/resource/MessageServiceImpl, **offset=6**
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
at java.net.URLClassLoader.access$300(URLClassLoader.java:79)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1038)
at java.security.AccessController.doPrivileged(AccessController.java:362)
at java.net.URLClassLoader.findClass(URLClassLoader.java:429)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:703)
at java.lang.ClassLoader.loadClass(ClassLoader.java:682)
at java.lang.ClassLoader.loadClass(ClassLoader.java:665)
at com.ibm.jtc.jax.tools.ws.wscompile.WsgenOptions.getClass(WsgenOptions.java:299)
在安装应用程序后检查我在websphere 8.5.5中的日志时出现以下错误?
[7/1/14 0:23:47:890 CDT] 00000043 SystemErr R java.net.URISyntaxException: Illegal character in path at index 16: file:/C:/Program Files (x86)/IBM/WebSphere/AppServer/lib/pc-appext.jar
[7/1/14 0:23:47:905 CDT] 00000043 SystemErr R at java.net.URI$Parser.fail(URI.java:2821)
[7/1/14 0:23:47:905 CDT] 00000043 SystemErr R at java.net.URI$Parser.checkChars(URI.java:2994)
[7/1/14 0:23:47:905 CDT] 00000043 SystemErr R at java.net.URI$Parser.parseHierarchical(URI.java:3078)
[7/1/14 0:23:47:906 CDT] 00000043 SystemErr R at java.net.URI$Parser.parse(URI.java:3026)
[7/1/14 0:23:47:906 CDT] 00000043 SystemErr R at java.net.URI.<init>(URI.java:588)
[7/1/14 0:23:47:906 CDT] 00000043 SystemErr R at java.net.URL.toURI(URL.java:930)
[7/1/14 0:23:47:906 CDT] 00000043 SystemErr R at com.ibm.wkplc.extensionregistry.RegistryLoader.canonicalizeFileURL(RegistryLoader.java:671
)
以下是我的网络服务实施类;
@WebService(endpointInterface = "com.fd.foundation.frameworks.mybaitis.helloWorld.resource.MessageServices",serviceName ="messageService")
public class MessageServiceImpl implements MessageServices {
public MessageVO getMessage(Integer id) {
MessageService message = new MessageService();
MessageVO mvo = message.getUserDetails1(101);
return mvo;
}
这个我的服务界面如下:
@WebService
public interface MessageServices{
@WebMethod
public MessageVO getMessage(Integer id);
}
答案 0 :(得分:1)
看起来你在Java 6而不是7上运行,代码是用Java7编译的
引起:java.lang.UnsupportedClassVersionError
检查SystemOut.log,如果服务器正确地以Java v7启动:
************ Start Display Current Environment ************
WebSphere [IBMJAVA7 7.0.5.0 cf011340.01]Platform 8.5.5.1 [BASE 8.5.5.1 cf011341.03] running with process name node02Cell\node02\server1 and process id 2920
Host Operating System is Windows Server 2003, version 5.2
Java version = 1.7.0, Java Compiler = j9jit26, Java VM name = IBM J9 VM
was.install.root = C:\IBM\WebSphere\AppServer85
user.install.root = C:\IBM\WebSphere\AppServer85\profiles\AppSrv1
Java Home = C:\IBM\WebSphere\AppServer85\java_1.7_32\jre