Getting ClassNotFoundException or ClassCastException Error

Eswaran R June 30, 2015

Hi all,

My problem is same with below URL. 

Atlas-Link

If any one know the answer please help me. This issue kills me for last one week. 

 

Thanks in advance

Esh

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2015

Hi Eswaran,

Please try to remove <scope>provided</scope>.I do not think xml-apis is in JIRA sources.

Eswaran R June 30, 2015

Hi Volodymyr, Thanks for your response. If i remove the <scope>provided</scope> I received the following error in log.. Caused by: java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source) at org.apache.axiom.locator.ImplementationFactory.parseDescriptor(ImplementationFactory.java:77) at org.apache.axiom.locator.DefaultOMMetaFactoryLocator.<init>(DefaultOMMetaFactoryLocator.java:66) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.apache.axiom.om.OMAbstractFactory.<clinit>(OMAbstractFactory.java:95) ... 231 more Please help me.. Thanks Esh

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2015
Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2015

You could need to add exclusions to some dependencies. See the first Joseph's answwer: https://answers.atlassian.com/questions/104121/im-blocked-help-cannot-be-cast-to-javax.xml.parsers.saxparserfactory

Eswaran R June 30, 2015

Hi Volodymyr, No luck... If i include the xml-apis:jar am getting above stack trace. If i exclude the xml-apis:jar am getting following stack trace. Caused by: java.lang.ClassNotFoundException: org.w3c.dom.Node at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772) at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690) at java.lang.ClassLoader.loadClass(Unknown Source) ... 240 more any help? Thanks Esh

Volodymyr Krupach
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2015

You do not need to exclude xml-apis dependency. you need to resolve the conflict for the DocumentBuilderFactory by adding <exclusions> <exclusion> to a dependency where you get the conflict.

Eswaran R July 1, 2015

Hi Volodymyr, My problem is clearly explained here. https://answers.atlassian.com/questions/126159/axis2-ws-client-in-jira-plugin-to-consume-webservice-maven-dependency-problems Jira Plugin is working before I integrate Jira Plugin with Axis2. After adding Axis2 stubs, it stopped working and throws same error in the above link. It seems Jira not able to call external webservice through Axis2, Is it true? Do you know any other technology to call external webservice when I edit a Issue in JIRA? Thanks Esh

TAGS
AUG Leaders

Atlassian Community Events