【问题标题】:struts2-image-plugin is unable to load in struts 2.3.16.1 versionstruts2-image-plugin 在 struts 2.3.16.1 版本中无法加载
【发布时间】:2014-04-03 11:10:40
【问题描述】:

我已通过我的 Web 应用程序中的 http://mvnrepository.com/struts 2.0 升级到 2.3.16.1 一旦我部署在 tomcat 服务器中,它就会出现以下错误:

Unable to load configuration. - bean - jar:file:/C:/Projects/apache-tomcat-7.0.50/webapps/myweb/WEB-INF/lib/struts2-image-plugin-0.1.jar!/struts-plugin.xml:8:136
...

Caused by: Unable to load configuration. - bean - jar:file:/C:/Projects/apache-tomcat-7.0.50/webapps/myweb/WEB-INF/lib/struts2-image-plugin-0.1.jar!/struts-plugin.xml:8:136
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)

Caused by: Unable to load bean: type:org.apache.struts2.views.TagLibrary class:com.aurifa.struts2.plugin.image.views.ImageTagLibrary - bean - jar:file:/C:/Projects/apache-tomcat-7.0.50/webapps/myweb/WEB-INF/lib/struts2-image-plugin-0.1.jar!/struts-plugin.xml:8:136
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:224)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:169)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)

我更新了所有struts相关的插件,但是我找不到任何版本来更新struts2-image-plugin

是否有任何 struts2-image-plugin 的替代品 来代替它或任何其他方式来解决此问题?

感谢任何人提供解决方案或想法。

【问题讨论】:

    标签: java jsp tomcat struts2


    【解决方案1】:

    查看以下 struts2 jira:https://issues.apache.org/jira/browse/WW-4255

    TagLibrary 接口已从 struts2 中删除,并由另外两个接口替换。 (不知道2.3.17会不会加进去)

    如果您觉得勇敢或降级到 2.3.15.3 并希望界面在 2.3.17 中恢复,您可以自己更新插件以使用新界面。

    【讨论】:

    • 是的,类被拆分了,struts2-jquery-plugin也有同样的问题stackoverflow.com/questions/20772405/…
    • @tom 我可以通过实现另外两个接口来解决自定义 TagLibrary 类的问题。谢谢您的回复。
    • 很高兴您修复了您的应用程序,因为升级很重要,因为您的新版本 struts2 中有很多安全修复程序。
    猜你喜欢
    • 1970-01-01
    • 2014-10-17
    • 2013-09-15
    • 1970-01-01
    • 2017-10-09
    • 2022-01-15
    • 2021-02-12
    • 1970-01-01
    相关资源
    最近更新 更多