I am developing an application with GWT, Hibernate (XML-based mapping), MySQL - in Tomcat6.0. IDE-Netbeans 6.9 I set the properties of the Deploy When Saving project in Netbeans.
When my application runs for a long time on the server, from time to time my application cannot connect to the database and throws the following exception
A possible next stack trace is caused by an error created for debugging purposes, as well as an attempt to terminate the thread, which resulted in illegal access and has no functional impact.
java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at com.mysql.jdbc.ConnectionImpl.realClose(ConnectionImpl.java:4273) at com.mysql.jdbc.ConnectionImpl.close(ConnectionImpl.java:1444) at org.hibernate.connection.DriverManagerConnectionProvider.close(DriverManagerConnectionProvider.java:152) at org.hibernate.connection.DriverManagerConnectionProvider.finalize(DriverManagerConnectionProvider.java:142) at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method) at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83) at java.lang.ref.Finalizer.access$100(Finalizer.java:14) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
When I restart my tomcat server, I can connect the database again. Please tell me how I can get smooth performance and can do this work without restarting tomcat.
source share