1. 先贴出异常
2011-11-04 13:51:35 [main:5015] - [ERROR] Dispatcher initialization failed
com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.ObjectFactory, name='default'] in public void com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.setObjectFactory(com.opensymphony.xwork2.ObjectFactory).
at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:144)
at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:113)
at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:90)
at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:86)
at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:71)
at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:67)
at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:483)
at com.opensymphony.xwork2.inject.ContainerImpl$6.call(ContainerImpl.java:523)
at com.opensymphony.xwork2.inject.ContainerImpl$6.call(ContainerImpl.java:521)
at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:521)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:203)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
2. 引起异常的原因
web.xml文件中,配置struts2加载的配置文件时,没有配置sturts2默认要加载的文件。
3. 解决方案
在配置文件中配置默认要加载的文件,这些文件不一定有,但要写上去,然后它找不找的到无所谓。
<!-- Struts2配置信息 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
<!-- 指定配置文件路径 -->
<init-param>
<param-name>config</param-name>
<param-value>platform-web.xml,struts-default.xml,struts-plugin.xml,resources/struts/struts.xml</param-value>
</init-param>
</filter>
分享到:
相关推荐
XI PI MAPPING开发必须jar包 import com.sap.aii.mapping.api.*; import com.sap.aii.mapping.api.*; import com.sap.aii.mapping.lookup.*; import com.sap.aii.mappingtool.tf7.rt.*;
标题提到的"com.sap.aii.mapping.api PI MAPPING开发必须jar包"是Java Mapping开发的核心依赖库,它们包含了API和其他必要的组件,使得开发人员能够创建自定义的映射逻辑。以下将详细讲解SAP PI Java Mapping的开发...
2. **类型转换(Type Conversion)**:`com.opensymphony.xwork2.converters`包提供了类型转换的支持。XWork通过`Converter`接口实现各种数据类型的自动转换,如字符串到日期、数字等,极大地简化了开发者的工作。 ...
在 filter-mapping 中,我们将这个 Filter 应用到所有的 action 请求上。 除了使用 OpenSessionInViewFilter 之外,我们还可以使用 Hibernate 的 initialize 方法来强制加载关联数据。例如: ```java SetRepayment...
delphi 2010升级到xe8后,decodestring汉字出现:No mapping for the.mht
Nomapping found for dependency[type=com.opensymphony.xwork2.ObjectFactory,name='default'] in public void com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.setObjectFactory ...
8. **Struts2的异常处理**:Struts2提供了`com.opensymphony.xwork2.DefaultActionInvocation`和`com.opensymphony.xwork2.DefaultActionProxy`等类来处理异常,并通过`struts-default.xml`中的`<exception-mapping>...
MySQL database interface mapping for VisualBmysqli.vb-master.zip
# because 0, 1 and 2 are reserved indices for "padding", "start of sequence", and "unknown". decoded_review = ' '.join([reverse_word_index.get(i - 3, '?') for i in x_train[0]]) print(decoded_review) ...
Action 类可以继承自 com.opensymphony.xwork2.ActionSupport 或实现 com.opensymphony.xwork2.Action 接口。 写一个 Struts2 框架中的 Action 有三种方式可以写一个 Struts2 框架中的 Action: 1. 只需要类中有...
mybatis.mapper-locations=classpath:mapping/*Mapper.xml mybatis.type-aliases-package=entity #spring.profiles=development #server.address=127.0.0.1 #端口设置 server.port=8092 #日志配置 ...
-- 自动扫描mapping.xml文件 --> <property name="mapperLocations" value="classpath:mapping/*.xml"> <!-- <property name="mapperLocations"> <value>classpath:mapper/*.xml </property> --> ...
com.sap.xpi.ib.mapping.lib.jar SAP PI JAVA MAPPING 必备JAR包
404-PageNotFound, "404 Page Not Found" 页面的精选列表 找不到 404页 那些无聊 404页的灵感库。访问画廊墙,并选择你喜欢的 !问题大多数情况下,"找不到 404"页被积压所忽略。 但我们知道 ! 事实上,你会面临...
当我们遇到“Spring MVC No Session found for current thread”的错误时,这通常意味着在尝试访问HttpSession对象时,当前线程没有找到相关的session。这个问题可能是由于多种原因导致的,包括配置错误、过滤器设置...
首先,我们需要了解Django的ORM(Object-Relational Mapping)系统,它允许我们使用Python代码与数据库交互,而无需编写SQL语句。在Django的模型中,我们可以定义数据表结构,然后在视图函数中对这些模型进行查询。 ...
<hibernate-mapping> <class name="com.bjsxt.hibernate.User" table="t_user"> <id name="id"> <generator class="native"/> <property name="name"/> <!-- <many-to-one name="group" column=...
col.ColumnMapping = MappingType.Attribute; } this.dsHR.GetXml(); } ``` ### 总结 本文详细介绍了如何使用ASP.NET和C#结合ADO.NET技术将数据集中的数据导出为XML格式,以及如何从XML文件中导入数据。通过...
<input type="submit" name="submit" value="Commit"> ``` **JSP 处理**: ```jsp <%@ page language="java" contentType="text/html; charset=GB18030" pageEncoding="GB18030"%> boolean isMultipart = ...