holodeck-b2b / Holodeck-B2B

Holodeck B2B is an AS4 system-to-system messaging solution that implements the OASIS specifications for ebMS3 and it's AS4 profile. For more information visit the project website
http://holodeck-b2b.org
GNU General Public License v3.0
74 stars 37 forks source link

Cannot get "ex-pm-pull-x509" to work: `NullPointerException` #126

Closed kenyerman closed 2 years ago

kenyerman commented 2 years ago

Description

I followed the Getting Started tutorial, but i cannot do the pull request messaging with the provided examples. When i try to send the message (rename the em-pm-pull-x509 file's extension from accepted to mmd), it turns to rejected and an err file gets creataed. The file shows a NullPointerException error.

Steps to reproduce

  1. Follow the Getting Started tutorial
  2. Copy the em-pm-pull-x509-init.xml to instance A/repository/pmodes
  3. Copy the em-pm-pull-x509-resp.xml to instance B/repository/pmodes
  4. In instance-A/data/msg_out rename the em-pm-pull-x509 file's extension from accepted to mmd

Expected behavior

The message successfully transfered, we get a response from instance B

Current behavior

The message gets rejected because of NullPointerException

Content of em-pm-pull-x509.err

The message could not be submitted to Holodeck B2B due to an error:

Error type:    NullPointerException
Error message: null

Error details
-------------
Exception cause: unknown
Stacktrace:
java.lang.NullPointerException
    at org.holodeckb2b.core.submission.MMDCompleter.complete(MMDCompleter.java:107)
    at org.holodeckb2b.core.submission.MMDCompleter.complete(MMDCompleter.java:92)
    at org.holodeckb2b.core.submission.MessageSubmitter.doSubmission(MessageSubmitter.java:106)
    at org.holodeckb2b.core.submission.MessageSubmitter.submitMessage(MessageSubmitter.java:74)
    at org.holodeckb2b.backend.file.SubmitOperation.doProcessing(SubmitOperation.java:135)
    at org.holodeckb2b.common.workers.AbstractWorkerTask.run(AbstractWorkerTask.java:80)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
RenateS commented 2 years ago

The problem is in your step 4. With a pull, the initiator pulls the payload from the responder as is explained in our documentation. The payload to be transferred should therefore be placed in your instance B. We will look into making this clearer in the error message.