openjfx / javafx-maven-plugin

Maven plugin to run JavaFX 11+ applications
Apache License 2.0
367 stars 58 forks source link

Cannot run application with weld-se #38

Open mkwapisz opened 5 years ago

mkwapisz commented 5 years ago

Hi, I tried to add weld-se to my javafx application. The problem is that now I cannot run it with javafx:run goal. I can easily do it with exec:java, so I think there can be a problem with this plugin.

My module-info file is as follows: module CdiApp { requires cdi.api; }

Using the above module config and main which starts a cdi container: SeContainer container = SeContainerInitializer.newInstance().initialize();

I get:

org.jboss.weld.bootstrap.WeldStartup INFO: WELD-000900: 3.1.1 (Final) Exception in thread "main" java.lang.NoClassDefFoundError: javax/interceptor/Interceptor

So I excluded jboss-interceptor-api from weld-se-core and simply added direct dependency to javax.interceptors-api in pom.xml and requires javax.interceptors.api to module-info.java

Now I get:

Exception in thread "main" java.lang.IllegalStateException: WELD-ENV-000033: Invalid bean archive scanning result - found multiple results with the same reference: \NetBeansProjects\CdiApp\target\classes

r-uu commented 1 year ago

I solved that "WELD-ENV-000033: Invalid bean archive scanning result - found multiple results with the same reference" issue by removing beans.xml from test resources. I had another version in main resources, so it was a duplicate.