For a trivial app using CDI in Java SE with jakarta namespace I can not get rid of this NoSuchMethodError
during SeContainerInitializer.newInstance().initialize()
:
Caused by: java.lang.NoSuchMethodError: 'java.util.Map org.jboss.jandex.ClassInfo.annotationsMap()'
I guess I'm missing dependencies. Shouldn't this be sufficient?
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-shaded</artifactId>
<version>5.1.0.Final</version>
</dependency>
beans.xml
is in place at src/main/resources/META-INF
The solution that works for me is to exclude jandex from hibernate dependency and to add an individual jandex dependency to the project. Here is an excerpt from my pom.xml: