Brian Stansberry [
http://community.jboss.org/people/bstansberry%40jboss.com] created the
discussion
"Re: Issues with modular classloading"
To view the discussion, visit:
http://community.jboss.org/message/565928#565928
--------------------------------------------------------------
Another issue I'm seeing is deployment processor failures processing managed bean
jars:
14:11:52,800 INFO [stdout]
@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class
java.lang.Object, authenticationType=CONTAINER) null
14:11:52,800 INFO [stdout] interface javax.annotation.Resource ClassLoader for Module
"module:javax.annotation.api:main"
14:11:52,801 ERROR [deployment] Caught exception handling update (param is
f91250dd-121a-4c01-9407-1c91cb53e5cd): java.lang.NullPointerException
at
org.jboss.as.deployment.managedbean.processors.ManagedBeanAnnotationProcessor.processFieldResource(ManagedBeanAnnotationProcessor.java:295)
at
org.jboss.as.deployment.managedbean.processors.ManagedBeanAnnotationProcessor.processResources(ManagedBeanAnnotationProcessor.java:261)
at
org.jboss.as.deployment.managedbean.processors.ManagedBeanAnnotationProcessor.processDeployment(ManagedBeanAnnotationProcessor.java:125)
at
org.jboss.as.deployment.chain.DeploymentChainImpl.processDeployment(DeploymentChainImpl.java:60)
at
org.jboss.as.model.ServerDeploymentStartStopHandler.activate(ServerDeploymentStartStopHandler.java:191)
at
org.jboss.as.model.ServerDeploymentStartStopHandler.deploy(ServerDeploymentStartStopHandler.java:87)
at
org.jboss.as.model.ServerDeploymentStartStopHandler.deploy(ServerDeploymentStartStopHandler.java:71)
at
org.jboss.as.model.ServerDeploymentStartStopHandler.redeploy(ServerDeploymentStartStopHandler.java:117)
at
org.jboss.as.model.ServerModelDeploymentFullReplaceUpdate.applyUpdate(ServerModelDeploymentFullReplaceUpdate.java:75)
at
org.jboss.as.server.mgmt.ServerUpdateController$ServerModelUpdateTuple.applyUpdate(ServerUpdateController.java:387)
at
org.jboss.as.server.mgmt.ServerUpdateController$ServerModelUpdateTuple.access$200(ServerUpdateController.java:357)
at
org.jboss.as.server.mgmt.ServerUpdateController.applyUpdates(ServerUpdateController.java:182)
at
org.jboss.as.server.mgmt.ServerUpdateController.executeUpdates(ServerUpdateController.java:139)
at
org.jboss.as.server.mgmt.deployment.ServerDeploymentManagerImpl$2.run(ServerDeploymentManagerImpl.java:218)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[:1.6.0_20]
at java.lang.Thread.run(Thread.java:637) [:1.6.0_20]
The NPE happens because a lookup in a Map<Class, Annotation> is unexpectedly
returning null. It returns null because the Resource.class passed to the lookup is loaded
from a different CL from the Resource.class that's a key in the map. The first couple
lines of logging above are some debug output I threw in; the first line shows the map key
was loaded from the system CL while the param was loaded from a module.
I think the problem here is the javax.annotation.api module includes classes that are in
the 'system' module.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/565928#565928]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]