hi unfortunately no exception related to the database and the strange
thing is that if I just restart tomcat the application works again
without restarting Mysql
the exception is
GRAVE: Exception while dispatching incoming RPC
callcom.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.util.Vector
com.novacom.novacalendar.client.Remote.query(java.lang.Stri
ng,java.lang.String)' threw an unexpected exception:
java.lang.NullPointerException
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
361)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
547)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
265)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServ
iceServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:
803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
233)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
HERE IS THE PROBLEM:
at com.novacom.novacalendar.server.DbUtil.query(DbUtil.java:
349)
at
com.novacom.novacalendar.server.RemoteImpl.query(RemoteImpl.java:33)
at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
528)
... 16 more
but there is the line the code points out:
Statement s=null;
try {
s = con.createStatement();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
--> ResultSet result = s.executeQuery(query);
before the error was in the line s = con.createStatement(); but now
i've forced a new instantiation of con if it was null...
How can s be null if I just instanciated it? and the strange thing
that this happends after midnight......
no idea at all about what's going on...