`
liuye066
  • 浏览: 266389 次
  • 性别: Icon_minigender_2
  • 来自: 青岛
社区版块
存档分类
最新评论

SSIB配置过程中遇到的问题,求教

阅读更多
Struts2+Spring2.5+Ibatis2.3配置过程中报的错误,请高手指教。谢谢。

严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DtDao' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: 1 constructor arguments specified but no matching constructor found in bean 'DtDao' (hint: specify index and/or type arguments for simple parameters to avoid type ambiguities)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:181)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2010-4-8 9:24:04 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.BeanCreationException: Error creating bean with name 'DtDao' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: 1 constructor arguments specified but no matching constructor found in bean 'DtDao' (hint: specify index and/or type arguments for simple parameters to avoid type ambiguities)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:181)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:221)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:252)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2010-4-8 9:24:04 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2010-4-8 9:24:04 org.apache.catalina.core.StandardContext start
严重: Context [/myStruts2] startup failed due to previous errors
2010-4-8 9:24:04 org.apache.catalina.core.ApplicationContext log

applicationContext.xml文件代码:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd     http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> <bean id="myDataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"> </property>       <property name="url"        value="jdbc:oracle:thin:@10.130.216.210:1521:orcl">
         </property> <property name="username" value="DPGADMIN"></property> <property name="password" value="DPGADMIN"></property> </bean>
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> <property name="configLocations" value="WEB-INF/sql-map-config.xml" /> <property name="dataSource" ref="myDataSource" /> </bean>
<bean id="DtDao" class="dao.DeptWDAOImpl"> <constructor-arg ref="sqlMapClient"></constructor-arg> </bean>
<bean id="deptAction" class="action.deptAction"> <property name="ddao" ref="DtDao"></property> </bean> </beans>
分享到:
评论
1 楼 liuye066 2010-04-08  
已解决,DeptWDAOImpl.java文件中缺少带参数的构造方法。
private SqlMapClient sqlMapClient;
public DeptWDAOImpl(SqlMapClient sqlMapClient) {
    super();
    this.sqlMapClient=sqlMapClient;
}

另外,将下文中所有的getSqlMapClientTemplate()替换成sqlMapClient,并抛出SQLException异常。

相关推荐

    ZXSS10 SSIB

    同时,文档中还包含了一系列用户操作约定以及安全符号的说明,确保用户在操作和维护过程中能够遵守安全规范,预防设备损坏或人身伤害的发生。 本书的读者对象主要针对技术经理、网规工程师、设备安装工程师以及维护...

    Online Banking Script Free Download:SSIB 银行是 100% 响应式网上银行 PHP 脚本-开源

    SSIB 银行是网上银行系统,具有本地和国际转账、贷款申请和信用卡请求功能。 它还具有内部消息传递、COT、TAX 和 OTP 来完成交易。 该脚本在所有级别(例如,用户仪表板,注册,登录,用户主页等)上均具有强大PHP...

    PHP ONLINE BANKING JUNE 2019:SSIB银行是2019年6月开发的创意网上银行PHP-开源

    SSIB 银行是网上银行系统,具有本地和国际转账、贷款申请和信用卡请求功能。 它还具有内部消息传递、COT、TAX 和 OTP 来完成交易。 该脚本在所有级别上都具有强大的 PHP 最大安全性,例如用户仪表板、注册、登录、...

    struts2简单样例程序

    在这个例子中,Spring可能被用来配置和管理Action类的实例,以及与数据库的连接。Spring的AOP(面向切面编程)特性也可能用于事务管理和日志记录。 3. **iBatis框架**:iBatis是一个SQL映射框架,它将SQL语句与Java...

    wrf操作指南

    - **SSiB**:简化简单生物圈模型主要用于模拟植被覆盖地区的能量和水分交换过程。 ##### 2. 微物理方案 - **NSSL 两时刻微物理方案**:改进了云粒子和降水过程的模拟,提高了模型在预测降水分布方面的准确性。 ###...

    地表植被改变对气候变化影响的模拟研究

    全球气候变化已成为全球关注的问题,其中大气中二氧化碳浓度的增加和地表植被的改变被看作是影响气候变化的主要因素之一。本研究以陈星、雷鸣发表的论文为蓝本,深入分析了地表植被变化对气候变化的影响,以及相关...

    J2EE实用文档

    这四个框架在实际开发中常常被组合使用,形成所谓的“SSH”或“SSiB”架构,提供了一种完整的解决方案,涵盖了从表示层到持久层的各个层面。例如,Struts负责控制流程,Spring处理依赖管理和事务,Hibernate和iBatis...

    中国21kaBP气候模拟的初步试验 (2006年)

    本文使用含有陆面过程的9层大气环流谱模式(AGCM+SSiB),在地球轨道参数和下垫而边界条件驱动下,对21kaBP的气候进行模拟试验。结果表明,21kaBP时中国东部干旱,西部和青藏高原湿润,全国普遍降温。该模拟结果基本捕捉了...

    21kaBP青藏高原有远高于现代降水量的可能性吗? (2000年)

    特别是陈星、于草、X1J健三人的论文《中国21kaBP气候模拟的初步试验》(简称《陈文》)采用改进的9层15波谐的AGCM大气环流模式和简化的陆地植被模型SSiB耦合进行研究,但模拟结果与地质记录存在较大矛盾。...

Global site tag (gtag.js) - Google Analytics