On Mar 27, 2008, at 7:18 PM, Jian-zhi wrote:

Thank you for your answer.
But after I deleted all the maven(2.0.8) repository files the case still
threw the NoClassDefFoundError exception.
And I try to use maven2.0.5 to do this case it failed too.
Why can't XmlSchema be downloaded successfully?

Just gave it a try myself with a clean repo and encountered the same thing. Not sure I can explain why maven is doing what it's doing, but here's what I noticed.

It's able to find and download the cxf jar just fine: (a grep from my build output)

Downloading: 
http://people.apache.org/repo/m2-snapshot-repository//org/apache/cxf/cxf-bundle/2.0.4-incubator/cxf-bundle-2.0.4-incubator.jar
Downloading: 
http://people.apache.org/repo/m2-incubating-repository/org/apache/cxf/cxf-bundle/2.0.4-incubator/cxf-bundle-2.0.4-incubator.jar
2706K downloaded

But when it goes to download the pom file for cxf (which would be the file that would cause cxf's dependencies to get downloaded) it can't find it. Whatever smarts it has to pull our dependency on cxf-bundle from the m2-incubating-repository doesn't seem to work for finding the pom, just the jar. No idea why it does that.

Anyway, I sort of hacked around it by adding cxf-bundle-2.0.4- incubating to the m2-snapshot-repository.

Give the example another try and it should work.

-David


David Blevins wrote:


Seems like you've got some bad maven repo state.  Try deleting the
following directory and running it again.

   ~/.m2/repository/org/apache/ws/commons/schema

If that fixes the issue and you wind up with a similar error for a
different class, then definitely try deleting or moving your local
maven repo so maven will download everything again.  On rare occasion
Maven seems to get an incomplete/invalid jar and doesn't know it.

-David




--
View this message in context: 
http://www.nabble.com/Found-ERROR---Error-deploying-CXF-webservice-for-ejb-CalculatorImpl-when-run-web-services-sample.-tp16323312p16344444.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Reply via email to