一个SSH项目,打包出来后放到windows服务器上可以正常启动和访问,但是放的Linux服务器上无法正常启动。 Spring版本4X JDK1.8 Tomcat8 windows和Linux均为阿里云的服务器。 以下是Linux中的报错信息:
19:08:03.493 [localhost-startStop-1] ERROR org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed
com.opensymphony.xwork2.config.ConfigurationException: Unable to load configuration.
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69) ~[xwork-core-2.3.3.jar:2.3.3]
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:960) ~[struts2-core-2.5.13.jar:2.5.13]
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:466) ~[struts2-core-2.5.13.jar:2.5.13]
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:499) [struts2-core-2.5.13.jar:2.5.13]
at org.apache.struts2.dispatcher.InitOperations.initDispatcher(InitOperations.java:75) [struts2-core-2.5.13.jar:2.5.13]
at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:63) [struts2-core-2.5.13.jar:2.5.13]
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) [catalina.jar:8.0.45]
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) [catalina.jar:8.0.45]
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) [catalina.jar:8.0.45]
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4700) [catalina.jar:8.0.45]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5340) [catalina.jar:8.0.45]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) [catalina.jar:8.0.45]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753) [catalina.jar:8.0.45]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729) [catalina.jar:8.0.45]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) [catalina.jar:8.0.45]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:976) [catalina.jar:8.0.45]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1853) [catalina.jar:8.0.45]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Caused by: com.opensymphony.xwork2.config.ConfigurationException: Unable to load bean: type:com.opensymphony.xwork2.TextProviderFactory class:com.opensymphony.xwork2.StrutsTextProviderFactory
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:235) ~[xwork-core-2.3.3.jar:2.3.3]
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:98) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:206) ~[xwork-core-2.3.3.jar:2.3.3]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) ~[xwork-core-2.3.3.jar:2.3.3]
... 21 more
Caused by: java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_222]
at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_222]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_222]
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2567) ~[catalina.jar:8.0.45]
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:859) ~[catalina.jar:8.0.45]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1302) ~[catalina.jar:8.0.45]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167) ~[catalina.jar:8.0.45]
at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:144) ~[xwork-core-2.3.3.jar:2.3.3]
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:206) ~[xwork-core-2.3.3.jar:2.3.3]
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:98) ~[struts2-core-2.5.13.jar:2.5.13]
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:206) ~[xwork-core-2.3.3.jar:2.3.3]
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66) ~[xwork-core-2.3.3.jar:2.3.3]
... 21 more
遇到了同样的问题,在CSDN看到了,希望阿里云团队能够给出正确、标准的答案~请查看
异常原因:Caused by: java.lang.IncompatibleClassChangeError: Implementing class 参考这个看看:https://blog.csdn.net/yaowj2/article/details/50059329
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。