我有个项目是用mysql数据库 的,现在我用的是SQL Server ,我改了sql server的驱动包后,又改了这个文件c3p0-config.xml的代码:
<?xml version=”1.0″ encoding=”UTF-8″?>
<c3p0-config>
<default-config>
<property name=”jdbcUrl”>jdbc:sqlserver://127.0.0.1:1433;DatabaseName=school</property>
<property name=”driverClass”>com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
<property name=”user”>sa</property>
<property name=”password”>aaa312586</property>
</default-config>
</c3p0-config>
还是报错,控制台信息:
警告: Error during context [/bookstore] restart
org.apache.catalina.LifecycleException: Failed to stop component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/bookstore]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:141)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1275)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1439)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:315)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.catalina.LifecycleException: Failed to stop component [WebappLoader[/bookstore]]
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:236)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5669)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
… 11 more
Caused by: java.lang.NullPointerException
不知道还要改什么。
求帮我把这个项目改成SQL Server 2008能用的,谢谢
这个是我项目的网盘地址:http://pan.baidu.com/s/1sjr55Vn