• struts2项目启动报错。关于jar的问题


    严重: Exception starting filter struts2
    Unable to load configuration. - bean - jar:file:/D:/apache-tomcat-8.5.6/wtpwebapps/Struts2HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.31.jar!/struts-plugin.xml:8:162
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:504)
        at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
        at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
        at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
        at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
        at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
        at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4572)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1403)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1393)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: Unable to load configuration. - bean - jar:file:/D:/apache-tomcat-8.5.6/wtpwebapps/Struts2HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.31.jar!/struts-plugin.xml:8:162
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
        at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:978)
        at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)
        at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)
        ... 14 more
    Caused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/D:/apache-tomcat-8.5.6/wtpwebapps/Struts2HelloWorld/WEB-INF/lib/struts2-gxp-plugin-2.3.31.jar!/struts-plugin.xml:8:162
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:247)
        at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
        at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
        ... 17 more
    Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
        at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:218)
        ... 20 more

    删除导入的所有jar包。只导入struts-2.3.31appsstruts2-blank.war中的jar包。

    需要解压缩struts2-blank.war

  • 相关阅读:
    JavaScript权威设计--Window对象之Iframe(简要学习笔记十四)
    JavaScript权威设计--JavaScript脚本化文档Document与CSS(简要学习笔记十五)
    JavaScript权威设计--CSS(简要学习笔记十六)
    事件处理介绍(简要学习笔记十七)
    事件源,事件对象(简要学习笔记十八)
    XMLHttpRequest(简要学习笔记十九)
    UITextField的placeholder的字体颜色和大小
    UITextField弹出键盘挡住输入框问题
    屏幕适配
    GPUImage的简单使用
  • 原文地址:https://www.cnblogs.com/POLzj/p/6039882.html
Copyright © 2020-2023  润新知