[jboss-dev-forums] [JBoss AS 7 Development] - org.jboss.modules.ModuleClassLoader cannot be cast to java.net.URLClassLoader
kewen zhu
do-not-reply at jboss.com
Thu Jul 5 22:12:58 EDT 2012
kewen zhu [https://community.jboss.org/people/jklmnlkevin] created the discussion
"org.jboss.modules.ModuleClassLoader cannot be cast to java.net.URLClassLoader"
To view the discussion, visit: https://community.jboss.org/message/746536#746536
--------------------------------------------------------------
hello,
some of my code depends on java.net.URLClassLoader, so when i upgrade from jboss4 to as 7, org.jboss.modules.ModuleClassLoader cannot be cast to java.net.URLClassLoader exception happened. what i wonder is if we can choose a classloader instead of ModuleClassLoader?
Here is my code
URLClassLoader classLoader = (URLClassLoader) DispatcherConfigurationParser.class.getClassLoader();
URL[] urls = classLoader.getURLs();
or are there other ways to resolve this issue? i don't want to depend on ModuleClassLoader in my code, because it means i have to run my application in jboss 7.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/746536#746536]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120705/4f752e0d/attachment.html
More information about the jboss-dev-forums
mailing list