问题:
java.lang.NoClassDefFoundError:org/hamcrest/SelfDescribing
解决方法:
将junit4.11的包改成4.9或以下的
问题:
java.lang.ClassNotFoundException:javax.servlet.jsp.jstl.core.LoopTag
解决方法:
将javax.servlet.jsp.jstl-1.2.1包改为jstl-1.2.jar包
问题:
Failed to load the JNI shared library "D:java\jdk\bin\...\jre\server\jvm.dll"
原因:
Eclipse是32位的,jdk的版本是64位
问题:
there are no resources that can be added or removed from the server
解决方法
(看看java项目的目录结构)
打开下图并勾选Dynamic Web Module
将下图中的"WebContent改为WebRoot/WEB-INF"
问题
2017-05-04 18:34:06,653 WARN (com.mchange.v2.resourcepool.BasicResourcePool:1841) - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@40158291 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
java.sql.SQLException: Network error IOException: Connection refused: connect
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:410)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPerTaskAsynchronousRunner$TaskThread.run(ThreadPerTaskAsynchronousRunner.java:255)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:519)
at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:307)
at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:257)
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:311)
... 10 more
原因
解决方法
1、打开SQL Server Configuration Manager——SQL Server2005 网络配置——MSSQLSERVER的协议——TCP/IP
2、启动TCP/IP
3、打开TCP/IP的属性,IP all中的TCP端口设置为1433
4、重新启动SQL Server 2005服务
问题
java.lang.NumberFormatExceptiong:null
原因
用户修改自己信息时,没有修改自己的专业信息,也就是传入的major为空,需要给一个默认的参数值
解决方法
将原本是
改为