You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Jian-zhi <Ji...@sybase.com> on 2008/03/27 08:29:20 UTC

Found ERROR - Error deploying CXF webservice for ejb CalculatorImpl when run web services sample.

When I run simple-webservice in openejb-examples-3.0-beta-2.zip file I found
the ERROR mesage as below.

...
INFO - OpenEJB ready.
OpenEJB ready.
  ** Starting Services **
  NAME                 IP              PORT
  httpejbd             127.0.0.1       4204
  ejbd                 127.0.0.1       4201
ERROR - Error deploying CXF webservice for ejb CalculatorImpl
java.lang.NoClassDefFoundError:
org/apache/ws/commons/schema/utils/NamespacePrefixList
        at
org.apache.openejb.server.cxf.ejb.EjbEndpoint.<init>(EjbEndpoint.java:52)
        at
org.apache.openejb.server.cxf.ejb.EjbWsContainer.createEndpoint(EjbWsContainer.java:35)
        at
org.apache.openejb.server.cxf.ejb.EjbWsContainer.createEndpoint(EjbWsContainer.java:25)
        at
org.apache.openejb.server.cxf.CxfWsContainer.start(CxfWsContainer.java:63)
        at
org.apache.openejb.server.cxf.CxfService.createEjbWsContainer(CxfService.java:51)
        at
org.apache.openejb.server.webservices.WsService.afterApplicationCreated(WsService.java:228)
        at
org.apache.openejb.server.webservices.WsService.start(WsService.java:167)
        at
org.apache.openejb.server.ServiceManager.start(ServiceManager.java:261)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.openejb.client.LocalInitialContextFactory.bootServerServices(LocalInitialContextFactory.java:85)
        at
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:64)
        at
org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:51)
        at
org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:40)
        at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at
org.superbiz.calculator.CalculatorTest.setUp(CalculatorTest.java:37)
        at junit.framework.TestCase.runBare(TestCase.java:128)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
        at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)
  cxf                  n/a             -1
  admin thread         127.0.0.1       4200
-------
Ready!
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.282 sec
<<< FAILURE!
Any comments for it is useful to me.

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


Re: Found ERROR - Error deploying CXF webservice for ejb CalculatorImpl when run web services sample.

Posted by David Blevins <da...@visi.com>.
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.
>
>


Re: Found ERROR - Error deploying CXF webservice for ejb CalculatorImpl when run web services sample.

Posted by Jian-zhi <Ji...@sybase.com>.
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?


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.


Re: Found ERROR - Error deploying CXF webservice for ejb CalculatorImpl when run web services sample.

Posted by David Blevins <da...@visi.com>.
On Mar 27, 2008, at 12:29 AM, Jian-zhi wrote:
>
> When I run simple-webservice in openejb-examples-3.0-beta-2.zip file  
> I found
> the ERROR mesage as below.
>
> ...
> INFO - OpenEJB ready.
> OpenEJB ready.
>  ** Starting Services **
>  NAME                 IP              PORT
>  httpejbd             127.0.0.1       4204
>  ejbd                 127.0.0.1       4201
> ERROR - Error deploying CXF webservice for ejb CalculatorImpl
> java.lang.NoClassDefFoundError:
> org/apache/ws/commons/schema/utils/NamespacePrefixList

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