SSM框架整合报错

1.jdbc报错:java.lang.ClassNotFoundException: com.mysql.jdbc.driver

严重: Servlet.service() for servlet [daleystore-manager] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 

### Error querying database.  Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: com.mysql.jdbc.driver
### The error may exist in com/daleystore/mapper/TbItemMapper.xml
### The error may involve com.daleystore.mapper.TbItemMapper.selectByExample
### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: com.mysql.jdbc.driver] with root cause
java.lang.ClassNotFoundException: com.mysql.jdbc.driver

起初我以为是框架的错误,从头到尾检查了一遍,最后才发现是.properties的配置文件中出错。

如果你也出现这种错误,百分之90%是这里写错了,有可能是用户名密码写错,

这里注意:在写username,password的时候要加上前缀 jdbc. 如 jdbc.username ,否则会认为是JVM系统环境变量的username,password同理。

也有可能是其他一些属性出错。

我这里的问题是jdbc.driver=com.mysql.jdbc.Driver的driver小写了。

时间: 2024-10-09 21:22:00

SSM框架整合报错的相关文章

maven 整合springmvc spring myatis整合报错

问题描述 maven 整合springmvc spring myatis整合报错 java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]] at java.util.concurrent.FutureTask.

ssh整合报错,出现了空指针

问题描述 ssh整合报错,出现了空指针 18-Feb-2016 23:52:29.943 INFO [RMI TCP Connection(3)-127.0.0.1] org.apache.struts2.config.AbstractBeanSelectionProvider.info Choosing bean (struts) for (org.apache.struts2.dispatcher.DispatcherErrorHandler) 18-Feb-2016 23:52:43.05

spring mvc与struts 整合报错

问题描述 spring mvc与struts 整合报错 报错如下求帮忙,谢谢严重: Exception starting filter struts2Unable to load configuration. - action - file:/E:/java/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/bishe/WEB-INF/classes/struts.xml:11:74 at org.apa

解决-MKNetworkKit框架导入报错--新人求帮助 急急急

问题描述 MKNetworkKit框架导入报错--新人求帮助 急急急 框架中 文件:NSAlert+MKNetworkKitAdditions.h 这个里边就报错 我就是一个新手,也不知道怎么解决啊,请大神指教--

SSM框架整合的<mapper>问题

问题描述 SSM框架整合的<mapper>问题 The content of element type "mapper" must match "(cache-ref|cache|resultMap*|parameterMap*|sql*| insert*|update*|delete*|select*)+". 该怎么解决? 解决方案 sql语句出错了,把mybatis中的mapper贴出来看看 解决方案二: <?xml version="

hibernate与oracle数据库整合报错

问题描述 hibernate与oracle数据库整合报错 Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException: 数据库版本与驱动版本一致,请教哪位高手指点一下.

myeclipsespringmvc mybatis 整合报错

问题描述 myeclipsespringmvc mybatis 整合报错 Error while adding the mapper 'interface com.bdqn.mapper.HouseMapper' to configuration. org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumbe

adf g-s2sh框架启动报错,是不是哪没配置好

问题描述 s2sh框架启动报错,是不是哪没配置好 Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping docu

SpringMVC + hiberante 整合报错,跪求神人指导。。。

问题描述 问题找了一天了,还望神人多多指点启动就报错,先贴上配置信息Pom.xml<projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v