Issue Details (XML | Word | Printable)

Key: MNGECLIPSE-716
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Kent Narling
Votes: 5
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Maven Integration for Eclipse

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

Created: 04/Jul/08 03:45 PM   Updated: 05/Jul/08 02:40 AM
Return to search
Component/s: Project Configuration
Affects Version/s: 0.9.4
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File Environment.txt (438 kB)
2. XML File pom.xml (2 kB)
3. XML File pom.xml (5 kB)

Environment:
Windows XP (32-bit) and Vista 64-bit
Eclipse 3.3 and 3.4


 Description  « Hide

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.



Eugene Kuleshov made changes - 04/Jul/08 06:32 PM
Field Original Value New Value
Description When I check out a project using the jaxb2-maven-plugin, I get the 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!
So it seems to have something to do with the m2 plugin...

I have tried with 0.9.5 + Eclipse 3.3 and 0.9.6 + Eclipse 3.4 both with the same issue and also tried using both the embedded and an external maven (2.0.9) all with the same result.

It also seems that this behaviour breaks the project since Eclipse will then remove the target/generated-classes from the classpath.
The workaround right now is to :
1 - Check out and ignore this error (the project now has errors and is in a bad state)
2 - Manually to "Run as"->"Maven generate sources"
3 - Sync with SVN and do "Update and override" on the .classpath file to get back the stuff Eclipse broke
4 - Refresh the project

All this is naturally painful and not very practical... :-(
Again I can re-iterate that this works perfectly in maven (outside eclipse) and the build server (continuum) builds this example project all the time without errors.

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.
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.
Affects Version/s 0.9.6 [ 14333 ]
Affects Version/s 0.9.5 [ 14196 ]
Affects Version/s 0.9.4 [ 14195 ]
Component/s Project Configuration [ 13343 ]
Eugene Kuleshov added a comment - 04/Jul/08 07:02 PM

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.


Eugene Kuleshov made changes - 04/Jul/08 07:02 PM
Attachment pom.xml [ 35610 ]
Eugene Kuleshov made changes - 04/Jul/08 07:03 PM
Comment [ Thanks Kent. So, you imported project to eclipse using "Import Maven projects" wizard and got "Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found" in jaxb2-maven-plugin? ]
Kent Narling added a comment - 05/Jul/08 02:40 AM

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?


Jason van Zyl made changes - 31/Dec/08 08:55 AM
Workflow Maven New [ 91269 ] jira [ 100515 ]