Hi,
I have been facing a problem that I have no solution to overcome:
java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
* I dont have any Idea Why the class do no cast, the class extends the second one and It is loaded (Checked on debug mode)
* I have removed inclusion on the plugin of a diferent xerces library than the one provided by jira
* There is a javax.xml.parsers.DocumentBuilderFactory file in META-INF/services with the class name: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
Do you guys have any ideia How to solve this issue!?
My dependency tree:
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ plugin.jira ---
[INFO] ptinovacao.iam:plugin.jira:atlassian-plugin:1.0-SNAPSHOT
[INFO] +- com.atlassian.jira:jira-api:jar:6.3:provided
[INFO] | +- com.atlassian.annotations:atlassian-annotations:jar:0.12:provided
[INFO] | +- com.atlassian.ofbiz:entityengine-share:jar:1.0.56:provided
[INFO] | +- com.atlassian.ofbiz:entityengine:jar:1.0.56:provided
[INFO] | | +- org.weakref:jmxutils:jar:1.8:provided
[INFO] | | \- net.ju-n.commons-dbcp-jmx:commons-dbcp-jmx-jdbc4:jar:0.2:provided
[INFO] | +- opensymphony:webwork:jar:1.4-atlassian-30:provided
[INFO] | | \- com.atlassian.html:atlassian-html-encoder:jar:1.4:provided
[INFO] | +- webwork:pell-multipart-request:jar:1.31.0:provided
[INFO] | +- org.apache.lucene:lucene-core:jar:3.3.0:provided
[INFO] | +- com.atlassian.core:atlassian-core:jar:4.6.17:provided
[INFO] | | +- org.apache.sanselan:sanselan:jar:0.97-incubator:provided
[INFO] | | +- com.atlassian.image:atlassian-image-consumer:jar:1.0.1:provided
[INFO] | | \- javax.media:jai-core:jar:1.1.3:provided
[INFO] | +- com.atlassian.extras:atlassian-extras:jar:2.2.2:provided
[INFO] | +- com.atlassian.velocity:atlassian-velocity:jar:1.3:provided
[INFO] | +- osworkflow:osworkflow:jar:2.8.1:provided
[INFO] | +- opensymphony:propertyset:jar:1.5:provided
[INFO] | +- com.atlassian.cache:atlassian-cache-api:jar:2.4.0-m2:provided
[INFO] | +- com.atlassian.beehive:beehive-api:jar:0.1.3:provided
[INFO] | +- com.atlassian.tenancy:atlassian-tenancy-api:jar:1.4.0:provided
[INFO] | +- com.google.guava:guava:jar:11.0.2-atlassian-02:provided
[INFO] | | \- com.google.guava:guava-bridge:jar:11.0.2-atlassian-02:provided
[INFO] | +- com.atlassian.fugue:fugue:jar:2.1.0:provided
[INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.1:provided
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.1:provided
[INFO] | +- com.atlassian.mail:atlassian-mail:jar:2.5.0:provided
[INFO] | +- oro:oro:jar:2.0.7:compile
[INFO] | +- atlassian-bandana:atlassian-bandana:jar:0.1.13:provided
[INFO] | +- com.atlassian.threadlocal:atlassian-threadlocal:jar:1.3:provided
[INFO] | +- com.atlassian.applinks:applinks-api:jar:4.2.1:provided
[INFO] | +- com.atlassian.velocity.htmlsafe:velocity-htmlsafe:jar:1.2.1-m2:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webfragment:jar:3.0.5:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webfragment-api:jar:3.0.5:provided
[INFO] | +- jfree:jfreechart:jar:1.0.13:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-webresource:jar:3.1.0:provided
[INFO] | | +- com.atlassian.plugins:atlassian-plugins-webresource-common:jar:3.0.0:provided
[INFO] | | \- com.atlassian.plugins:atlassian-plugins-webresource-api:jar:3.1.0:provided
[INFO] | +- jfree:jcommon:jar:1.0.8:provided
[INFO] | +- com.atlassian.sal:sal-api:jar:2.10.15:provided
[INFO] | +- com.atlassian.gadgets:atlassian-gadgets-api:jar:3.5.1:provided
[INFO] | +- com.atlassian.johnson:atlassian-johnson:jar:1.1.2:provided
[INFO] | +- joda-time:joda-time:jar:2.3:compile
[INFO] | +- commons-lang:commons-lang:jar:2.6:compile
[INFO] | +- commons-io:commons-io:jar:1.4:provided
[INFO] | +- commons-httpclient:commons-httpclient:jar:3.0.1:compile
[INFO] | +- log4j:log4j:jar:1.2.16:provided
[INFO] | +- org.quartz-scheduler:quartz:jar:1.8.6:provided
[INFO] | +- com.atlassian.profiling:atlassian-profiling:jar:1.9:provided
[INFO] | +- com.atlassian.scheduler:atlassian-scheduler-api:jar:1.1.3:provided
[INFO] | +- com.atlassian.analytics:analytics-api:jar:3.15:provided
[INFO] | \- javax.servlet:servlet-api:jar:2.4:provided
[INFO] +- junit:junit:jar:4.10:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] +- com.atlassian.plugins:atlassian-plugins-osgi-testrunner:jar:1.2.0:test
[INFO] | \- org.apache.wink:wink-client:jar:1.1.3-incubating:test
[INFO] | +- org.apache.wink:wink-common:jar:1.1.3-incubating:test
[INFO] | | \- org.apache.geronimo.specs:geronimo-annotation_1.1_spec:jar:1.0:test
[INFO] | +- javax.xml.bind:jaxb-api:jar:2.2:test
[INFO] | | \- javax.xml.stream:stax-api:jar:1.0-2:test
[INFO] | \- com.sun.xml.bind:jaxb-impl:jar:2.2.1.1:test
[INFO] +- javax.ws.rs:jsr311-api:jar:1.1.1:provided
[INFO] +- com.google.code.gson:gson:jar:2.2.2-atlassian-1:provided
[INFO] +- com.atlassian.seraph:atlassian-seraph:jar:2.6.0:provided
[INFO] | +- opensymphony:oscore:jar:2.2.7:provided
[INFO] | +- com.atlassian.security:atlassian-secure-random:jar:1.0:provided
[INFO] | \- com.atlassian.security:atlassian-cookie-tools:jar:2.0:provided
[INFO] +- pt.ptinovacao.saml:saml-utils:jar:1.2.1:compile
[INFO] | +- ch.qos.logback:logback-core:jar:1.0.9:compile
[INFO] | \- ch.qos.logback:logback-classic:jar:1.0.9:compile
[INFO] +- pt.ptinovacao.saml:saml-http:jar:1.2.1:compile
[INFO] +- com.atlassian.crowd:embedded-crowd-api:jar:2.7.0:provided
[INFO] | +- org.apache.commons:commons-lang3:jar:3.1:provided
[INFO] | \- com.google.code.findbugs:jsr305:jar:2.0.1:provided
[INFO] +- com.atlassian.crowd:embedded-crowd-core:jar:2.7.0:provided
[INFO] | +- com.atlassian.crowd:embedded-crowd-spi:jar:2.7.0:provided
[INFO] | +- com.atlassian.crowd:crowd-api:jar:2.7.0:provided
[INFO] | | \- com.atlassian.spring:atlassian-spring:jar:2.0.0:provided
[INFO] | | +- org.springframework:spring-jdbc:jar:2.0.6:provided
[INFO] | | | \- org.springframework:spring-dao:jar:2.0.6:provided
[INFO] | | +- org.springframework:spring-context:jar:2.0.6:provided
[INFO] | | \- org.springframework:spring-web:jar:2.0.6:provided
[INFO] | +- com.atlassian.crowd:crowd-core:jar:2.7.0:provided
[INFO] | | +- com.atlassian.crowd:crowd-persistence-file:jar:2.7.0:provided
[INFO] | | +- net.sf.ehcache:ehcache:jar:2.7.2:provided
[INFO] | | +- org.springframework:spring-context-support:jar:3.2.4.RELEASE:provided
[INFO] | | \- quartz:quartz:jar:1.5.2:provided
[INFO] | +- com.atlassian.crowd:crowd-events:jar:2.7.0:provided
[INFO] | +- com.atlassian.crowd:crowd-ldap:jar:2.7.0:provided
[INFO] | +- com.atlassian.crowd:crowd-remote:jar:2.7.0:provided
[INFO] | +- com.atlassian.event:atlassian-event:jar:2.3.0:provided
[INFO] | \- dom4j:dom4j:jar:1.6.1:provided
[INFO] +- com.atlassian.sal:sal-core:jar:2.10.11:provided
[INFO] +- com.atlassian.crowd:embedded-crowd:pom:2.7.0:provided
[INFO] +- com.atlassian.jira:jira-core:jar:6.3:provided
[INFO] | +- com.atlassian.jira:jira-attachment-dmz:jar:6.3:provided
[INFO] | +- com.atlassian.crowd:crowd-server-api:jar:2.8.0-OD-6-JIRA-01:provided
[INFO] | +- com.atlassian.crowd:crowd-integration-api:jar:2.8.0-OD-6-JIRA-01:provided
[INFO] | +- com.atlassian.crowd:crowd-integration-client-rest:jar:2.8.0-OD-6-JIRA-01:provided
[INFO] | | \- com.atlassian.crowd:crowd-integration-client-common:jar:2.8.0-OD-6-JIRA-01:provided
[INFO] | +- com.atlassian.crowd:crowd-persistence:jar:2.8.0-OD-6-JIRA-01:provided
[INFO] | +- com.atlassian.crowd:crowd-server-common:jar:2.8.0-OD-6-JIRA-01:provided
[INFO] | +- com.atlassian.crowd:crowd-password-encoders:jar:2.8.0-OD-6-JIRA-01:provided
[INFO] | +- com.atlassian.ip:atlassian-ip:jar:3.0:provided
[INFO] | +- com.atlassian.security:atlassian-password-encoder:jar:3.2.1:provided
[INFO] | +- com.atlassian.security:atlassian-secure-utils:jar:3.2.1:provided
[INFO] | +- org.springframework.security:spring-security-core:jar:3.1.0.RELEASE:provided
[INFO] | | +- aopalliance:aopalliance:jar:1.0:provided
[INFO] | | \- org.springframework.security:spring-security-crypto:jar:3.1.0.RELEASE:provided
[INFO] | +- org.springframework:spring-core:jar:2.5.6.SEC01:provided
[INFO] | | \- commons-logging:commons-logging:jar:1.1.1:provided
[INFO] | +- org.springframework:spring-beans:jar:2.5.6.SEC01:provided
[INFO] | +- org.springframework.ldap:spring-ldap-core:jar:1.3.1.RELEASE:provided
[INFO] | +- org.springframework:spring-tx:jar:2.5.6.SEC01:provided
[INFO] | +- com.atlassian.crowd:crowd-integration-seraph25:jar:2.8.0-OD-6-JIRA-01:provided
[INFO] | +- wsdl4j:wsdl4j:jar:1.6.1:provided
[INFO] | +- org.codehaus.xfire:xfire-core:jar:1.2.6:provided
[INFO] | +- org.codehaus.xfire:xfire-aegis:jar:1.2.6:provided
[INFO] | +- com.atlassian.soy:soy-template-renderer-api:jar:2.7.0:provided
[INFO] | +- com.atlassian.sal:sal-spi:jar:2.10.15:provided
[INFO] | +- com.atlassian.aui:auiplugin-spi:jar:5.6.7-jira-1:provided
[INFO] | +- com.atlassian.gadgets:atlassian-gadgets-spi:jar:3.5.1:provided
[INFO] | | \- net.jcip:jcip-annotations:jar:1.0:provided
[INFO] | +- com.atlassian.oauth:atlassian-oauth-api:jar:1.9.4:provided
[INFO] | +- com.atlassian.p4package:atlassian-p4package:jar:2007.12.14:provided
[INFO] | +- com.atlassian.cache:atlassian-cache-ehcache:jar:2.4.0-m2:provided
[INFO] | | \- com.atlassian.cache:atlassian-cache-common-impl:jar:2.4.0-m2:provided
[INFO] | +- com.atlassian.cache:atlassian-cache-memory:jar:2.4.0-m2:provided
[INFO] | +- com.atlassian.beehive:beehive-core:jar:0.1.3:provided
[INFO] | +- com.atlassian.config:atlassian-config:jar:0.15:provided
[INFO] | +- com.sun:jai_core:jar:1.1.3:provided
[INFO] | +- com.sun:jai_codec:jar:1.1.3:provided
[INFO] | +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] | +- com.atlassian.activeobjects:activeobjects-spi:jar:0.23.7:provided
[INFO] | +- com.atlassian.util.concurrent:atlassian-util-concurrent:jar:2.6.2:provided
[INFO] | +- com.atlassian.instrumentation:atlassian-instrumentation-core:jar:1.8.1:provided
[INFO] | +- org.slf4j:slf4j-log4j12:jar:1.6.4:provided
[INFO] | +- org.slf4j:jul-to-slf4j:jar:1.6.4:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.6.4:compile
[INFO] | +- atlassian-logging:atlassian-logging:jar:1.1:provided
[INFO] | +- com.atlassian.jdk.utilities:atlassian-jdk-utilities:jar:0.4:provided
[INFO] | +- com.atlassian.scheduler:atlassian-scheduler-core:jar:1.1.3:provided
[INFO] | +- com.atlassian.scheduler:atlassian-scheduler-quartz1:jar:1.1.3:provided
[INFO] | | \- org.quartz-scheduler:quartz-oracle:jar:1.8.6:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-core:jar:3.2.5:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-schema:jar:3.2.5:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-servlet:jar:3.2.5:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-osgi:jar:3.2.5:provided
[INFO] | | +- biz.aQute:bndlib:jar:1.43.0-atlassian-1:provided
[INFO] | | +- org.apache.felix:org.apache.felix.framework:jar:3.0.2:provided
[INFO] | | \- org.twdata.pkgscanner:package-scanner:jar:0.9.5:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-osgi-events:jar:3.2.5:provided
[INFO] | +- com.atlassian.plugins:atlassian-plugins-eventlistener:jar:3.2.5:provided
[INFO] | +- com.atlassian.security.auth.trustedapps:atlassian-trusted-apps-core:jar:3.0.8:provided
[INFO] | +- com.atlassian.security.auth.trustedapps:atlassian-trusted-apps-seraph-integration:jar:3.0.8:provided
[INFO] | +- org.bouncycastle:bcprov-jdk15on:jar:1.50:provided
[INFO] | +- com.atlassian.renderer:atlassian-renderer:jar:8.0.5:provided
[INFO] | +- com.atlassian.gzipfilter:atlassian-gzipfilter:jar:1.17:provided
[INFO] | | \- com.atlassian.gzipfilter:atlassian-flushable-gzipoutputstream:jar:1.1:provided
[INFO] | +- opensymphony:sitemesh:jar:2.5-atlassian-10:provided
[INFO] | +- commons-digester:commons-digester:jar:1.4.1:provided
[INFO] | +- commons-beanutils:commons-beanutils:jar:1.6.1:provided
[INFO] | +- commons-configuration:commons-configuration:jar:1.0:provided
[INFO] | +- org.apache.lucene:lucene-analyzers:jar:3.3.0:provided
[INFO] | +- com.atlassian:lucene-extras:jar:3.3.0-atlassian-3:provided
[INFO] | +- org.apache.velocity:velocity:jar:1.6.4-atlassian-5:compile
[INFO] | +- org.apache.velocity:velocity-tools:jar:1.3:provided
[INFO] | +- javax.activation:activation:jar:1.1.1:provided
[INFO] | +- javax.mail:mail:jar:1.4.5:provided
[INFO] | +- glue:glue:jar:5.0b2:provided
[INFO] | +- bsf:bsf:jar:2.2:provided
[INFO] | +- bsh:bsh:jar:1.2b7:provided
[INFO] | +- csv:csv:jar:20:provided
[INFO] | +- org.picocontainer:picocontainer:jar:2.14.3:provided
[INFO] | +- jzlib:jzlib:jar:1.0.5:provided
[INFO] | +- com.octo.captcha:jcaptcha:jar:2.0-alpha-1:provided
[INFO] | +- com.octo.captcha:jcaptcha-api:jar:2.0-alpha-1:provided
[INFO] | +- com.jhlabs:filters:jar:2.0.235:provided
[INFO] | +- commons-dbcp:commons-dbcp:jar:1.4:provided
[INFO] | +- commons-pool:commons-pool:jar:1.5.4:provided
[INFO] | +- hsqldb:hsqldb:jar:1.8.0.5:provided
[INFO] | +- jndi:jndi:jar:1.2.1:provided
[INFO] | +- jta:jta:jar:1.0.1:provided
[INFO] | +- ots-jts:ots-jts:jar:1.0:provided
[INFO] | +- jotm:jotm:jar:1.4.3:provided
[INFO] | +- jotm:jotm-jrmp_stubs:jar:1.4.3:provided
[INFO] | +- jotm:jotm-iiop_stubs:jar:1.4.3:provided
[INFO] | +- jotm:jonas_timer:jar:1.4.3:provided
[INFO] | +- jotm:objectweb-datasource:jar:1.4.3:provided
[INFO] | +- carol:carol:jar:1.5.2:provided
[INFO] | +- carol:carol-properties:jar:1.5.2:provided
[INFO] | +- xapool:xapool:jar:1.3.1:provided
[INFO] | +- xml-apis:xml-apis:jar:1.3.04:runtime
[INFO] | +- commons-jelly:commons-jelly:jar:1.0:provided
[INFO] | +- commons-jelly:commons-jelly-tags-junit:jar:1.0:provided
[INFO] | +- commons-jelly:commons-jelly-tags-util:jar:1.1.1:provided
[INFO] | +- commons-jelly:commons-jelly-tags-email:jar:1.0:provided
[INFO] | +- commons-jelly:commons-jelly-tags-log:jar:1.0:provided
[INFO] | +- commons-jelly:commons-jelly-tags-http:jar:1.0:provided
[INFO] | +- commons-jelly:commons-jelly-tags-soap:jar:1.0:provided
[INFO] | +- commons-jelly:commons-jelly-tags-sql:jar:1.0:provided
[INFO] | +- commons-jelly:commons-jelly-tags-regexp:jar:1.0:provided
[INFO] | +- commons-jexl:commons-jexl:jar:1.1:provided
[INFO] | +- commons-codec:commons-codec:jar:1.4:compile
[INFO] | +- org.apache.commons:commons-compress:jar:1.4:provided
[INFO] | | \- org.tukaani:xz:jar:1.0:provided
[INFO] | +- xmlrpc:xmlrpc:jar:2.0:provided
[INFO] | +- axis:axis:jar:1.3-atlassian-1:provided
[INFO] | +- axis:axis-jaxrpc:jar:1.3:provided
[INFO] | +- axis:axis-saaj:jar:1.3:provided
[INFO] | +- commons-discovery:commons-discovery:jar:0.2:provided
[INFO] | +- xerces:xercesImpl:jar:2.9.1:provided
[INFO] | +- xalan:xalan:jar:2.7.0:runtime
[INFO] | +- xml-security:xmlsec:jar:1.4.2:provided
[INFO] | +- com.atlassian.security:atlassian-secure-xml:jar:3.0:provided
[INFO] | +- datafile:datafile:jar:1.3.3:provided
[INFO] | +- xpp3:xpp3:jar:1.1.3.4-RC8:provided
[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.3.1:provided
[INFO] | +- org.tuckey:urlrewritefilter:jar:4.0.3:provided
[INFO] | +- radeox:radeox:jar:1.0b2-forked-22Apr2004:provided
[INFO] | +- jtidy:jtidy:jar:r8-20050104:provided
[INFO] | +- jdom:jdom:jar:1.0:provided
[INFO] | +- org.jsoup:jsoup:jar:1.3.3:provided
[INFO] | +- org.codehaus.woodstox:wstx-asl:jar:3.2.4:provided
[INFO] | +- com.atlassian.modzdetector:modz-detector:jar:0.12:provided
[INFO] | +- org.antlr:antlr-runtime:jar:3.5.2:provided
[INFO] | +- commons-jrcs:commons-jrcs:jar:diff-0.1.7:provided
[INFO] | +- cglib:cglib-nodep:jar:2.1_3:provided
[INFO] | +- com.atlassian.applinks:applinks-spi:jar:4.2.1:provided
[INFO] | +- com.atlassian.applinks:applinks-host:jar:4.2.1:provided
[INFO] | +- org.mozilla:rhino:jar:1.7R4:provided
[INFO] | +- com.atlassian.ozymandias:atlassian-plugin-point-safety:jar:0.10:provided
[INFO] | +- commons-validator:commons-validator:jar:1.4.0:provided
[INFO] | +- com.atlassian.botocss:botocss-core:jar:4.4-spudbean-2:provided
[INFO] | | \- net.sf.cssbox:jstyleparser:jar:1.16-atlassian-1:provided
[INFO] | | \- net.sourceforge.nekohtml:nekohtml:jar:1.9.19:provided
[INFO] | +- com.atlassian.json:atlassian-json-api:jar:0.9:provided
[INFO] | \- io.atlassian.blobstore:blobstore-client-api:jar:1.0.26:provided
[INFO] +- org.slf4j:slf4j-api:jar:1.7.2:compile
[INFO] \- org.opensaml:opensaml:jar:2.6.0:compile
[INFO] +- org.opensaml:openws:jar:1.5.0:compile
[INFO] | \- org.opensaml:xmltooling:jar:1.4.0:compile
[INFO] | +- org.bouncycastle:bcprov-jdk15:jar:1.46:compile
[INFO] | +- ca.juliusdavies:not-yet-commons-ssl:jar:0.3.9:compile
[INFO] | \- org.apache.santuario:xmlsec:jar:1.5.4:compile
[INFO] +- org.owasp.esapi:esapi:jar:2.0.1:compile
[INFO] +- org.apache.xerces:serializer:jar:2.10.0:runtime
[INFO] +- xml-resolver:xml-resolver:jar:1.2:runtime
[INFO] \- org.slf4j:log4j-over-slf4j:jar:1.7.5:compile
[INFO] -----------------------------------------------------
Have you figured this out? Google the error and you'll realize that you have duplicate dependencies which is causing this.
I'll take a stab at what Grumpy Cat isn't saying - it's an OSGI dependency injection error where 'you' are loading different versions of the same package and asking java to cast your class from one package to the other...but with OSGI each jar is handled by it's own classloaded and the exact same jar (same version, byte code, etc) loaded by two different classloaders will never be equal - so you get a class cast exception.
@Timothy- am I close at all here?
@Francisco- the first link searching for the error -
refs another link the poster used to fix his own problem, quoting:
I answer my own question:
Below link inspired me of fixing this issue:
Dealing with "Xerces hell" in Java/Maven?
Basiclly I have removed all the dependencies of xml-api and xmlParserAPIs in pom.xml. The problem is fixed. The root cause is my classpath should not include any javax libraries which cause the library conflict with Weblogic app server. Hope it helps.
The link there - 'dealing with xerces hell' - provides an excellent description that sounds like a fit for you. I'm leaving my initial comment even though I think it's technically incorrect just cuz.
-wc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.