spring-stutrs求解答

这里贴上applicationContext里的代码:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

<!-- 依赖  -->
<bean id="udao" class="com.it.dao.UserDAO"></bean>

<bean id="pdao" class="com.it.dao.ProvDAO"></bean>

<bean id="OptUserAct" class="com.it.action.UserOptAction" scope="prototype">
    <property name="dao" ref="udao"></property>
</bean>
<bean id="LoginUserAct" class="com.it.action.UserLoginAction" scope="prototype">
    <property name="dao" ref="udao"></property>
</bean>
<bean id="ShowUserAct" class="com.it.action.UserShowAction" scope="prototype">
    <property name="dao" ref="udao"></property>
</bean>
<bean id="ExitUserAct" class="com.it.action.UserExitAction" scope="prototype"></bean>
<bean id="ToupdUserAct" class="com.it.action.UserToupdAction" scope="prototype">
    <property name="dao" ref="udao"></property>
</bean>

<bean id="ProvQueryAct" class="com.it.action.ProvQueryAction" scope="prototype">
    <property name="dao" ref="pdao"></property>
</bean>
</beans>

struts-prov.xml里的代码:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>

    <package name="prov" namespace="/users" extends="struts-default" >
        <action name="topc" class="ProvQueryAct" method="queryAll">
            <result name="success">/users/add1.jsp</result>
        </action>
    </package>
</struts>

十月 08, 2016 3:15:29 下午 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
信息: Destroying singletons in org.s[email protected]63e5d6c2: defining beans [udao,pdao,OptUserAct,LoginUserAct,ShowUserAct,ExitUserAct,ToupdUserAct,ProvQueryAct]; root of factory hierarchy
十月 08, 2016 3:15:29 下午 org.springframework.web.context.ContextLoader initWebApplicationContext
严重: Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.it.dao.ProvDAO] for bean with name ‘pdao‘ defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: com.it.dao.ProvDAO
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
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:618)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
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)
Caused by: java.lang.ClassNotFoundException: com.it.dao.ProvDAO
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
... 22 more
十月 08, 2016 3:15:29 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.it.dao.ProvDAO] for bean with name ‘pdao‘ defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: com.it.dao.ProvDAO
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
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:618)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
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)
Caused by: java.lang.ClassNotFoundException: com.it.dao.ProvDAO
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)
... 22 more

我的dao明明有,为什么报这种错???求解答

时间: 2024-10-08 09:47:22

spring-stutrs求解答的相关文章

问题:关于正则表达式和通配符的问题,求解答

遇到一个关于通配符的问题.在shell下使用通配符匹配时,只有tmp被匹配出来了,其他文件名都要用正则,实在不知道为啥,谁知道,求解? 问题:关于正则表达式和通配符的问题,求解答

【求解答】在eclipse中运行Android项目出现的问题 ——Launching MyFirstAPP&#39; has encountered a program. Errors occurred during the build.

在运行Android项目的时候,右击项目名称,点击“Run as——Android application”后出现'Launching MyFirstAPP' has encountered a program. Errors occurred during the build. 求解决办法... [求解答]在eclipse中运行Android项目出现的问题 --Launching MyFirstAPP' has encountered a program. Errors occurred du

阿里巴巴Web前端面试的一道JS题目,求解答!!!

题目大概是这种: function outer(){ return inner; var inner = "a"; function inner(){}; inner = 9; } alert(typeof outer()); 当时的回答是结果是--function (回来測试结果也是一样) 本来的想法是,inner 在outer 运行的过程中,以下有一个函数声明,而函数声明会提升,也就是 JS 解析器会领先读取函数声明,假设不是声明函数而是定义一个变量,那结果就会是 undefine

php 点击按钮自动下载,IE下有问题,求解答!

直接看代码! test.php <?php include_once('index.php'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> </head> <body> <a href="#" id="b

大神求解答......

我在写推箱子游戏时,出现了有的箱子推的动,有的箱子推不动,代码如下: package youxi; import java.awt.Frame;import java.awt.event.KeyEvent;import java.awt.event.KeyListener;import java.awt.event.MouseAdapter;import java.awt.event.MouseEvent;import java.io.IOException; import javax.swin

VS15 preview 5打开文件夹自动生成slnx.VC.db SQLite库疑惑?求解答

用VS15 preview 5打开文件夹(详情查看博客http://www.cnblogs.com/zsy/p/5962242.html中配置),文件夹下多一个slnx.VC.db文件,如下图: 本文件是SQLite文件,通过Navicat Premium打开,配置如下: 打开如下: 一共有14张数据表.其中以下3张表有数据: 各个表与字段含义,从官网也没有找到相关解释,还有待考证:其中个别表可以从命名来理解,例如properties,表示属性.有知情者请告诉一二,如向本人获取Navicat P

webmagic爬虫报错,求解答!

2016-12-29 22:00:05 [pool-44-thread-1] WARN  HttpClientDownloader:104 - download page http://news.fx678.com errorjava.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.7.0_79] at java.net.Socket

C# 初学者,写了这个点击事件,可是账号密码输入正确以后点击以后什么事都没有发生啊,在线求解答,急啊!!!!谢谢啊!!!

using System;using System.Collections.Generic;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls; public partial class index : System.Web.UI.Page{    private static str

android 自定义view更新的时候遇到的问题(求解答)

今天遇到一个很奇怪的问题,关于在view里面更新LRC歌词的,view里面有一个成员变量,lrcindex ,在draw里面会用到它来更新歌词,歌词里面有一行是红色的,表示当前正在播放的歌词.然后我拖动seekbar同时更新歌词显示,我在onProgressChanged里面更新,其他颜色的歌词能正常显示,就是那个红色的歌词还是暂停之前那句,没有更新,怎么拖都没用.我打印出了draw里面那个lrcindex,值没变 还是暂停之前的值.但是实际上我在另外一个函数根据当前播放时间获取当前歌词的时候已