spring配置错误 麻烦看一下

来源:百度知道 编辑:UC知道 时间:2024/05/28 03:16:40
严重: 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 'dataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'driverClass' threw exception; nested exception is java.beans.PropertyVetoException: Could not locate driver class with name 'net.sourceforge.jtds.jdbc.Drive'.

'net.sourceforge.jtds.jdbc.Drive'
这个驱动程序名写错了哦。应该
是'net.sourceforge.jtds.jdbc.Driver'
少写了一个r.呵呵

应该是这个问题。如果修改了还有问题的话,看看你的驱动程序有没有放在lib目录下

Could not locate driver class with name 'net.sourceforge.jtds.jdbc.Drive'.
驱动错误