Issue Deploying Smooks 2.2.1 on JakartaEE 10 / Payara 6

14 views
Skip to first unread message

Martin

unread,
Mar 3, 2025, 3:16:08 AMMar 3
to Smooks Users
Hello,

we’re updating our application server from Payara 5 to Payara 6, which requires moving from JakartaEE 8 to 10. During deployment of our Spring-Camel application with Smooks 2.2.1, we encountered the following error during lifecycle processing:  

SEVERE: Exception during lifecycle processing
java.lang.IllegalStateException: The lifecycle method [postConstruct] must not throw a checked exception. Related annotation information: annotation [@jakarta.annotation.PostConstruct()] on annotated element [public void org.smooks.engine.resource.visitor.smooks.NestedSmooksVisitor.postConstruct() throws org.xml.sax.SAXException,java.io.IOException,java.net.URISyntaxException,java.lang.ClassNotFoundException] of type [METHOD]
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:543)


Best regards,

Janis

Claude

unread,
Mar 3, 2025, 1:57:06 PMMar 3
to Smooks Users
Could you create an issue? I read the @PostConstruct spec and it's indeed the case that NestedSmooksVisitor.postConstruct() should not be throwing checked exceptions. We have a few @PostContruct methods in the core that throw checked exceptions; I'm guessing in the cartridges as well. Ideally, Smooks enforces this rule in its lifecycle though we'd have to break backwards compatibility.

As a workaround, can you prevent Payara from scanning the Smooks classes?

Claude
Reply all
Reply to author
Forward
0 new messages