Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6964459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:55:38+00:00 2026-05-27T15:55:38+00:00

I get on my local machine the following exception when running the tests by

  • 0

I get on my local machine the following exception when running the tests by maven (mvn test).

ch.qos.logback.core.joran.event.SaxEventRecorder@195ed659 - Parser configuration error occured 
java.lang.ClassCastException: com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl cannot be cast to javax.xml.parsers.SAXParserFactory

After googling around I came across several pages which describe the main problem behind it (several SAXParserFactoryImpl in different classloaders).

-> http://www.xinotes.org/notes/note/702/

My question is, how can I figure out which library is also providing the SAXParserFactoryImpl, so that I can exclude it. I am using Maven, IntelliJ and JDK 1.6.0_23. The issue occurs on the command line as well as when running the tests from IntelliJ.

But the strange issue is, that on the build server this issue doesn’t occur.

Update 1

Just figured out when I run the first time mvn test after an mvn clean, the error doesn’t appear. But as soon as I run mvn test again (without clean, the exception occurs) (when I run it from IntelliJ).

When I run it on the cmd line, then several mvn test calls do work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:55:39+00:00Added an answer on May 27, 2026 at 3:55 pm

    I found the issue. It was related to PowerMockito who tried to load the SAXParserFactory. The reason why I haven’t figured that one out was because the stacktrace contained only twice PowerMockito, and this at the middle 🙂

    So If you figure out this problem in IntelliJ and you do use PowerMockito, annotate your test class with the following annotation:

    @PowerMockIgnore(["javax.management.*", "javax.xml.parsers.*",
             "com.sun.org.apache.xerces.internal.jaxp.*", "ch.qos.logback.*", "org.slf4j.*"])
    

    This has solved the problem in my case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can you get the FQDN of a local machine in C#?
The following simple method works well on my local machine but throws a NullPointerException
I just installed apache server on my local machine. I executed the following command
The following code works fine in Visual Studio Development enviroment on my local machine.
I using following code and it is successfully uploading files on my local machine.
Is there any way to get the local end point of a connected Silverlight
Does anyone know know how to programatically get the local date and time of
I'm looking for a good way to get the local application data folder for
If I include both gtest/gtest.h and boost/math/distributions/poisson.hpp I get /opt/local/include/boost/tr1/tuple.hpp:63: error: ‘tuple’ is already
I need to get the actual local network IP address of the computer (e.g.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.