Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stopping the session causes an error #174

Closed
bermud opened this issue Jul 13, 2016 · 4 comments
Closed

Stopping the session causes an error #174

bermud opened this issue Jul 13, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@bermud
Copy link
Contributor

bermud commented Jul 13, 2016

Version 4.7.1

While running a test is stopped it throws an error. It should stop nicely and a session log should be created someway marking it as aborted or uncompleted.

Steps:

Using the default installation (only Example.Net and XML note)

  1. Create session: http://cite.opengeospatial.org/te3/createSession.jsp
  2. Select XML note 1.0
  3. Click on start session
  4. Stop the session clicking on the upper right button

Throw the following error:

type Exception report

message An exception occurred processing JSP page /viewSessionLog.jsp at line 94

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.io.IOException: An exception occurred processing JSP page /viewSessionLog.jsp at line 94

91:       File userlog = new File(Conf.getUsersDir(), request.getRemoteUser());
92:       String sessionId = request.getParameter("session");
93:       TestSession ts = new TestSession();
94:       ts.load(userlog, sessionId);
95:       String suiteName = "null";
96:       String sourcesName = ts.getSourcesName();
97:       if (sourcesName == null) {


Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:467)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

java.io.FileNotFoundException: /srv/local/teamengine-te3/TE_BASE/users/ogctest/undefined/session.xml (No such file or directory)
    java.io.FileInputStream.open0(Native Method)
    java.io.FileInputStream.open(FileInputStream.java:195)
    java.io.FileInputStream.<init>(FileInputStream.java:138)
    java.io.FileInputStream.<init>(FileInputStream.java:93)
    sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
    sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
    org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
    com.occamlab.te.web.TestSession.load(TestSession.java:89)
    org.apache.jsp.viewSessionLog_jsp._jspService(viewSessionLog_jsp.java:212)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

@keshavnangare
Copy link
Contributor

I have tried with the following tests to reproduce this issue:

1.XML- Note
2.GML32

I am not able to reproduce this issue.

@bermud
Copy link
Contributor Author

bermud commented Jul 22, 2016

I tried with CAT 2.0 and when stopping it , I got this:

org.apache.jasper.JasperException: An exception occurred processing JSP page /viewSessionLog.jsp at line 110

107:       }
108:       out.println("<h3>Test Suite: " + suiteName + "</h3>");
109:       ArrayList tests = new ArrayList();
110:       boolean complete = ViewLog.view_log(suiteName,userlog, sessionId, tests, ViewLogTemplates, out);     
111:       out.println("<br/>");
112:       if (!complete) {
113:           out.println("<input type=\"button\" value=\"Resume executing these tests\" onclick=\"window.location = 'test.jsp?mode=resume&amp;session=" + sessionId + "'\"/>");


Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:575)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:462)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

root cause

javax.servlet.ServletException: org.xml.sax.SAXParseException; Premature end of file.
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:916)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:845)
    org.apache.jsp.viewSessionLog_jsp._jspService(viewSessionLog_jsp.java:336)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

@bermud
Copy link
Contributor Author

bermud commented Jul 26, 2016

If a user stops the test and the logs have not been created, then display a message like this in the session page: "The test was ended prematurely. Restart session here."

keshavnangare pushed a commit that referenced this issue Aug 1, 2016
@keshavnangare
Copy link
Contributor

Fixed with this commit d9490b2

@bermud bermud added this to the 4.8 milestone Aug 10, 2016
@bermud bermud closed this as completed Aug 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants