The major.minor version '49.0' is too recent for this tool to understand.
说明用于编译和运行java class的JDK版本不同. 在命令行下打
java -version
可以看到运行时所用的JDK的版本. 确认你的编译环境用了同样的JDK版本.
说明用于编译和运行java class的JDK版本不同. 在命令行下打
java -version
可以看到运行时所用的JDK的版本. 确认你的编译环境用了同样的JDK版本.
解决方案 »
- ext 求解
- HQL连表查询,谁会啊?
- 配置struts2总是出问题!各位高手看看
- 求救Java怎么调用 .net的webService (附wsdl xml)
- jdom解析XML出现异常。
- 使用Hibernate3连接远程SQL2000成功.连接本地却失败!
- struts2没有自己独特的标签检验程序吗
- java调用OCX控件方法 输出参数问题(急)
- 在线等~~~socket问题
- 装J2EE SDK前是不是应该先装J2SE SDK?
- No tag "datetimepicker" defined in tag library imported with prefix "s"
- 请教:struts2的<s:table></s:table>标签怎么用?
一开始装的是JDK5后好自动升级成JDK6
Sorry, something seems to have gone wrong... here are the details:Fault - Error while compiling: D:\workspace\DemoACS\WebContent\WEB-INF\jwsClasses\EchoHeaders.java
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.compileError
faultSubcode:
faultString: Error while compiling: D:\workspace\DemoACS\WebContent\WEB-INF\jwsClasses\EchoHeaders.java
faultActor:
faultNode:
faultDetail:
{}Errors:Error compiling D:\workspace\DemoACS\WebContent\WEB-INF\jwsClasses\EchoHeaders.java:
Line 0, column 0: could not parse error message: error: Invalid class file format in C:\JDK5\lib\rt.jar(java/util/ArrayList.class). The major.minor version '49.0' is too recent for this tool to understand.
D:\workspace\DemoACS\WebContent\WEB-INF\jwsClasses\EchoHeaders.java:1: Class java.util.ArrayList not found in import.
import java.util.ArrayList;Line 0, column 0: could not parse error message: ^
error: Invalid class file format in C:\JDK5\lib\rt.jar(java/util/Enumeration.class). The major.minor version '49.0' is too recent for this tool to understand.
D:\workspace\DemoACS\WebContent\WEB-INF\jwsClasses\EchoHeaders.java:2: Class java.util.Enumeration not found in import.Line 0, column 0: could not parse error message: import java.util.Enumeration;
^
error: Invalid class file format in C:\JDK5\lib\rt.jar(java/lang/Object.class). The major.minor version '49.0' is too recent for this tool to understand.Line 10, column 13: Superclass java.lang.Object of class EchoHeaders not found.还是不行
我下的是AXIS1.4的BIN把里面的WEBAPP部署到TOMCAT下就出错.
JDK 5' major.minor version is '49.0'when tomcat start, check the version of JRE it uses. e.g.
Using CATALINA_BASE: D:\tools\apache-tomcat-5.5.26
Using CATALINA_HOME: D:\tools\apache-tomcat-5.5.26
Using CATALINA_TMPDIR: D:\tools\apache-tomcat-5.5.26\temp
Using JRE_HOME: C:\java\jdk1.5.0_11
我下了一个AXIS1.4 把WEBAPP部署到TOMCAT下
起动TOMCAT就出这样的错
--------------------------------------------------------------------------------
信息: XML validation disabled
- Unable to find config file. Creating new servlet engine config file: /WEB-INF
/server-config.wsdd
--------------------------------------------------------------------------------
我是学教程做的 但教程里没有要我写和配置server-config.wsdd
启动后http://localhost:8080/axis能显示测试页
我添加mail.jar/activation.jar/saaj-api.jar/saaj-impl.jar/xmlsec-1.4.1.jar放入工程LIB下
显示好像我的包没有加载成功一样???????
---------------------------------------------------------------------
Found SAAJ API ( javax.xml.soap.SOAPMessage ) at an unknown location
Found JAX-RPC API ( javax.xml.rpc.Service ) at D:\workspace\DemoServer\WebContent\WEB-INF\lib\jaxrpc.jar
Found Apache-Axis ( org.apache.axis.transport.http.AxisServlet ) at D:\workspace\DemoServer\WebContent\WEB-INF\lib\axis.jar
Found Jakarta-Commons Discovery ( org.apache.commons.discovery.Resource ) at D:\workspace\DemoServer\WebContent\WEB-INF\lib\commons-discovery-0.2.jar
Found Jakarta-Commons Logging ( org.apache.commons.logging.Log ) at C:\Tomcat5\bin\commons-logging-api.jar
Found Log4j ( org.apache.log4j.Layout ) at D:\workspace\DemoServer\WebContent\WEB-INF\lib\log4j-1.2.8.jar
Found IBM's WSDL4Java ( com.ibm.wsdl.factory.WSDLFactoryImpl ) at D:\workspace\DemoServer\WebContent\WEB-INF\lib\wsdl4j-1.5.1.jar
Found JAXP implementation ( javax.xml.parsers.SAXParserFactory ) at an unknown location
Found Activation API ( javax.activation.DataHandler ) at an unknown location----------------------------------------------------------------------
我在自己写一个JWS
public class DemoMSG {
public String getName(String name){
return "hi "+name;
}
}
----------------------------------------------------------------------
就显示出错了:
AXIS error
Sorry, something seems to have gone wrong... here are the details:Fault - Error while compiling: D:\workspace\DemoServer\WebContent\WEB-INF\jwsClasses\DemoMSG.java
AxisFault
faultCode: {http://xml.apache.org/axis/}Server.compileError
faultSubcode:
faultString: Error while compiling: D:\workspace\DemoServer\WebContent\WEB-INF\jwsClasses\DemoMSG.java
faultActor:
faultNode:
faultDetail:
{}Errors:Error compiling D:\workspace\DemoServer\WebContent\WEB-INF\jwsClasses\DemoMSG.java:
Line 0, column 0: could not parse error message: error: Invalid class file format in C:\JDK5\lib\rt.jar(java/lang/Object.class). The major.minor version '49.0' is too recent for this tool to understand.
D:\workspace\DemoServer\WebContent\WEB-INF\jwsClasses\DemoMSG.java:2: Superclass java.lang.Object of class DemoMSG not found.
public class DemoMSG {---------------------------------------------
我是用Eclipse开发的 在EC下面JVM选的是6.0
---------------------------------------------
是不是有必要我要在LINUX下起TOMCAT做测试?
如果你是Windows, 应该更加方便看. 在命令行下到:
> cd C:\Tomcat5\bin
> startup.bat就可以看到tomcat是用的什么什么JRE
头四个字节是java字节码的魔数 magic number,是一种咖啡的名字 cafe babe,它表明那是个java的字节码。 如果用jdk1.5的编译器 javac,用参数 -target 1.4 可以制定编译出的目标代码能在jvm1.4下运行,也就是版本为48.0的class
CA FE BA BE 00 00 00 30
完成安装后BIN下面只有
bootstrap.jar/commons-logging-api.jar/tcnative-1.dll/tomcat5.exe/tomcat5w.exe/tomcat-juli.jar
但查了一下TOMCAT运行的是JDK5的JVM.DLL 因是用是JDK5
---------------------------------------------------
下面是我在WORK下用Ultraedit开的CLASS头八字节
CA FE BA BE 00 00 00 31 TOMCAT用是的5.0的JDK我看了一下AXIS下的自己的WEBAPP下的CLASS是
CA FE BA BE 00 00 00 2E?这是什么版的JDK?
---------------------------------------------------
我下一步要做那一些东西,AXIS下的WEBAPP不能在我的TOMCAT中部署?
TOMCAT的JRE用的好像是5.0
我下载的AXIS是用的1.2版的
把AXIS下的CLASS全清了 在运行自己的JWS就可以显示了
谢谢二位,学到不少东西.