Caused by: There is no result type defined for type 'json' mapped with name 'success'.Did you mean

xiaoxiao2021-02-28  36

五月 07, 2017 5:30:03 下午 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\jdk8\jre\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:/jdk8/jre/bin/server;D:/jdk8/jre/bin;D:/jdk8/jre/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;8\jdk\bin;D:\程序运行环境\OpenCV\bin;;D:\程;运行环境\Git\cmd;;D:;SoftRunEnvironment\Study\Git\cmd;D:\SoftRunEnvironment\Study\Git\cmd;C:\Users\acer\AppData\Local\Microsoft\WindowsApps;;C:\Users\acer\Desktop;;. 五月 07, 2017 5:30:04 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:AjaxTest' did not find a matching property. 五月 07, 2017 5:30:04 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:TestBBS' did not find a matching property. 五月 07, 2017 5:30:04 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-bio-8080"] 五月 07, 2017 5:30:04 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-bio-8009"] 五月 07, 2017 5:30:04 下午 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 1443 ms 五月 07, 2017 5:30:04 下午 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 五月 07, 2017 5:30:04 下午 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/7.0.47 五月 07, 2017 5:30:05 下午 org.apache.catalina.util.SessionIdGenerator createSecureRandom 信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [475] milliseconds. 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Parsing configuration file [struts-default.xml] 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Parsing configuration file [struts-plugin.xml] 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Parsing configuration file [struts.xml] 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.ObjectFactory) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.FileManagerFactory) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.XWorkConverter) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.TextProvider) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.LocaleProvider) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.ActionProxyFactory) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.ObjectTypeDeterminer) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.mapper.ActionMapper) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (jakarta) for (org.apache.struts2.dispatcher.multipart.MultiPartRequest) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (org.apache.struts2.views.freemarker.FreemarkerManager) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (org.apache.struts2.components.UrlRenderer) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.validator.ActionValidatorManager) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.ValueStackFactory) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionProvider) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.reflection.ReflectionContextFactory) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.PatternMatcher) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (org.apache.struts2.dispatcher.StaticContentLoader) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.UnknownHandlerManager) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (org.apache.struts2.views.util.UrlHelper) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.CollectionConverter) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.ArrayConverter) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.DateConverter) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.NumberConverter) 五月 07, 2017 5:30:07 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Choosing bean (struts) for (com.opensymphony.xwork2.conversion.impl.StringConverter) 五月 07, 2017 5:30:08 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger error 严重: Dispatcher initialization failed Unable to load configuration. - action - file:/D:/WorkSpace1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TestBBS/WEB-INF/classes/struts.xml:38:86     at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)     at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:471)     at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)     at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)     at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)     at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)     at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)     at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)     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: Error building results for action requestData in namespace / - action - file:/D:/WorkSpace1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TestBBS/WEB-INF/classes/struts.xml:38:86     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:435)     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:541)     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:290)     at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)     at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:239)     at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)     ... 16 more Caused by: There is no result type defined for type 'json' mapped with name 'success'.  Did you mean 'json'? - result - file:/D:/WorkSpace1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TestBBS/WEB-INF/classes/struts.xml:39:26     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:711)     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:433)     ... 21 more 五月 07, 2017 5:30:08 下午 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter struts2 Unable to load configuration. - action - file:/D:/WorkSpace1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TestBBS/WEB-INF/classes/struts.xml:38:86     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:483)     at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)     at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)     at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)     at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)     at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)     at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)     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. - action - file:/D:/WorkSpace1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TestBBS/WEB-INF/classes/struts.xml:38:86     at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)     at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)     at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:471)     ... 14 more Caused by: Error building results for action requestData in namespace / - action - file:/D:/WorkSpace1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TestBBS/WEB-INF/classes/struts.xml:38:86     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:435)     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:541)     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:290)     at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112)     at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:239)     at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)     ... 16 more Caused by: There is no result type defined for type 'json' mapped with name 'success'.  Did you mean 'json'? - result - file:/D:/WorkSpace1/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/TestBBS/WEB-INF/classes/struts.xml:39:26     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:711)     at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:433)     ... 21 more 五月 07, 2017 5:30:08 下午 org.apache.catalina.core.StandardContext startInternal 严重: Error filterStart 五月 07, 2017 5:30:08 下午 org.apache.catalina.core.StandardContext startInternal 严重: Context [/TestBBS] startup failed due to previous errors 五月 07, 2017 5:30:08 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-bio-8080"] 五月 07, 2017 5:30:08 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-bio-8009"] 五月 07, 2017 5:30:08 下午 org.apache.catalina.startup.Catalina start 信息: Server startup in 3783 ms

在进行ajax+struts2整合时出现如上错误

解决方法:

在struts2.xml中的<package>下添加:

    <result-types>             <result-type name="json" class="org.apache.struts2.json.JSONResult"/>         </result-types>

问题解决。

转载请注明原文地址: https://www.6miu.com/read-80520.html

最新回复(0)