2013-03-22 60 views
0

我想在turnkey linux tomcat6設備上使用軸1.4。軸1.4 linux的幫助 - happyaxis不高興AXISCLASSPATH全錯了嗎?

短版本是假設它是問題的根源;在debian上設置AXISCLASSPATH的正確方法是什麼?

長版本是:

axis.war部署正確。我已將AXIS_HOME和AXIS_LIB添加到etc/environment中,如下所示:

CATALINA_HOME="/usr/share/tomcat6" 
CATALINA_BASE="/var/lib/tomcat6" 
CATALINA_OPTS="-server -Xms384M -Xmx512M -XX:MaxPermSize=256M" 
JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.26" 
AXIS_HOME="/var/lib/tomcat6/webapps/axis" 
AXIS_LIB="/var/lib/tomcat6/webapps/axis/WEB-INF/lib" 

和所有回顯正確。 tomcat6中管理頁面顯示軸運行,/本地主機/軸負荷罰款,但happyaxis被踢:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error() that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /happyaxis.jsp at line 45

42: */ 43: Class classExists(String classname) { 44:
try { 45: return Class.forName(classname); 46: } catch (ClassNotFoundException e) { 47: return null; 48:
}

Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

javax.servlet.ServletException: java.lang.UnsupportedClassVersionError: com/ibm/wsdl/factory/WSDLFactoryImpl : Unsupported major.minor version 51.0 (unable to load class com.ibm.wsdl.factory.WSDLFactoryImpl) org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794) org.apache.jsp.happyaxis_jsp._jspService(happyaxis_jsp.java:808) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.UnsupportedClassVersionError: com/ibm/wsdl/factory/WSDLFactoryImpl : Unsupported major.minor version 51.0 (unable to load class com.ibm.wsdl.factory.WSDLFactoryImpl) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2822) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128) org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66) java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:169) org.apache.jsp.happyaxis_jsp.classExists(happyaxis_jsp.java:34) org.apache.jsp.happyaxis_jsp.probeClass(happyaxis_jsp.java:77) org.apache.jsp.happyaxis_jsp.needClass(happyaxis_jsp.java:151) org.apache.jsp.happyaxis_jsp._jspService(happyaxis_jsp.java:650) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

我用軸在過去Ubuntu上,並與OpenJDK的問題。所以我嘗試刪除openjdk並安裝sun-java-6並得到相同的錯誤。

根據文檔的每一位我所看到的,$ AXISCLASSPATH需要指向軸/ lib目錄的.jar文件,可能是問題,但Apache文檔是很老:

Unix users have to do something similar. Below we have installed AXIS into /usr/axis and are using the bash shell. See your shell's documentation for differences. To make variables permeate you will need to add them to your shell's startup (dot) files. Again, see your shell's documentation.

set AXIS_HOME=/usr/axis 
set AXIS_LIB=$AXIS_HOME/lib 
set AXISCLASSPATH=$AXIS_LIB/axis.jar:$AXIS_LIB/commons-discovery.jar: 
    $AXIS_LIB/commons-logging.jar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/saaj.jar: 
    $AXIS_LIB/log4j-1.2.8.jar:$AXIS_LIB/xml-apis.jar:$AXIS_LIB/xercesImpl.jar 
export AXIS_HOME; export AXIS_LIB; export AXISCLASSPATH 

當我部署,xercesImpl.jar不存在於lib目錄中,log4-1.2.8.jar只是log4j.jar

我從文件系統中的其他地方複製了xercesImpl,並進行了詳盡的搜索之後我嘗試設置此變量命令行,etc/environment,tomcat6.sh和其他一些,都沒有成功。

我發現,將正確地回聲是在命令行代碼的唯一方法:

export AXISCLASSPATH:$AXIS_LIB/axis.jar;$AXIS_LIB/commons-discover.jar;$AXIS_LIB/commons-logging.jar;$AXIS_LIB/jaxrpc.jar;$AXIS_LIB/saaj.jar;$AXIS_LIB/log4j.jar 

仍然沒有變化。作爲黑暗中的刺,我將wsdl4j.jar從文件系統的其他位置複製到/ lib,並將其添加到上述導出命令中,但仍然沒有快樂

回答

0

「Unsupported major.minor version 51.0」表示「JVM版本過低; 51 == Java7「。

史蒂夫

(誰在10年前寫的happyaxis.jsp)