Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-5051

NPE when ContentType is null on REST response

XMLWordPrintable

    • NEW
    • NEW
    • Hide

      We did the following:

      • Create executable Java class (with main method) in JBDS 7.1.1 which executes the code above.
      • Made a request to a Business Central instance deployed on WAS 8.5.5 using the aforementioned code.
      • Got error.
      Show
      We did the following: Create executable Java class (with main method) in JBDS 7.1.1 which executes the code above. Made a request to a Business Central instance deployed on WAS 8.5.5 using the aforementioned code. Got error.

      The following code is executed by the client (RemoteRestRuntimeEngineFactory appears to be deprecated in this version of kie-remote-client, but I assume is still supposed to work):

      		RemoteRestRuntimeEngineFactory restEngineFactory = RemoteRuntimeEngineFactory
      				.newRestBuilder().addDeploymentId(deployment).addUrl(url)
      				.addUserName(username).addPassword(password).buildFactory();
      
      		KieSession session = restEngineFactory.newRuntimeEngine()
      				.getKieSession();
      		session.startProcess(process, parameters);
      

      The session.startProcess(...) call results in the following stacktrace client-side:

      org.kie.remote.client.api.exception.RemoteCommunicationException: Unable to retrieve content from response
      	at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:425)
      	at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeCommand(AbstractRemoteCommandObject.java:159)
      	at org.kie.services.client.api.command.KieSessionClientCommandObject.startProcess(KieSessionClientCommandObject.java:276)
      	at com.redhat.consulting.process.RESTProcessStarter.startProcess(RESTProcessStarter.java:50)
      	at com.redhat.consulting.process.RESTProcessStarter.main(RESTProcessStarter.java:33)
      Caused by: java.lang.NullPointerException
      	at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:391)
      	... 4 more
      

      The following error shows up in the server logs:

      [4/5/16 17:36:58:778 EDT] 00000e0c RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (403 - Forbidden) with message null while processing POST request sent to https://server:port/business-central/rest/execute
      

              docmrc97 Mark Coble (Inactive)
              david.vanbalen@amentra.com David van Balen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: