1

我有一个 GWT/GXT 应用程序,它通过“gwt:run”(托管模式)运行良好,但在 Tomcat 服务器上它崩溃了JdbcSQLException,我不明白,因为导致异常的调用是服务器代码不是反正翻译成javascript。此外,我自己没有编写导致异常的代码,它包含在我的应用程序使用的库中。

有人能告诉我如何解决这个错误吗?

PS:这里根据请求抛出异常的代码语句:

private Connection conn;
[...]
conn = DriverManager.getConnection("jdbc:h2:"+databaseDirectory+"/"+databaseName+jdbcString, "sa", "");
[...]
PreparedStatement ps=conn.prepareStatement("SELECT * FROM QUERY_CACHE WHERE QUERYHASH=? LIMIT 1"); // throws the exception

完整的堆栈跟踪:

org.h2.jdbc.JdbcSQLException: Connection is broken: "unexpected status 7274613" [90067-143]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
    at org.h2.message.DbException.get(DbException.java:167)
    at org.h2.message.DbException.get(DbException.java:144)
    at org.h2.engine.SessionRemote.done(SessionRemote.java:558)
    at org.h2.command.CommandRemote.prepare(CommandRemote.java:68)
    at org.h2.command.CommandRemote.<init>(CommandRemote.java:47)
    at org.h2.engine.SessionRemote.prepareCommand(SessionRemote.java:421)
    at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1052)
    at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:71)
    at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:233)
    at org.dllearner.kb.sparql.ExtractionDBCache.executeSelectQuery(ExtractionDBCache.java:183)
    at org.dllearner.kb.sparql.ExtractionDBCache.executeSelectQuery(ExtractionDBCache.java:174)
    at org.dllearner.reasoning.SPARQLReasoner.executeSelectQuery(SPARQLReasoner.java:887)
    at org.dllearner.reasoning.SPARQLReasoner.getSubClasses(SPARQLReasoner.java:766)
    at org.dllearner.reasoning.SPARQLReasoner.getSubClasses(SPARQLReasoner.java:745)
    at org.dllearner.reasoning.SPARQLReasoner.prepareSubsumptionHierarchy(SPARQLReasoner.java:124)
    at org.dllearner.algorithm.tbsl.learning.SPARQLTemplateBasedLearner.setEndpoint(SPARQLTemplateBasedLearner.java:229)
    at org.autosparql.server.search.TBSLSearch.getExamples(TBSLSearch.java:117)
    at org.autosparql.server.search.TBSLSearch.getExamples(TBSLSearch.java:105)
    at org.autosparql.server.AutoSPARQLSession.getExamples(AutoSPARQLSession.java:354)
    at org.autosparql.server.AutoSPARQLServiceImpl.getExamples(AutoSPARQLServiceImpl.java:86)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    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:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:679)
java.lang.NullPointerException
    at org.dllearner.kb.sparql.SparqlQuery.convertJSONtoResultSet(SparqlQuery.java:297)
    at org.dllearner.reasoning.SPARQLReasoner.executeSelectQuery(SPARQLReasoner.java:887)
    at org.dllearner.reasoning.SPARQLReasoner.getSubClasses(SPARQLReasoner.java:766)
    at org.dllearner.reasoning.SPARQLReasoner.getSubClasses(SPARQLReasoner.java:745)
    at org.dllearner.reasoning.SPARQLReasoner.prepareSubsumptionHierarchy(SPARQLReasoner.java:124)
    at org.dllearner.algorithm.tbsl.learning.SPARQLTemplateBasedLearner.setEndpoint(SPARQLTemplateBasedLearner.java:229)
    at org.autosparql.server.search.TBSLSearch.getExamples(TBSLSearch.java:117)
    at org.autosparql.server.search.TBSLSearch.getExamples(TBSLSearch.java:105)
    at org.autosparql.server.AutoSPARQLSession.getExamples(AutoSPARQLSession.java:354)
    at org.autosparql.server.AutoSPARQLServiceImpl.getExamples(AutoSPARQLServiceImpl.java:86)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    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:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:679)
4

0 回答 0