tomcat-spring问题,急!!!Property 'sqlMapClient' is required

问题描述

spring问题,急!!!Property 'sqlMapClient' is required

用Struts2+spring做项目时,在Tomcat上部署运行出现org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registerService' defined in file [C:Usersmacjeeworkspace.metadata.pluginsorg.eclipse.wst.server.core mp0wtpwebappsmywebWEB-INFclassesapplicationContent-service.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlMapClient' is required,求大神解答,很急,在线等

解决方案

这是Content-service.xml

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

<bean id="loginService" class="com.login.service.impl.LoginServiceImpl">
    <property name="userDao">
        <ref bean="userDao"/>
    </property>
</bean>

<bean id="personService" class="com.login.service.impl.PersonServiceImpl">
    <property name="personDao">
        <ref bean="personDao"/>
    </property>
</bean>

<bean id="registerService" class="com.login.service.impl.RegisterServiceImpl">
    <property name="userDao">
        <ref bean="userDao"/>
    </property>
</bean>

解决方案二:

你的registerService的配置中没有sqlMapClient属性的配置,添加上试试。

解决方案三:

你看看你的sqlMapClient 配置好了没。

解决方案四:

Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
解决方案:QSqlDatabase: an instance of QCoreApplication is required for loading driver plugins
spring Failed to convert property value of type 'java.lang.String' to required type 'int' for proper

时间: 2024-08-30 13:05:18

tomcat-spring问题,急!!!Property &amp;#39;sqlMapClient&amp;#39; is required的相关文章

spring+ibatis整合启动出现Property &amp;amp;#x27;sqlMapClient&amp;amp;#x27; is required

问题描述 <!--启动包扫描功能--><context:component-scanbase-package="cn.jugame.*"></context:component-scan><beanid="propertyConfigurer"class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">

query list-无语的hibernate tomcat spring hibernate 困扰几天的问题

问题描述 无语的hibernate tomcat spring hibernate 困扰几天的问题 做级联查询的时候,有时候启动tomcat,访问正常,有时候报java.lang.NullPointerException. java.lang.NullPointerException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invo

ubuntu 14.10 + tomcat + spring 整合

问题描述 ubuntu 14.10 + tomcat + spring 整合 严重: Error configuring application listener of class com.sun.faces.config.ConfigureListener java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener at org.apache.catalina.loader.WebappClassLoader

tomcat spring 相对路径 request.getContextPath()

问题描述 tomcat spring 相对路径 request.getContextPath() 在spring或者tomcat中 如何设置 可以在jsp程序里面不用加request.getContextPath()也能访问controller 现在是不加request.getContextPath() 程序就报404错误 解决方案 应该不行吧,request.getContextPath()是获得jsp当前上下文路径的. 解决方案二: 使用base标签, <% String path = re

spring- No bean named &amp;amp;#39;shiroFilter&amp;amp;#39; is defined

问题描述 No bean named 'shiroFilter' is defined 要把shiro整合进入spring出现了这个错误,'shiroFilter' 这个bean已经定义过了的着急在线等.. 严重: Exception starting filter shiroFilterorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'shiroFilter' is defined w

请求-求助啊!!var id=$(this).attr(&amp;amp;#39;id&amp;amp;#39;); 和 $(this).empty(); 怎么结合

问题描述 求助啊!!var id=$(this).attr('id'); 和 $(this).empty(); 怎么结合 已经获得各个id ... $(document).ready(function(){ $('div').click(function(){ var id=$(this).attr('id'); alert(id); //可以得到某个id的值 var aurl=""<%=basePath%>/colV.action""; var ada

javascript-jquery如何设置一个动态创建的 $(&amp;amp;#39;#&amp;amp;#39;).append(&amp;amp;#39;&amp;amp;#39;)中的ID?并利用它

问题描述 jquery如何设置一个动态创建的 $('#').append('')中的ID?并利用它 就比如像这样的: <script type="text/javascript"> var number=0; function next(){ $('#showdata').append('<input class="number_showdata" id="showdataid'+number+'" type="tex

代码-spring报错 mismatched input &amp;amp;#39;gt&amp;amp;#39; expecting EOF

问题描述 spring报错 mismatched input 'gt' expecting EOF 代码如下: <?xml version="1.0" encoding="UTF-8"?> xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util

javascript- Cannot read property &amp;amp;#39;value&amp;amp;#39; of null

问题描述 Cannot read property 'value' of null 如图 想判断登陆框中的输入信息是否为空 在IE 360 等中都可以实现 但是在谷歌浏览器中不能实现 求大神解答 <script language=""javaScript"" >//首先判断输入的是否是空值,不是则提交function checkstr(){ if(document.getElementById(""sUser"")