I'm having this problem, however, I need the mentioned jars as they are used by legacy code. I put a jboss-app.xml file in my MET-INF directory, to try to tell jboss to use the classes in my ear rather than provide the container's version, but I'm still getting the error.
jboss-app.xml:
<jboss-app>
<loader-repository>com.domain:loader=EmailAppLoader<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</jboss-app>
From my log file:
DEPLOYMENTS IN ERROR:
Deployment "vfs:///C:/jboss/jboss-6.0.0.Final/server/emailplatform/deploy/email-ear-1.0-SNAPSHOT.ear" is in error due to the following reason(s): ja
va.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data found for annotation element public abstract javax.xml.bind.annotation.XmlN
sForm org.jboss.xb.annotations.JBossXmlSchema.elementFormDefault() (Found data of type Ljavax/xml/bind/annotation/XmlNsForm;.QUALIFIED)
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.0.GA]
at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.0.GA]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.0.0.Final]
at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.0.0.Final]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.Final]
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha
-5]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
Is there another solution other than whacking jar files that contain javax.xml.*