Unclear stacktrace

2
We're getting an error when using a mendix class method, getSessionFromRequest: reporting.actions.GenerateReportServlet.getSessionFromRequest(Lcom/mendix/m2ee/api/IMxRuntimeRequest;)Lhk; at reporting.actions.GenerateReportServlet.processRequest(GenerateReportServlet.java:29) at fr.a(SourceFile:75) at com.mendix.core.MxRuntime.processRequest(SourceFile:889) at com.mendix.m2ee.server.handler.RuntimeHandler.handle(RuntimeHandler.java:39) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113) at org.eclipse.jetty.server.Server.handle(Server.java:334) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:992) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:541) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203) at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:462) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436) at java.lang.Thread.run(Thread.java:619) But it isn't clear what the error is. EDIT: package reporting.actions; import java.io.IOException; import java.util.Map; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import com.mendix.core.Core; import com.mendix.externalinterface.connector.RequestHandler; import com.mendix.m2ee.api.IMxRuntimeRequest; import com.mendix.m2ee.api.IMxRuntimeResponse; public class GenerateReportServlet extends RequestHandler { private String USERNAME; private String PASSWORD; private String DATABASE; public GenerateReportServlet(String USERNAME, String PASSWORD, String DATABASE) { this.USERNAME = USERNAME; this.PASSWORD = PASSWORD; this.DATABASE = DATABASE; } @Override public void processRequest(IMxRuntimeRequest request, IMxRuntimeResponse response, String arg) throws Exception { UUID id = null; if (this.getSessionFromRequest(request) != null) id = this.getSessionFromRequest(request).getId(); ... } }
asked
1 answers
3

It looks as if you implemented your own RequestHandler (GenerateReportServlet) that calls the getSessionFromRequest method that it inherits from RequestHandler.

From your stacktrace and sourcecode it looks as if there's something wrong with your class files. Have you recently upgraded to a new version?

If so, you might try deleting all your compiled class files (<deploymentdir>\model\lib\bin)

The modeler currently checks to see if any of the java files were modified, but it doesn't check to see whether any of the runtime jar files were modified. This was done for performance reasons, as compiling java actions can take a long while on big projects. If you don't recompile java files and any of the source files change (including jars), the JVM b0rks.

We've seen this issue in a couple of projects and have changed the modeler detection parameters accordingly; every new .jar will trigger a recompile of all source files.

answered