OxalisCommunity / oxalis

Oxalis - PEPPOL Access Point open source implementation - Core component
Other
121 stars 90 forks source link

Nullpointer in SMP Lookup if record lacks SMP in Oxalis 5.0.0 #513

Closed OysteinLq closed 3 years ago

OysteinLq commented 3 years ago

Hi, we've tried to upgrade to Oxalis 5.0.0 today, but had to revert on the SMP lookup, because we're experiencing Nullpointers with SMP lookups for a couple of recipients.

It's these particular two: 0192:917537534
and 9908:943574537

It leads to the pretty unhelpful com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException, which has no stacktrace. We've yet to successfull debug this, but our working theory is that it's related to the fact that in both these cases, we can see in https://my.galaxygw.com/participantlookup that their SMP is "Unknown". So perhaps there's a NULL there that causes havoc?

If anyone could try to recreate this by looking up something akin to the following:

receiver='0192:917537534'
documentType='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1'
processIdentifier='urn:fdc:peppol.eu:2017:poacc:billing:01:1.0'

We'd appreciate it, thanks. In both cases these work just fine on earlier Oxalis.

inxkl commented 3 years ago

https://github.com/OxalisCommunity/vefa-peppol/issues/41

OysteinLq commented 3 years ago

Thanks, can confirm that the commit referred to in that issue fixes the problem

aaron-kumar commented 3 years ago

@OysteinLq : You mentioned "In both cases these work just fine on earlier Oxalis.". Can you let me know the earlier version you are using? Are you using CNAME or NAPTR based lookup in earlier version? Because that is only major difference between earlier versions of vefa-peppol. I hope, you are also using regular release of Oxalis and Not using any of your self-maintained Oxalis version or Oxalis master version.

I am trying to reproduce/fix the issue in Oxalis version 5.0.0 (vefa-peppol version 2.0.0) but root cause of issue is in SMP (probably problem reading SMP certificate details). After this fix, probably Oxalis can only provide better error handling (error message), actual issue need to be fixed in SMP (SMP certificate).

Since both participants "0192:917537534" and "9908:943574537" missing in SMK (Test environment) and also I don't have access to Production AP credentials so I need additional information to reproduce the problem and then fix it.

P.S. Sorry for delayed response as I was sick for 3 weeks. I am back in Business and will help to fix this possible bug quickly. As a side note, this will be part of upcoming release which will also contains Italy and Finland ICDs code list (eDEC version 7.5)

OysteinLq commented 3 years ago

Hi, we were (and are) running Oxalis 4.1.2, with AS4 4.1.9, which gives no problems looking up the aforementioned participants. I don't know about CNAME vs NAPTR, to be honest.

When we used the plain Oxalis 5.0.0, we started getting nullpointers without any informative stacktraces.

Thanks to @inxkl 's comment, we decide to clone

        <artifactId>peppol-lookup</artifactId>
        <groupId>network.oxalis.vefa</groupId>
        <version>2.0.0</version>

We then made the single change described in commit https://github.com/OxalisCommunity/vefa-peppol/commit/84fd271aecbeb5accbfbf9bc1c98639e7f3122e4
We then ran the plain Oxalis 5.0.0, but with our custom peppol-lookup jarfile inserted in place of the legitimately released one. That seemed to fix our issue, as we no longer had problems looking up or sending to the two participants in question.

Even though that worked fine, we didn't want to keep operating on an unofficial fork of this sort, so we've reverted to 4.1.2. for the time being.

So, in theory, that null check is all that's necessary to fix the issue, unless you see it as symptomatic of a large problem.

I don't have any detailed logs to share, since we've only run this in on a INFO loglevel, and so all the logged details are things from our own system, the most pertinent of which has already been described in the initial post. But do let me know if we can help in any way, and I'll see what I can do. I'm working part time atm because of parent leave, so I can't guarantee immediate response.

aaron-kumar commented 3 years ago

Thanks for response @OysteinLq . https://github.com/OxalisCommunity/vefa-peppol/issues/41 will be part of upcoming Oxalis release (to be released this week only)

Upcoming release will contains number of changes including https://github.com/OxalisCommunity/vefa-peppol/issues/41 and ICDs list change for Italy and Finland.

Thanks once again for your "part time" response.

aaron-kumar commented 3 years ago

Oxalis 5.0.1 released (https://github.com/OxalisCommunity/oxalis/releases/tag/v5.0.1)

OysteinLq commented 3 years ago

@aaron-kumar Thanks, we updated our test and "pilot" setups with this today, and can confirm that the problem described in this issue has been resolved. We will be testing this for a bit, and will most likely try upgrading our production environment again next week.

Once that's been up for a bit, I'll write an update to the discussion thread https://github.com/OxalisCommunity/oxalis/discussions/511