java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor

338 wyświetleń
Przejdź do pierwszej nieodczytanej wiadomości

Hantsy Bai

nieprzeczytany,
1 sty 2022, 08:10:001.01.2022
do Codehaus Cargo
Hi,
In these days, I tried to write some testing codes of Spring 6, and used cargo to deploy war to an embedded Jetty server.

My development stack is:

JakartaEE 9.10
Spring 6.0.0-M1
cargo plugin 1.9.9
Java 17

The cargo:run command raised an exception like this.

>2022-01-01 21:00:59.038:WARN :oejw.WebAppContext:Thread-2: Failed startup of context o.e.j.w.WebAppContext@2be49c8c{/demo,file:///D:/hantsylabs/spring6-sandbox/jpa/target/demo/,UNAVAIL
ABLE}{D:\hantsylabs\spring6-sandbox\jpa\target\demo.war}
java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
        at org.eclipse.jetty.annotations.AnnotationConfiguration.createAnnotationParser(AnnotationConfiguration.


My  cargo embedded jetty is configured like this, I have tried to add asm as deps, did not work.

<profile>
<id>jetty</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven3-plugin</artifactId>
<version>${cargo-maven3-plugin.version}</version>
<configuration>
<container>
<containerId>jetty11x</containerId>
<type>embedded</type>
</container>
<configuration>
<properties>
<cargo.servlet.port>8080</cargo.servlet.port>
<cargo.logging>low</cargo.logging>
</properties>
</configuration>
</configuration>
<dependencies>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>3.3.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>

The complete configuration is here:

S. Ali Tokmen

nieprzeczytany,
1 sty 2022, 08:46:521.01.2022
do codehau...@googlegroups.com

Hi Hantsy

Happy new year!

The embedded containers have many limitations, one being that they only contain the minimal amount of dependencies and hence are unlikely to cope with complex cases without you manually adding these dependencies.

Is there a reason why you don't go for a standalone local configuration? It will be much more stable.

Regards

S. Ali Tokmen
https://ali.tokmen.com/
https://contact.ali.tokmen.com/
--
You received this message because you are subscribed to the Google Groups "Codehaus Cargo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/563d0cc8-a88a-4542-8ac3-c948db7dfb69n%40googlegroups.com.

hantsy bai

nieprzeczytany,
2 sty 2022, 03:32:362.01.2022
do codehau...@googlegroups.com
Thanks, switched to use `artifactInstaller` to get a copy of the jetty dist, the error disappeared.

Hantsy Bai

Self-employed consultant, fullstack developer, agile coach

GitHub: https://github.com/hantsy

Twitter: https://twitter.com/@hantsy

Medium: https://medium.com/@hantsy


You received this message because you are subscribed to a topic in the Google Groups "Codehaus Cargo" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codehaus-cargo/HXOshWQONnY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codehaus-carg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codehaus-cargo/7a0927e5-b3b2-994d-16c7-37346d198afc%40alishomepage.com.

S. Ali Tokmen

nieprzeczytany,
2 sty 2022, 09:25:102.01.2022
do codehau...@googlegroups.com

Hi Hantsy

Excellent news 😁 The standalone local configuration comes with the advantages around configurability and packagability, while thanks to the artifactInstaller you can choose between versions of Jetty.

Enjoy!

hantsy bai

nieprzeczytany,
2 sty 2022, 10:18:562.01.2022
do codehau...@googlegroups.com
Configured another integration test using standalone configuration, https://github.com/hantsy/spring6-sandbox/blob/master/jpa/pom.xml#L476

Hantsy Bai

Self-employed consultant, fullstack developer, agile coach

GitHub: https://github.com/hantsy

Twitter: https://twitter.com/@hantsy

Medium: https://medium.com/@hantsy

S. Ali Tokmen

nieprzeczytany,
2 sty 2022, 11:57:482.01.2022
do codehau...@googlegroups.com

Hi Hantsy

Looks good, though I see the profiles jetty, tomcat and wildfly use the artifactInstaller while the profiles it-jetty, it-tomcat and it-wildfly use an extra step with the maven-dependency-plugin. Is there a reason you chose that approach?

hantsy bai

nieprzeczytany,
3 sty 2022, 00:49:423.01.2022
do codehau...@googlegroups.com
No reason, just try different configurations, and use dependency maven plugin to download a copy to simplify configuration when running on a CI server.

Regards,

Hantsy Bai

Self-employed consultant, fullstack developer, agile coach

GitHub: https://github.com/hantsy

Twitter: https://twitter.com/@hantsy

Medium: https://medium.com/@hantsy

S. Ali Tokmen

nieprzeczytany,
3 sty 2022, 11:34:423.01.2022
do codehau...@googlegroups.com

Hi Hantsy

Excellent - Overall, well done!

Regards

Odpowiedz wszystkim
Odpowiedz autorowi
Przekaż
Nowe wiadomości: 0