Note that there are some explanatory texts on larger screens.

plurals
  1. POAS7, ClassNotFoundException despite updated sun.jdk module.xml and ear's MANIFEST.MF
    text
    copied!<p>I need to access com.sun.image.codec classes from rt.jar which JBoss 7 hides by default. My modules/sun/jdk/main/module.xml has been update to include com/sun/image:</p> <pre><code>&lt;module xmlns="urn:jboss:module:1.1" name="sun.jdk"&gt; &lt;resources&gt; &lt;!-- currently jboss modules has not way of importing services from classes.jar so we duplicate them here --&gt; &lt;resource-root path="service-loader-resources"/&gt; &lt;/resources&gt; &lt;dependencies&gt; &lt;system export="true"&gt; &lt;paths&gt; &lt;path name="com/sun/image/codec"/&gt; &lt;path name="com/sun/script/javascript"/&gt; &lt;path name="com/sun/jndi/dns"/&gt; &lt;path name="com/sun/jndi/ldap"/&gt; &lt;path name="com/sun/jndi/url"/&gt; &lt;path name="com/sun/jndi/url/dns"/&gt; &lt;path name="com/sun/security/auth"/&gt; &lt;path name="com/sun/security/auth/login"/&gt; &lt;path name="com/sun/security/auth/module"/&gt; &lt;path name="sun/misc"/&gt; &lt;path name="sun/io"/&gt; &lt;path name="sun/nio"/&gt; &lt;path name="sun/nio/ch"/&gt; &lt;path name="sun/security"/&gt; &lt;path name="sun/security/krb5"/&gt; &lt;path name="sun/util"/&gt; &lt;path name="sun/util/calendar"/&gt; &lt;path name="sun/util/locale"/&gt; &lt;path name="sun/security/provider"/&gt; &lt;path name="META-INF/services"/&gt; &lt;/paths&gt; &lt;exports&gt; &lt;include-set&gt; &lt;path name="META-INF/services"/&gt; &lt;/include-set&gt; &lt;/exports&gt; &lt;/system&gt; &lt;/dependencies&gt; </code></pre> <p></p> <p>Inside my ear, I have META-INF/MANIFEST.MF:</p> <pre><code>Manifest-Version: 1.0 Dependencies: sun.jdk export </code></pre> <p>And for good measure, I added -Djboss.modules.system.pkgs on startup.</p> <p>I've tried moving MANIFEST.MF to inside the app's jar that's inside the ear, but didn't work either. The image processing code is inside a stateless session bean, so it's not inside a war, but it's in the jar in the ear.</p> <p>I'm not seeing clear up to date documentation on any of the official JBoss documentation sources, or anything practical that offers the solution, or specifically talks about gaining access to rt.jar classes that are hidden by default. I've tried various bits and pieces I was able to pull from forum messages here and there, but nothing has worked so far.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload