[jbossts-issues] [JBoss JIRA] (JBTM-3287) ThornTail LRA coordinator cannot start

Ondrej Chaloupka (Jira) issues at jboss.org
Wed Apr 15 05:23:00 EDT 2020


    [ https://issues.redhat.com/browse/JBTM-3287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14036001#comment-14036001 ] 

Ondrej Chaloupka commented on JBTM-3287:
----------------------------------------

This was a pretty strange behaviour and I was wondering what's the cause of the failure.
The start-up error on Thorntail coordinator provides information there is some trouble of the dependencies lookup
{code}
ERROR [org.wildfly.swarm.modules.application] (main) Unable to find artifact for org.eclipse.microprofile.lra:microprofile-lra-api:1.0-20200414.093442-754
{code}

When we list the content of the jar then we can see there is duplicate of the included artifacts which seems to cause the error

{quote}
unzip -l target/lra-coordinator-thorntail.jar | grep api | grep lra
    22421  04-15-2020 11:04   m2repo/org/eclipse/microprofile/lra/microprofile-lra-api/1.0-SNAPSHOT/microprofile-lra-api-1.0-SNAPSHOT.jar
        0  04-15-2020 11:04   m2repo/org/eclipse/microprofile/lra/microprofile-lra-api/
        0  04-15-2020 11:04   m2repo/org/eclipse/microprofile/lra/microprofile-lra-api/1.0-SNAPSHOT/
    22421  04-15-2020 11:04   m2repo/org/eclipse/microprofile/lra/microprofile-lra-api/1.0-20200414.093442-754/microprofile-lra-api-1.0-20200414.093442-754.jar
        0  04-15-2020 11:04   m2repo/org/eclipse/microprofile/lra/microprofile-lra-api/1.0-20200414.093442-754/
{quote}

After the fix provided by https://github.com/jbosstm/narayana/commit/ec3b90955347d20a1ccede85f3a664c95f71510a the content of the final jar file is simplier

{quote}
unzip -l target/lra-coordinator-thorntail.jar | grep api | grep lra
    22425  04-15-2020 10:51   m2repo/org/eclipse/microprofile/lra/microprofile-lra-api/1.0-SNAPSHOT/microprofile-lra-api-1.0-SNAPSHOT.jar
        0  04-15-2020 10:51   m2repo/org/eclipse/microprofile/lra/microprofile-lra-api/
        0  04-15-2020 10:51   m2repo/org/eclipse/microprofile/lra/microprofile-lra-api/1.0-SNAPSHOT/
{quote}

Which means no duplicate, no trouble.

At start when I saw this issue I was thinking we need to have some dependency discrepancy in the LRA maven module provided. And it was the reason I started to investigate a bit more.
But as I was searching around I think it's just a normal maven behaviour. When I run `dependency:tree` on both versions - with the fix and before the fix then the result is absolutely same.

{code}
mvn clean  dependency:tree -Dincludes=org.eclipse.microprofile.lra:microprofile-lra-api

[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ lra-coordinator-thorntail ---
[INFO] org.jboss.narayana.rts:lra-coordinator-thorntail:war:5.10.5.Final-SNAPSHOT
[INFO] \- org.jboss.narayana.rts:lra-coordinator-jar:jar:5.10.5.Final-SNAPSHOT:compile
[INFO]    \- org.eclipse.microprofile.lra:microprofile-lra-api:jar:1.0-SNAPSHOT:compile
{code}
(The same depenency:tree result can be observed on any lra maven module).

In both cases there is resolved the version to {{1.0-SNAPSHOT}}. The reason here seems to be with the maven version resolution. I think (just I can't find whole the relevant info about exact rules) that the version {{1.0-20200414.093442-754}} as not defined as {{Final}} is resolved to {{SNAPSHOT}}.
This behaviour could be an maven dependency plugin issue but even for the newest version {{3.1.2}} I can see the same behaviour.

In summary, the version definitions seems to be correct for the LRA modules. When the explicit definition of the lra api version is done in the Thorntail module then all works fine. With version which is {{Final}} or {{RC1}} it works correctly without need to explicitly define the version in the {{pom.xml}} of the thorntail module.

I don't think there is much reason to investigate more around.

**I'm removing intentionally the affected version!**
The trouble can be observed only on the LRA branch where the snapshot version of the LRA api was used. The `5.10.4.Final` uses the {{-RC1}} version for the API and the thorntail coordinator works fine there.

> ThornTail LRA coordinator cannot start
> --------------------------------------
>
>                 Key: JBTM-3287
>                 URL: https://issues.redhat.com/browse/JBTM-3287
>             Project: JBoss Transaction Manager
>          Issue Type: Bug
>          Components: LRA
>            Reporter: Martin Stefanko
>            Assignee: Martin Stefanko
>            Priority: Major
>             Fix For: 5.next
>
>
> {noformat}
> Caused by: java.lang.NoClassDefFoundError: org/eclipse/microprofile/lra/annotation/LRAStatus
> {noformat}
> It seems that the LRA API dependency needs to be defined directly in the lra-coordinator-thorntail module. It isn't picked up from transitive dependency (lra-coordinator-jar).



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


More information about the jbossts-issues mailing list