<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Re: Issues with modular classloading
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/bstansberry%40jboss.com">Brian Stansberry</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/565928#565928">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Another issue I'm seeing is deployment processor failures processing managed bean jars:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p>14:11:52,800 INFO  [stdout] @javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER) null<br/>14:11:52,800 INFO  [stdout] interface javax.annotation.Resource ClassLoader for Module "module:javax.annotation.api:main"<br/>14:11:52,801 ERROR [deployment] Caught exception handling update (param is f91250dd-121a-4c01-9407-1c91cb53e5cd): java.lang.NullPointerException<br/>    at org.jboss.as.deployment.managedbean.processors.ManagedBeanAnnotationProcessor.processFieldResource(ManagedBeanAnnotationProcessor.java:295)<br/>    at org.jboss.as.deployment.managedbean.processors.ManagedBeanAnnotationProcessor.processResources(ManagedBeanAnnotationProcessor.java:261)<br/>    at org.jboss.as.deployment.managedbean.processors.ManagedBeanAnnotationProcessor.processDeployment(ManagedBeanAnnotationProcessor.java:125)<br/>    at org.jboss.as.deployment.chain.DeploymentChainImpl.processDeployment(DeploymentChainImpl.java:60)<br/>    at org.jboss.as.model.ServerDeploymentStartStopHandler.activate(ServerDeploymentStartStopHandler.java:191)<br/>    at org.jboss.as.model.ServerDeploymentStartStopHandler.deploy(ServerDeploymentStartStopHandler.java:87)<br/>    at org.jboss.as.model.ServerDeploymentStartStopHandler.deploy(ServerDeploymentStartStopHandler.java:71)<br/>    at org.jboss.as.model.ServerDeploymentStartStopHandler.redeploy(ServerDeploymentStartStopHandler.java:117)<br/>    at org.jboss.as.model.ServerModelDeploymentFullReplaceUpdate.applyUpdate(ServerModelDeploymentFullReplaceUpdate.java:75)<br/>    at org.jboss.as.server.mgmt.ServerUpdateController$ServerModelUpdateTuple.applyUpdate(ServerUpdateController.java:387)<br/>    at org.jboss.as.server.mgmt.ServerUpdateController$ServerModelUpdateTuple.access$200(ServerUpdateController.java:357)<br/>    at org.jboss.as.server.mgmt.ServerUpdateController.applyUpdates(ServerUpdateController.java:182)<br/>    at org.jboss.as.server.mgmt.ServerUpdateController.executeUpdates(ServerUpdateController.java:139)<br/>    at org.jboss.as.server.mgmt.deployment.ServerDeploymentManagerImpl$2.run(ServerDeploymentManagerImpl.java:218)<br/>    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_20]<br/>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_20]<br/>    at java.lang.Thread.run(Thread.java:637) [:1.6.0_20]</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I think the problem here is the javax.annotation.api module includes classes that are in the 'system' module.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/565928#565928">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>