ox-it / ords

Automatically exported from code.google.com/p/ords
0 stars 0 forks source link

Saved datasets can't be re-run since ODBC code was amended #719

Closed jajwilson closed 8 years ago

jajwilson commented 8 years ago

Attempting to run a saved dynamic query generated the following error:

Unable to run query. Possible causes include malformed SQL, or a database error. Please check your query and try again. If you think you have encountered a problem with the ORDS system, please contact the help desk by emailing ords@it.ox.ac.uk Message was: org.postgresql.util.PSQLException: ERROR: relation "country" does not exist Position: 40

Attempting to run a saved static query results in a stack trace error:

HTTP Status 500 - Unable to compile class for JSP: An error occurred at line: 67 in the jsp file: /queryResult.jsp The constructor DBUtils(String, String, OrdsUser) is undefined 64: Project project = DBGateway.getProject(database.getDatabaseProjectId()); 65: String cleanProjectName = StringEscapeUtils.escapeHtml4(project.getName()); 66: OrdsPhysicalDatabase opd = DBGatewayProjectNode.getPhysicalDatabaseByPhysicalDatabaseId(Integer.parseInt(cleanPhysicalId)); 67: DBUtils dbUtils = new DBUtils(DBGateway.getDbServerByProjectId(cleanProjectId), opd.getDbConsumedName(), user); 68: Collection tableList = ORDSDatabaseUtils.getTableListForMainDatabase(opd.getLogicalDatabaseId(), user); 69: boolean advanced = true; 70: if ((request.getParameter("qtype") == null) || (request.getParameter("qtype").equals("simple"))) { Stacktrace:

type Exception report

message Unable to compile class for JSP: An error occurred at line: 67 in the jsp file: /queryResult.jsp The constructor DBUtils(String, String, OrdsUser) is undefined 64: Project project = DBGateway.getProject(database.getDatabaseProjectId()); 65: String cleanProjectName = StringEscapeUtils.escapeHtml4(project.getName()); 66: OrdsPhysicalDatabase opd = DBGatewayProjectNode.getPhysicalDatabaseByPhysicalDatabaseId(Integer.parseInt(cleanPhysicalId)); 67: DBUtils dbUtils = new DBUtils(DBGateway.getDbServerByProjectId(cleanProjectId), opd.getDbConsumedName(), user); 68: Collection tableList = ORDSDatabaseUtils.getTableListForMainDatabase(opd.getLogicalDatabaseId(), user); 69: boolean advanced = true; 70: if ((request.getParameter("qtype") == null) || (request.getParameter("qtype").equals("simple"))) { Stacktrace:

description The server encountered an internal error (Unable to compile class for JSP: An error occurred at line: 67 in the jsp file: /queryResult.jsp The constructor DBUtils(String, String, OrdsUser) is undefined 64: Project project = DBGateway.getProject(database.getDatabaseProjectId()); 65: String cleanProjectName = StringEscapeUtils.escapeHtml4(project.getName()); 66: OrdsPhysicalDatabase opd = DBGatewayProjectNode.getPhysicalDatabaseByPhysicalDatabaseId(Integer.parseInt(cleanPhysicalId)); 67: DBUtils dbUtils = new DBUtils(DBGateway.getDbServerByProjectId(cleanProjectId), opd.getDbConsumedName(), user); 68: Collection tableList = ORDSDatabaseUtils.getTableListForMainDatabase(opd.getLogicalDatabaseId(), user); 69: boolean advanced = true; 70: if ((request.getParameter("qtype") == null) || (request.getParameter("qtype").equals("simple"))) { Stacktrace:) that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 67 in the jsp file: /queryResult.jsp The constructor DBUtils(String, String, OrdsUser) is undefined 64: Project project = DBGateway.getProject(database.getDatabaseProjectId()); 65: String cleanProjectName = StringEscapeUtils.escapeHtml4(project.getName()); 66: OrdsPhysicalDatabase opd = DBGatewayProjectNode.getPhysicalDatabaseByPhysicalDatabaseId(Integer.parseInt(cleanPhysicalId)); 67: DBUtils dbUtils = new DBUtils(DBGateway.getDbServerByProjectId(cleanProjectId), opd.getDbConsumedName(), user); 68: Collection tableList = ORDSDatabaseUtils.getTableListForMainDatabase(opd.getLogicalDatabaseId(), user); 69: boolean advanced = true; 70: if ((request.getParameter("qtype") == null) || (request.getParameter("qtype").equals("simple"))) {

Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:469) org.apache.jasper.compiler.Compiler.compile(Compiler.java:378) org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.28 logs.

Apache Tomcat/7.0.28

thestoat commented 8 years ago

This should now be fixed - please retry against the latest code

jajwilson commented 8 years ago

Now works for dynamic datasets, but static datasets cause crashes - I'll add that as a separate issue.