[jboss-user] [Beginners Corner] - Yet another isolated classloader question
tomstrummer
do-not-reply at jboss.com
Fri Sep 26 15:04:08 EDT 2008
I am trying to create a simple web app built with Maven. Maven by default will package all dependencies in the WAR, which causes classloader issues if those libraries are also already in JBoss.
Ok, so I thought classloader isolation solved this problem, but apparently I'm not understanding it correctly. The error is that ELResolver was already loaded (the el-api JAR is in my WAR under /WEB-INF/lib):
| Caused by: java.lang.ClassNotFoundException: Unexpected error during load of: javax.el.ELResolver, msg=loader constraint violation: loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) previously initiated loading for a
| different type with name "javax/el/ELResolver"
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:560)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
|
Here's my jboss-web.xml. My understanding was that this means I get an isolated classloader that will use the classes in my WAR only and not those of the app server:
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
| <jboss-web>
| <class-loading>
| <loader-repository>seam.jboss.org:loader=pjm-mule.war
| <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
| </loader-repository>
| </class-loading>
| </jboss-web>
|
What am I doing wrong? Am I absolutely forced to remove this JAR from my WAR? I have a similar problem with an EAR but this is a much simpler example. Thanks in advance for the help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179135#4179135
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179135
More information about the jboss-user
mailing list