引发者:未定义父包:hibernate-default

时间:2015-12-16 12:46:03

标签: hibernate struts2

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
    <package name="default" extends="hibernate-default">
        <action name="saveOrUpdateUser" method="saveOrUpdate" class="com.tutorials4u.web.UserAction">
            <result name="success" type="redirect">listUser</result>
        </action>
        <action name="listUser" method="list" class="com.tutorials4u.web.UserAction">
            <result name="success">/register.jsp</result>
        </action>
        <action name="editUser" method="edit" class="com.tutorials4u.web.UserAction">
            <result name="success">/register.jsp</result>
        </action>
        <action name="deleteUser" method="delete" class="com.tutorials4u.web.UserAction">
            <result name="success" type="redirect">listUser</result>
        </action>
    </package>
</struts>

例外:

Caused by: com.opensymphony.xwork2.config.ConfigurationException: Parent package is not defined: hibernate-default
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildPackageContext(XmlConfigurationProvider.java:674) ~[xwork-core-2.3.24.1.jar:2.3.24.1]
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:523) ~[xwork-core-2.3.24.1.jar:2.3.24.1]
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:295) ~[xwork-core-2.3.24.1.jar:2.3.24.1]
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112) ~[struts2-core-2.3.24.1.jar:2.3.24.1]
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:264) ~[xwork-core-2.3.24.1.jar:2.3.24.1]
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ~[xwork-core-2.3.24.1.jar:2.3.24.1]
    ... 17 more
Dec 16, 2015 6:10:33 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Unable to load configuration. - [unknown location]
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493)

0 个答案:

没有答案