[jbossts-issues] [JBoss JIRA] (JBTM-3295) LRACDIExtension returns null as class name when @LRA annotated class does not contain Compensate or AfterLRA

Ondrej Chaloupka (Jira) issues at jboss.org
Wed May 20 06:27:20 EDT 2020


     [ https://issues.redhat.com/browse/JBTM-3295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ondrej Chaloupka closed JBTM-3295.
----------------------------------


> LRACDIExtension returns null as class name when @LRA annotated class does not contain Compensate or AfterLRA
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: JBTM-3295
>                 URL: https://issues.redhat.com/browse/JBTM-3295
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>          Components: LRA
>            Reporter: Ondrej Chaloupka
>            Assignee: Ondrej Chaloupka
>            Priority: Minor
>             Fix For: 5.10.5.Final
>
>
> When the {{@LRA}} annotated class does not containe neither {{@Compensate}} nor {{@AfterLRA}} the exception message contains {{null}} instead of the name of the guilty class.
> {code}
> Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions:
> Exception 0 :
> java.lang.IllegalStateException: null: The class contains an LRA method and no Compensate or AfterLRA method was found.
>         at io.narayana.lra.client.internal.proxy.nonjaxrs.LRACDIExtension.isLRAParticipant(LRACDIExtension.java:129)
>         at io.narayana.lra.client.internal.proxy.nonjaxrs.LRACDIExtension.getAsParticipant(LRACDIExtension.java:104)
>         at io.narayana.lra.client.internal.proxy.nonjaxrs.LRACDIExtension.observe(LRACDIExtension.java:75)
> {code}
> The reason seems to be that the method {{ClassInfo.simpleName()}} returns null if it's not an inner class or nested class.
> The javadoc says following on it
> {code}
> Returns the source declared name of this class if it is an inner class, or a local class. Otherwise
> this method will return null.
> {code}



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jbossts-issues mailing list