<!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="https://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;">
    Maven Provided Dependency wth Custom External Module (AS 7)
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/cgeo">Chris Georgoulis</a> in <i>JBoss AS 7 Development</i> - <a href="https://community.jboss.org/message/824778#824778">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hello, I am trying to deploy an external library (javamelody+jrobin) to a JavaEE6 maven project. However it is a requirement that the libraries are "provided scope" and not compiled. Essentially I want to provide the libraries through the JBoss server.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So I have created the two modules as follows as modules in the jboss c:\boss-as-7.1.1.Final\modules\gnu\javamelody\main and c:\boss-as-7.1.1.Final\modules\gnu\jrobin\main</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>and have included the following code in standalone.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160; &lt;subsystem xmlns="urn:jboss:domain:ee:1.0"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;global-modules&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="gnu.javamelody" slot="main"/&gt;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;module name="gnu.jrobin" slot="main"/&gt;</p><p>&#160;&#160; &lt;/global-modules&gt;</p><p> &lt;/subsystem&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>in my pom.xml i have the following</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;dependency&gt;</p><p>&#160;&#160;&#160;&#160; &lt;groupId&gt;net.bull.javamelody&lt;/groupId&gt;</p><p>&#160;&#160;&#160;&#160; &lt;artifactId&gt;javamelody-core&lt;/artifactId&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;version&gt;1.45.0&lt;/version&gt;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;scope&gt;provided&lt;/scope&gt;</p><p> &lt;/dependency&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>finally I get the following warning from the server log:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>16:39:22,293 WARNING [net.bull.javamelody] (MSC service thread 1-3) exception while collecting data: java.lang.NoClassDefFoundError: sun/nio/ch/DirectBuffer</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jrobin.core.RrdNioBackend.unmapFile(RrdNioBackend.java:84) [jrobin-1.5.9.jar:1.5.9]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jrobin.core.RrdNioBackend.close(RrdNioBackend.java:148) [jrobin-1.5.9.jar:1.5.9]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jrobin.core.RrdDb.close(RrdDb.java:443) [jrobin-1.5.9.jar:1.5.9]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jrobin.core.RrdDbPool.release(RrdDbPool.java:196) [jrobin-1.5.9.jar:1.5.9]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at net.bull.javamelody.JRobin.addValue(JRobin.java:333) [javamelody-1.45.0.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at net.bull.javamelody.Collector.collectJRobinValues(Collector.java:449) [javamelody-1.45.0.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at net.bull.javamelody.Collector.collectJavaInformations(Collector.java:358) [javamelody-1.45.0.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at net.bull.javamelody.Collector.collect(Collector.java:297) [javamelody-1.45.0.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at net.bull.javamelody.Collector.collectWithoutErrors(Collector.java:284) [javamelody-1.45.0.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at net.bull.javamelody.Collector.collectLocalContextWithoutErrors(Collector.java:274) [javamelody-1.45.0.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at net.bull.javamelody.FilterContext.initCollect(FilterContext.java:231) [javamelody-1.45.0.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at net.bull.javamelody.FilterContext.&lt;init&gt;(FilterContext.java:101) [javamelody-1.45.0.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at net.bull.javamelody.MonitoringFilter.init(MonitoringFilter.java:111) [javamelody-1.45.0.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:447) [jbossweb-7.0.13.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3269) [jbossweb-7.0.13.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.apache.catalina.core.StandardContext.start(StandardContext.java:3865) [jbossweb-7.0.13.Final.jar:]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_15]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_15]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_15]</p><p>Caused by: java.lang.ClassNotFoundException: sun.nio.ch.DirectBuffer from [Module "gnu.jrobin:main" from local module loader @ccec5f (roots: C:\Users\Chris-Geo\jboss-as-7.1.1.Final</p><p>\modules)]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Anyone have some idea what's wrong?</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/824778#824778">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS 7 Development at <a href="https://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>