生产报错显示:Internal Server Error,可能是跳转到一个页面,显示的是这个提示吧
把代码部署测试环境,报错代码信息:
HTTP Status 500 - Servlet.init() for servlet AxisServlet threw exception
type Exception report
message Servlet.init() for servlet AxisServlet threw exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet AxisServlet threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:745)
root cause
java.lang.UnsupportedClassVersionError: PoC : Unsupported major.minor version 52.0 (unable to load class PoC)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2922)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1174)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1669)
java.lang.ClassLoader.loadClass(ClassLoader.java:412)
org.apache.axis2.deployment.DeploymentClassLoader.loadClass(DeploymentClassLoader.java:277)
java.lang.ClassLoader.loadClass(ClassLoader.java:358)
org.apache.axis2.util.Loader.loadClass(Loader.java:218)
org.apache.axis2.jaxws.framework.JAXWSDeployerSupport.deployClasses(JAXWSDeployerSupport.java:208)
org.apache.axis2.jaxws.framework.JAXWSDeployerSupport.deployClasses(JAXWSDeployerSupport.java:161)
org.apache.axis2.jaxws.framework.JAXWSDeployer.deployServicesInWARClassPath(JAXWSDeployer.java:95)
org.apache.axis2.jaxws.framework.JAXWSDeployer.init(JAXWSDeployer.java:66)
org.apache.axis2.deployment.DeploymentEngine.initializeDeployers(DeploymentEngine.java:938)
org.apache.axis2.deployment.DeploymentEngine.setConfigContext(DeploymentEngine.java:931)
org.apache.axis2.deployment.WarBasedAxisConfigurator.setConfigContext(WarBasedAxisConfigurator.java:355)
org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:89)
org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:620)
org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:471)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
java.lang.Thread.run(Thread.java:745)
原来是之前有人做安全性测试,把一个叫Poc.class的文件放在了我们项目里,这个是用jdk1.8编译的,我们项目是1.7编译的,所以就报错了。
但是郁闷的是,项目能正常访问,就是WebService才报错,看来axis2也太脆弱了。