Struts2 JSON参数之谜



这个tomcat部署有点麻烦。部署一个复杂的Web应用程序(不是我编写的),已经消除了大多数错误,但我一辈子都无法解决这个问题。它似乎导致servlet在启动调试后关闭。我到处都找过,但在编码中找不到"默认参数"。

DEBUG localhost-startStop-1 com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory - Using default implementation of FileManager provided under name [system]: DefaultFileManager
DEBUG localhost-startStop-1 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Loaded [BUILDER] {PackageConfig Name:default namespace: parents:[{PackageConfig Name:struts-default namespace: parents:[]}]}
DEBUG localhost-startStop-1 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - The result type [org.ambraproject.struts2.JsonResult] doesn't have a default param [DEFAULT_PARAM] defined!
java.lang.NoSuchFieldException: DEFAULT_PARAM
    at java.lang.Class.getField(Class.java:1579)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addResultTypes(XmlConfigurationProvider.java:578)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:530)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:292)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:250)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)
    at org.ambraproject.struts2.AmbraStruts2Dispatcher.init(AmbraStruts2Dispatcher.java:116)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1655)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

这只是一条DEBUG消息,无需担心-基本上Struts中的每个Result都必须提供DEFAULT_PARAM定义,至少它可以为null。

相关内容

  • 没有找到相关文章