Skip to content

PHOSS AP 0.10.0 outbound AS4 always fails with TRANSPORT_ERROR_NO_RETRY and "A Peppol Reporting item can only be created AFTER sending" #58

Description

@ajay2280

PHOSS AP 0.10.0 always returns TRANSPORT_ERROR_NO_RETRY with Phase4PeppolException: A Peppol Reporting item can only be created AFTER sending
Environment
• PHOSS AP: 0.10.0
• phase4: 4.5.1
• peppol-commons: 12.5.3
• Java: Temurin OpenJDK 21.0.11
• Database: PostgreSQL
• Deployment: Docker
• Storage: Filesystem
• Peppol Stage: TEST
Management Status:

{
  "build.version":"0.10.0",
  "version.phase4":"4.5.1",
  "database.type":"postgresql",
  "peppol.stage":"test",
  "peppol.sending.enabled":true,
  "peppol.receiving.enabled":true,
  "storage.mode":"filesystem",
  "status":"UP"
}

Scenario
We are testing invoice exchange between two Peppol participants using PHOSS AP.
Participants:
Sender : 0235:POP000798
Receiver : 0235:POP000700
Both participants are registered in SMP.
The receiver endpoint resolves correctly from SMP:
https://uatas4.webtel.ae/as4
The receiver certificate is successfully retrieved from SMP.
Both sender and receiver are configured correctly, receiving is enabled, and the PHOSS AP instance is healthy.


What Works
We have verified the following:
• PHOSS AP starts successfully.
• Database schema is created correctly.
• PostgreSQL connection works.
• SMP lookup succeeds.
• Endpoint URL is resolved correctly.
• Receiver certificate is downloaded successfully.
• HTTPS endpoint is reachable.
• /management/status reports UP.
• peppol.receiving.enabled=true.
• Payload is successfully generated.
• Outbound transaction is inserted into PostgreSQL.
• Outbound payload file is created successfully.
Current document path stored in database:
/generated/outbound/2026/07/13/09/xxxxxxxx.out
The previous filesystem issue (/dataoutbound/...) has already been fixed.


Problem
Every outbound transmission fails with:

{
  "sendingResult":"TRANSPORT_ERROR_NO_RETRY",
  "sendingError":"Failed to transmit outbound AS4 message to 'https://uatas4.webtel.ae/as4'",
  "sendingException":{
      "class":"com.helger.phase4.peppol.Phase4PeppolException",
      "message":"A Peppol Reporting item can only be created AFTER sending"
  }
}

Stack trace:

com.helger.phase4.peppol.Phase4PeppolException:
A Peppol Reporting item can only be created AFTER sending

at Phase4PeppolSender.createPeppolReportingItemAfterSending()
at OutboundOrchestrator.processPendingOutbound()
...

Receiver Status
Receiver reports:

{
    "status":"UP",
    "peppol.receiving.enabled":true,
    "peppol.sending.enabled":true
}

The endpoint is accessible.
GET /as4
→ 405 Method Not Allowed
POST /as4 (without Content-Type)
→ 400 Bad Request
Therefore nginx and the PHOSS AP endpoint are reachable.


What We Have Already Verified
We have spent considerable time eliminating possible causes.
Verified:
• TLS connectivity
• HTTPS endpoint
• Nginx reverse proxy
• SMP lookup
• Receiver certificate retrieval

phase4.properties.txt
webapp.properties.txt
docker-compose.yml
phoss.log
application.properties.txt

docker-compose.yml
phoss.log

• Filesystem permissions
• Docker configuration
• PostgreSQL
• PHOSS startup
• Receiving enabled
• Sending enabled
• Java keystore loaded successfully
• PFX certificate loaded correctly
The outbound payload is created successfully, therefore storage is no longer the issue.


Log Output
PHOSS logs only show:
Outbound sending exception

com.helger.phase4.peppol.Phase4PeppolException:
A Peppol Reporting item can only be created AFTER sending
No SSL exception, HTTP exception, socket exception, or AS4 processing exception is logged before this.
It appears that the original transport exception is being replaced by the reporting exception.


Questions

  1. Is this a known issue in PHOSS AP 0.10.0 / phase4 4.5.1?
  2. Is there a way to log or expose the original transport exception instead of only:
    Phase4PeppolException:
    A Peppol Reporting item can only be created AFTER sending
  3. Could this be a regression in PHOSS AP 0.10.0?
  4. Is there any known issue when two different Peppol participants are hosted on the same PHOSS AP instance and both resolve (via SMP) to the same /as4 endpoint?
    We would appreciate any guidance on how to identify the underlying transport failure.
    Thank you.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions