Maven Integration for Eclipse

org.apache.xerces.jaxp.SAXParserFactoryImpl not found error with projects using jaxb2-maven-plugin?

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 0.9.4
  • Fix Version/s: None
  • Component/s: Project Configuration
  • Labels:
    None
  • Environment:
    Windows XP (32-bit) and Vista 64-bit
    Eclipse 3.3 and 3.4
  • Number of attachments :
    3

Description

Importing projects that uses jaxb2-maven-plugin causes error:
An internal error occurred during: "Building workspace".
Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found

However if I do the same on the command line it works fine!

It also seems that this behaviour breaks the project since Eclipse will then remove the target/generated-classes from the classpath.

I have attached my full environment from Eclipse in a text file and also a sample POM file of one of the projects with this problem.

  1. Environment.txt
    04/Jul/08 3:45 PM
    438 kB
    Kent Narling
  2. pom.xml
    04/Jul/08 7:02 PM
    2 kB
    Eugene Kuleshov
  3. pom.xml
    04/Jul/08 3:45 PM
    5 kB
    Kent Narling

Activity

Hide
Eugene Kuleshov added a comment -

I've reproduced that error. It seems like embedded maven used when updating source folders have different classloader structure and it does not see xerces required by jaxb. That won't be an easy to fix, however there is a workaround that you can use.

See attached pom.xml which declares required depndencies, including xerces, as jaxb plugin dependencies. With this it works for in the ide and in the command line.

Show
Eugene Kuleshov added a comment - I've reproduced that error. It seems like embedded maven used when updating source folders have different classloader structure and it does not see xerces required by jaxb. That won't be an easy to fix, however there is a workaround that you can use. See attached pom.xml which declares required depndencies, including xerces, as jaxb plugin dependencies. With this it works for in the ide and in the command line.
Hide
Kent Narling added a comment -

Thanks a lot Eugene, this workaround seems to work fine!

You said you reproduced it, do you still need me to check in a sample still?

Show
Kent Narling added a comment - Thanks a lot Eugene, this workaround seems to work fine! You said you reproduced it, do you still need me to check in a sample still?

People

Vote (5)
Watch (4)

Dates

  • Created:
    Updated: