jbertram commented on PR #5386:
URL: 
https://github.com/apache/activemq-artemis/pull/5386#issuecomment-2528633246

   I tested the examples with my branch and they all work _except_ for the CDI 
example. It fails with:
   ```
   $ mvn verify
   [INFO] Scanning for projects...
   [INFO] 
   [INFO] --------------< org.apache.activemq.examples.broker:cdi 
>---------------
   [INFO] Building ActiveMQ Artemis CDI Example 2.39.0-SNAPSHOT
   [INFO]   from pom.xml
   [INFO] --------------------------------[ jar 
]---------------------------------
   [INFO] 
   [INFO] --- maven-enforcer-plugin:3.5.0:enforce (enforce-maven-version) @ cdi 
---
   [INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireMavenVersion 
passed
   [INFO] 
   [INFO] --- maven-enforcer-plugin:3.5.0:enforce (enforce-java-version) @ cdi 
---
   [INFO] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion 
passed
   [INFO] 
   [INFO] --- maven-remote-resources-plugin:3.2.0:process 
(process-resource-bundles) @ cdi ---
   [INFO] Preparing remote bundle 
org.apache.apache.resources:apache-jar-resource-bundle:1.5
   [INFO] Copying 3 resources from 1 bundle.
   [INFO] 
   [INFO] --- maven-resources-plugin:3.3.1:resources (default-resources) @ cdi 
---
   [INFO] Copying 2 resources from src/main/resources to target/classes
   [INFO] Copying 3 resources from target/maven-shared-archive-resources to 
target/classes
   [INFO] 
   [INFO] --- maven-compiler-plugin:3.13.0:compile (default-compile) @ cdi ---
   [INFO] Nothing to compile - all classes are up to date.
   [INFO] 
   [INFO] --- maven-resources-plugin:3.3.1:testResources 
(default-testResources) @ cdi ---
   [INFO] skip non existing resourceDirectory 
/home/jbertram/jboss/src/activemq-artemis-examples/examples/features/standard/cdi/src/test/resources
   [INFO] Copying 3 resources from target/maven-shared-archive-resources to 
target/test-classes
   [INFO] 
   [INFO] --- maven-compiler-plugin:3.13.0:testCompile (default-testCompile) @ 
cdi ---
   [INFO] No sources to compile
   [INFO] 
   [INFO] --- maven-surefire-plugin:3.3.0:test (default-test) @ cdi ---
   [INFO] 
   [INFO] --- maven-jar-plugin:3.4.2:jar (default-jar) @ cdi ---
   [INFO] 
   [INFO] --- artemis-maven-plugin:2.39.0-SNAPSHOT:create (create0) @ cdi ---
   [INFO] 
   [INFO] --- artemis-maven-plugin:2.39.0-SNAPSHOT:cli (start0) @ cdi ---
   [INFO] awaiting server to start
   [INFO] awaiting server to start
   server0-out:     _        _               _
   server0-out:    / \  ____| |_  ___ __  __(_) _____
   server0-out:   / _ \|  _ \ __|/ _ \  \/  | |/  __/
   server0-out:  / ___ \ | \/ |_/  __/ |\/| | |\___ \
   server0-out: /_/   \_\|   \__\____|_|  |_|_|/___ /
   server0-out: Apache ActiveMQ Artemis 2.39.0-SNAPSHOT
   server0-out:
   server0-out:
   [INFO] awaiting server to start
   server0-out:2024-12-09 10:36:08,285 INFO  
[org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting 
ActiveMQ Artemis Server version 2.39.0-SNAPSHOT
   server0-out:2024-12-09 10:36:08,313 INFO  
[org.apache.activemq.artemis.core.server] AMQ221000: Primary message broker is 
starting with configuration Broker Configuration 
(clustered=false,journalDirectory=./data/journal,bindingsDirectory=./data/bindings,largeMessagesDirectory=./data/large-messages,pagingDirectory=./data/paging)
   server0-out:2024-12-09 10:36:08,346 INFO  
[org.apache.activemq.artemis.core.server] AMQ221012: Using AIO Journal
   server0-out:2024-12-09 10:36:08,399 INFO  
[org.apache.activemq.artemis.core.server] AMQ221057: Global Max Size is being 
adjusted to 1/2 of the JVM max size (-Xmx). being defined as 1073741824
   server0-out:2024-12-09 10:36:08,424 INFO  
[org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: 
[artemis-server]. Adding protocol support for: CORE
   server0-out:2024-12-09 10:36:08,425 INFO  
[org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: 
[artemis-amqp-protocol]. Adding protocol support for: AMQP
   server0-out:2024-12-09 10:36:08,425 INFO  
[org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: 
[artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
   server0-out:2024-12-09 10:36:08,426 INFO  
[org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: 
[artemis-mqtt-protocol]. Adding protocol support for: MQTT
   server0-out:2024-12-09 10:36:08,426 INFO  
[org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: 
[artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
   server0-out:2024-12-09 10:36:08,427 INFO  
[org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: 
[artemis-stomp-protocol]. Adding protocol support for: STOMP
   server0-out:2024-12-09 10:36:08,484 INFO  
[org.apache.activemq.artemis.core.server] AMQ221034: Waiting indefinitely to 
obtain primary lock
   server0-out:2024-12-09 10:36:08,484 INFO  
[org.apache.activemq.artemis.core.server] AMQ221035: Primary Server Obtained 
primary lock
   server0-out:2024-12-09 10:36:08,694 INFO  
[org.apache.activemq.artemis.core.server] AMQ221080: Deploying address DLQ 
supporting [ANYCAST]
   server0-out:2024-12-09 10:36:08,695 INFO  
[org.apache.activemq.artemis.core.server] AMQ221003: Deploying ANYCAST queue 
DLQ on address DLQ
   server0-out:2024-12-09 10:36:08,701 INFO  
[org.apache.activemq.artemis.core.server] AMQ221080: Deploying address 
ExpiryQueue supporting [ANYCAST]
   server0-out:2024-12-09 10:36:08,702 INFO  
[org.apache.activemq.artemis.core.server] AMQ221003: Deploying ANYCAST queue 
ExpiryQueue on address ExpiryQueue
   [INFO] awaiting server to start
   server0-out:2024-12-09 10:36:09,023 INFO  
[org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 
0.0.0.0:61616 for protocols [CORE,MQTT,AMQP,STOMP,HORNETQ,OPENWIRE]
   server0-out:2024-12-09 10:36:09,025 INFO  
[org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 
0.0.0.0:5445 for protocols [HORNETQ,STOMP]
   server0-out:2024-12-09 10:36:09,027 INFO  
[org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 
0.0.0.0:5672 for protocols [AMQP]
   server0-out:2024-12-09 10:36:09,053 INFO  
[org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 
0.0.0.0:1883 for protocols [MQTT]
   server0-out:2024-12-09 10:36:09,055 INFO  
[org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 
0.0.0.0:61613 for protocols [STOMP]
   server0-out:2024-12-09 10:36:09,058 INFO  
[org.apache.activemq.artemis.core.server] AMQ221007: Server is now active
   server0-out:2024-12-09 10:36:09,058 INFO  
[org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis 
Message Broker version 2.39.0-SNAPSHOT [0.0.0.0, 
nodeID=62f1df75-b642-11ef-a46e-3ce1a1d12939] 
   [INFO] Server started
   [INFO] 
   [INFO] --- artemis-maven-plugin:2.39.0-SNAPSHOT:runClient (runClient) @ cdi 
---
   Dec 09, 2024 10:36:10 AM org.jboss.weld.bootstrap.WeldStartup <clinit>
   INFO: WELD-000900: 2.4.8 (Final)
   Dec 09, 2024 10:36:10 AM 
org.apache.deltaspike.core.impl.config.EnvironmentPropertyConfigSourceProvider 
<init>
   INFO: Custom config found by DeltaSpike. Name: 
'META-INF/apache-deltaspike.properties', URL: 
'jar:file:/home/jbertram/jboss/src/activemq-artemis-examples/examples/features/standard/cdi/target/cdi-2.39.0-SNAPSHOT.jar!/META-INF/apache-deltaspike.properties'
   Dec 09, 2024 10:36:10 AM 
org.apache.deltaspike.core.util.ProjectStageProducer initProjectStage
   INFO: Computed the following DeltaSpike ProjectStage: Production
   Dec 09, 2024 10:36:10 AM 
org.jboss.weld.environment.deployment.discovery.ReflectionDiscoveryStrategy 
processAnnotatedDiscovery
   INFO: WELD-ENV-000014: Falling back to Java Reflection for 
bean-discovery-mode="annotated" discovery. Add org.jboss:jandex to the 
classpath to speed-up startup.
   Dec 09, 2024 10:36:10 AM org.jboss.weld.bootstrap.WeldStartup startContainer
   INFO: WELD-000101: Transactional services not available. Injection of 
@Inject UserTransaction not available. Transactional observers will be invoked 
synchronously.
   Dec 09, 2024 10:36:10 AM org.jboss.weld.event.ExtensionObserverMethodImpl 
checkRequiredTypeAnnotations
   INFO: WELD-000411: Observer method [BackedAnnotatedMethod] protected 
org.apache.deltaspike.core.impl.message.MessageBundleExtension.detectInterfaces(@Observes
 ProcessAnnotatedType) receives events for all annotated types. Consider 
restricting events using @WithAnnotations or a generic type with bounds.
   Dec 09, 2024 10:36:10 AM org.jboss.weld.event.ExtensionObserverMethodImpl 
checkRequiredTypeAnnotations
   INFO: WELD-000411: Observer method [BackedAnnotatedMethod] protected 
org.apache.deltaspike.core.impl.exclude.extension.ExcludeExtension.vetoBeans(@Observes
 ProcessAnnotatedType, BeanManager) receives events for all annotated types. 
Consider restricting events using @WithAnnotations or a generic type with 
bounds.
   Dec 09, 2024 10:36:10 AM org.jboss.weld.event.ExtensionObserverMethodImpl 
checkRequiredTypeAnnotations
   INFO: WELD-000411: Observer method [BackedAnnotatedMethod] protected 
org.apache.deltaspike.core.impl.interceptor.GlobalInterceptorExtension.promoteInterceptors(@Observes
 ProcessAnnotatedType, BeanManager) receives events for all annotated types. 
Consider restricting events using @WithAnnotations or a generic type with 
bounds.
   Dec 09, 2024 10:36:10 AM org.jboss.weld.logging.ValidatorLogger$7 log
   WARN: WELD-001478: Interceptor class 
org.apache.deltaspike.core.impl.throttling.ThrottledInterceptor is enabled for 
the application and for the bean archive 
/home/jbertram/.m2/repository/org/apache/deltaspike/core/deltaspike-core-impl/1.7.1/deltaspike-core-impl-1.7.1.jar.
 It will only be invoked in the @Priority part of the chain.
   Dec 09, 2024 10:36:10 AM org.jboss.weld.logging.ValidatorLogger$7 log
   WARN: WELD-001478: Interceptor class 
org.apache.deltaspike.core.impl.lock.LockedInterceptor is enabled for the 
application and for the bean archive 
/home/jbertram/.m2/repository/org/apache/deltaspike/core/deltaspike-core-impl/1.7.1/deltaspike-core-impl-1.7.1.jar.
 It will only be invoked in the @Priority part of the chain.
   Dec 09, 2024 10:36:10 AM org.jboss.weld.logging.ValidatorLogger$7 log
   WARN: WELD-001478: Interceptor class 
org.apache.deltaspike.core.impl.future.FutureableInterceptor is enabled for the 
application and for the bean archive 
/home/jbertram/.m2/repository/org/apache/deltaspike/core/deltaspike-core-impl/1.7.1/deltaspike-core-impl-1.7.1.jar.
 It will only be invoked in the @Priority part of the chain.
   [INFO] AMQ571000: Discovered configuration class 
org.jboss.weld.bootstrap.events.ProcessManagedBeanImpl$1@6a261998
   [INFO] AMQ571001: Discovered client configuration class 
org.jboss.weld.bootstrap.events.ProcessBeanImpl$1@76980c75
   [ERROR] 
   java.lang.reflect.InvocationTargetException
       at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
       at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:77)
       at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke (Method.java:569)
       at org.apache.activemq.artemis.maven.ArtemisClientPlugin.doExecute 
(ArtemisClientPlugin.java:86)
       at org.apache.activemq.artemis.maven.ArtemisAbstractPlugin.execute 
(ArtemisAbstractPlugin.java:80)
       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo 
(DefaultBuildPluginManager.java:137)
       at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 
(MojoExecutor.java:370)
       at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute 
(MojoExecutor.java:351)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:215)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:171)
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
(MojoExecutor.java:163)
       at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:117)
       at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
(LifecycleModuleBuilder.java:81)
       at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
 (SingleThreadedBuilder.java:56)
       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
(LifecycleStarter.java:128)
       at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:299)
       at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:193)
       at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:106)
       at org.apache.maven.cli.MavenCli.execute (MavenCli.java:963)
       at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:296)
       at org.apache.maven.cli.MavenCli.main (MavenCli.java:199)
       at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
       at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:77)
       at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke (Method.java:569)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
(Launcher.java:282)
       at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
(Launcher.java:225)
       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
(Launcher.java:406)
       at org.codehaus.plexus.classworlds.launcher.Launcher.main 
(Launcher.java:347)
   Caused by: org.jboss.weld.exceptions.WeldException: WELD-001524: Unable to 
load proxy class for bean Implicit Bean [javax.enterprise.event.Event] with 
qualifiers [@Default] with class interface javax.enterprise.event.Event using 
classloader 
ClassRealm[plugin>org.apache.activemq:artemis-maven-plugin:2.39.0-SNAPSHOT, 
parent: jdk.internal.loader.ClassLoaders$AppClassLoader@30946e09]
       at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass 
(ProxyFactory.java:397)
       at 
org.jboss.weld.bean.builtin.AbstractFacadeBean.initializeAfterBeanDiscovery 
(AbstractFacadeBean.java:61)
       at 
org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork
 (ConcurrentBeanDeployer.java:132)
       at 
org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork
 (ConcurrentBeanDeployer.java:123)
       at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call 
(IterativeWorkerTaskFactory.java:62)
       at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call 
(IterativeWorkerTaskFactory.java:55)
       at java.util.concurrent.FutureTask.run (FutureTask.java:264)
       at java.util.concurrent.ThreadPoolExecutor.runWorker 
(ThreadPoolExecutor.java:1136)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:635)
       at java.lang.Thread.run (Thread.java:840)
   Caused by: java.lang.ExceptionInInitializerError
       at org.jboss.weld.bean.proxy.ProxyFactory.newClassFile 
(ProxyFactory.java:518)
       at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass 
(ProxyFactory.java:473)
       at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass 
(ProxyFactory.java:389)
       at 
org.jboss.weld.bean.builtin.AbstractFacadeBean.initializeAfterBeanDiscovery 
(AbstractFacadeBean.java:61)
       at 
org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork
 (ConcurrentBeanDeployer.java:132)
       at 
org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork
 (ConcurrentBeanDeployer.java:123)
       at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call 
(IterativeWorkerTaskFactory.java:62)
       at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call 
(IterativeWorkerTaskFactory.java:55)
       at java.util.concurrent.FutureTask.run (FutureTask.java:264)
       at java.util.concurrent.ThreadPoolExecutor.runWorker 
(ThreadPoolExecutor.java:1136)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:635)
       at java.lang.Thread.run (Thread.java:840)
   Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make 
protected final java.lang.Class 
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws 
java.lang.ClassFormatError accessible: module java.base does not "opens 
java.lang" to unnamed module @56499781
       at java.lang.reflect.AccessibleObject.checkCanSetAccessible 
(AccessibleObject.java:354)
       at java.lang.reflect.AccessibleObject.checkCanSetAccessible 
(AccessibleObject.java:297)
       at java.lang.reflect.Method.checkCanSetAccessible (Method.java:200)
       at java.lang.reflect.Method.setAccessible (Method.java:194)
       at org.jboss.classfilewriter.ClassFile$1.run (ClassFile.java:238)
       at java.security.AccessController.doPrivileged 
(AccessController.java:569)
       at org.jboss.classfilewriter.ClassFile.<clinit> (ClassFile.java:233)
       at org.jboss.weld.bean.proxy.ProxyFactory.newClassFile 
(ProxyFactory.java:518)
       at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass 
(ProxyFactory.java:473)
       at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass 
(ProxyFactory.java:389)
       at 
org.jboss.weld.bean.builtin.AbstractFacadeBean.initializeAfterBeanDiscovery 
(AbstractFacadeBean.java:61)
       at 
org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork
 (ConcurrentBeanDeployer.java:132)
       at 
org.jboss.weld.bootstrap.ConcurrentBeanDeployer$AfterBeanDiscoveryInitializerFactory.doWork
 (ConcurrentBeanDeployer.java:123)
       at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call 
(IterativeWorkerTaskFactory.java:62)
       at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call 
(IterativeWorkerTaskFactory.java:55)
       at java.util.concurrent.FutureTask.run (FutureTask.java:264)
       at java.util.concurrent.ThreadPoolExecutor.runWorker 
(ThreadPoolExecutor.java:1136)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:635)
       at java.lang.Thread.run (Thread.java:840)
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] 
------------------------------------------------------------------------
   [INFO] Total time:  5.907 s
   [INFO] Finished at: 2024-12-09T10:36:10-06:00
   [INFO] 
------------------------------------------------------------------------
   [ERROR] Failed to execute goal 
org.apache.activemq:artemis-maven-plugin:2.39.0-SNAPSHOT:runClient (runClient) 
on project cdi: null: MojoFailureException -> [Help 1]
   [ERROR] 
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR] 
   [ERROR] For more information about the errors and possible solutions, please 
read the following articles:
   [ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
   ```
   It looks like something related to JPMS given this error:
   ```
   java.lang.reflect.InaccessibleObjectException: Unable to make protected 
final java.lang.Class 
java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws 
java.lang.ClassFormatError accessible: module java.base does not "opens 
java.lang" to unnamed module @56499781
   ```
   Any ideas?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org
For additional commands, e-mail: gitbox-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to