Hi Isomorphic,
I have a problem with a server side exception where I don't know what is causing it.
This request happens in a servlet (=no RPCManager available).
Can you help with what might cause of this exception by looking into the code of DSRequest.java:4859? I'm using v10.1p_2016-04-27.
Server log:
Code fragment, if needed:
Request context is generated using:
RequestContext receiveMailRequestContext = RequestContext.instance(this, servletRequest, servletResponse);
Code for prepareRequest:
This is an important one for me.
Thank you & Best regards
Blama
I have a problem with a server side exception where I don't know what is causing it.
This request happens in a servlet (=no RPCManager available).
Can you help with what might cause of this exception by looking into the code of DSRequest.java:4859? I'm using v10.1p_2016-04-27.
Server log:
Code:
java.lang.NullPointerException at com.isomorphic.datasource.DSRequest.populateModifierAndCreatorFields(DSRequest.java:4859) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:2674) at com.lmscompany.lms.server.ReceiveMail.receiveEmail(ReceiveMail.java:284) at com.lmscompany.lms.server.ReceiveMail.doGet(ReceiveMail.java:78) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:260) at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:88) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)
Code:
DSRequest leadUploadReq = new DSRequest(DatasourceEnum.V_LEADUPLOAD.getValue(), DataSource.OP_ADD); Helper.prepareRequest(leadUploadReq, userID, receiveMailRequestContext); leadUploadReq.setValues(dataImported); final DSResponse leadUploadResp = leadUploadReq.execute();
RequestContext receiveMailRequestContext = RequestContext.instance(this, servletRequest, servletResponse);
Code for prepareRequest:
Code:
public static void prepareRequest(DSRequest dsRequest, Long userID, RequestContext requestContext) throws Exception { prepareRequest(dsRequest, null, null, userID, requestContext); } public static void prepareRequest(DSRequest dsRequest, RPCManager rpcManager, DSTransaction dsTransaction, Long userID, RequestContext requestContext) throws Exception { if (rpcManager != null) { dsRequest.setRPCManager(rpcManager); } else { prepareRequest(dsRequest, requestContext); if (dsTransaction != null) { dsRequest.setDSTransaction(dsTransaction); if (userID != null && dsTransaction.getUserId() == null) { dsTransaction.setUserId(userID.toString()); dsTransaction.setClientRequest(false); } } else if (dsTransaction == null) { if (userID != null) { dsRequest.setUserId(userID.toString()); dsRequest.setClientRequest(false); } } } }
Thank you & Best regards
Blama
Comment