geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Petersson <pe...@pmb.mine.nu>
Subject Simple Web Service with JAX-WS G v2.0 sample problem
Date Fri, 06 Jul 2007 21:36:25 GMT
Hi all

Looking at the JAX-WS sample example in the G v2.0 documentation at 
http://cwiki.apache.org/GMOxDOC20/simple-web-service-with-jax-ws.html 
seeing its simplicity i got interested in trying it out and get 
something to build from, unfortunately I run into multiple problems.  

Running "mvn -Dmaven.test.skip=true install" and deploying with the 
console deployer in G v2.0 M6 (and current SNAPSHOT build) I get the 
following error (see problem 1 below). Realizing the problem has to do 
with the manifest class path entries meant for the "test" client 
application and not necessary for the web service per see I commented 
out the manifest settings (see problem 2) and managed to deploy without 
errors.

Wanting to test the service out I uncommented the pom section again (see 
problem 2) and re-build to get a working test client jar.

Unfortunately when running " java -jar jaxws-calculator-1.0.jar 12 35" 
to test things out with the client I get the following error (see 
problem 3).

Am I doing something wrong here?
I would try to fix the example if I was more knowledgeable about JAX-WS 
but maybe some one else could step in and and fix it (If there are 
problem with it). If this example would work right out of the box it 
would be a great example but in my IMHO to make it even better I would 
suggest split the example build into to two maven build modules, one 
that creates the service war and one that builds the client jar.

If this is a real problem I should probably create a JIRA but I would 
like to get it confirmed first and maybe someone will come up with a 
simple solution making the JIRA unnecessary.

thanks
     Peter Petersson

Problem 1 (deploying the example):
Manifest class path entries must be a valid jar file (JAVAEE 5 Section 
8.2): 
jarFile=/usr/local/geronimo-tomcat6-jee5-2.0-SNAPSHOT/repository/org/apache/geronimo/samples/jws/Calculator/1.0/cxf-tools-common-2.0-incubator-RC-SNAPSHOT.jar,

path=cxf-tools-common-2.0-incubator-RC-SNAPSHOT.jar
org.apache.geronimo.common.DeploymentException: Manifest class path 
entries must be a valid jar file (JAVAEE 5 Section 8.2): 
jarFile=/usr/local/geronimo-tomcat6-jee5-2.0-SNAPSHOT/repository/org/apache/geronimo/samples/jws/Calculator/1.0/cxf-tools-common-2.0-incubator-RC-SNAPSHOT.jar,

path=cxf-tools-common-2.0-incubator-RC-SNAPSHOT.jar
    at 
org.apache.geronimo.deployment.DeploymentContext.getCompleteManifestClassPath(DeploymentContext.java:313)
    at 
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext(AbstractWebModuleBuilder.java:330)
    at 
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext(TomcatModuleBuilder.java:289)
    at 
org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder$$FastClassByCGLIB$$6f85ec2c.invoke(<generated>)
    at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:127)
    at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
    at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at 
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$bd02f8a9.initContext(<generated>)
    at 
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:159)
    at 
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder$$FastClassByCGLIB$$d0c31844.invoke(<generated>)
    at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:127)
    at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
    at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at 
org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$bd02f8a9.initContext(<generated>)
    at 
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:568)
    at 
org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
    at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:127)
    at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:830)
    at 
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
    at 
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
    at 
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
    at 
org.apache.geronimo.j2ee.deployment.CorbaGBeanNameSource$$EnhancerByCGLIB$$f43072be.buildConfiguration(<generated>)
    at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:302)
    at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:124)
    at 
org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
    at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53)
    at 
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
    at 
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:127)
    at 
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:865)
    at 
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
    at 
org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
    at 
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.util.zip.ZipException: No such file or directory
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:203)
    at java.util.jar.JarFile.<init>(JarFile.java:132)
    at java.util.jar.JarFile.<init>(JarFile.java:97)
    at 
org.apache.geronimo.deployment.DeploymentContext.getCompleteManifestClassPath(DeploymentContext.java:311)
    ... 42 more

Problem 2 (comenting out pom.xml section):
                    <!--   <manifest>
                           
<mainClass>org.apache.geronimo.samples.jws.client.CalculatorClient</mainClass>
                           <addClasspath>true</addClasspath>
                       </manifest> -->

Problem 3 (running the client):
......../calculator/target/jaxws-calculator-1.0/WEB-INF/lib$ java -jar 
jaxws-calculator-1.0.jar 12 35
2007-jul-06 22:20:17 
org.springframework.context.support.AbstractApplicationContext refresh
INFO: Refreshing org.apache.cxf.bus.spring.BusApplicationContext@aeffdf: 
display name [org.apache.cxf.bus.spring.BusApplicationContext@aeffdf]; 
startup date [Fri Jul 06 22:20:17 CEST 2007]; root of context hierarchy
2007-jul-06 22:20:17 org.apache.cxf.bus.spring.BusApplicationContext 
getConfigResources
INFO: Could not find the configuration file cxf.xml on the classpath.
2007-jul-06 22:20:17 
org.springframework.context.support.AbstractApplicationContext refresh
INFO: Bean factory for application context 
[org.apache.cxf.bus.spring.BusApplicationContext@aeffdf]: 
org.springframework.beans.factory.support.DefaultListableBeanFactory@a352a5
2007-jul-06 22:20:17 
org.springframework.beans.factory.support.DefaultListableBeanFactory 
preInstantiateSingletons
INFO: Pre-instantiating singletons in 
org.springframework.beans.factory.support.DefaultListableBeanFactory@a352a5: 
defining beans []; root of factory hierarchy
2007-jul-06 22:20:17 
org.springframework.context.support.AbstractApplicationContext refresh
INFO: Refreshing org.apache.cxf.bus.spring.BusApplicationContext@aeffdf: 
display name [org.apache.cxf.bus.spring.BusApplicationContext@aeffdf]; 
startup date [Fri Jul 06 22:20:17 CEST 2007]; root of context hierarchy
2007-jul-06 22:20:17 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry 
destroySingletons
INFO: Destroying singletons in 
org.springframework.beans.factory.support.DefaultListableBeanFactory@a352a5: 
defining beans []; root of factory hierarchy
2007-jul-06 22:20:17 org.apache.cxf.bus.spring.BusApplicationContext 
getConfigResources
INFO: Could not find the configuration file cxf.xml on the classpath.
2007-jul-06 22:20:17 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader 
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource 
[META-INF/cxf/cxf.xml]
2007-jul-06 22:20:17 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader 
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource 
[META-INF/cxf/cxf-extension-http.xml]
2007-jul-06 22:20:17 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader 
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource 
[META-INF/cxf/cxf-extension-soap.xml]
2007-jul-06 22:20:17 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader 
loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource 
[META-INF/cxf/cxf-extension-xml.xml]
2007-jul-06 22:20:17 
org.springframework.context.support.AbstractApplicationContext refresh
INFO: Bean factory for application context 
[org.apache.cxf.bus.spring.BusApplicationContext@aeffdf]: 
org.springframework.beans.factory.support.DefaultListableBeanFactory@139b78e
2007-jul-06 22:20:18 
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker 
postProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.Jsr250BeanPostProcessor' is not 
eligible for getting processed by all BeanPostProcessors (for example: 
not eligible for auto-proxying)
2007-jul-06 22:20:18 
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker 
postProcessAfterInitialization
INFO: Bean 'cxf' is not eligible for getting processed by all 
BeanPostProcessors (for example: not eligible for auto-proxying)
2007-jul-06 22:20:18 
org.springframework.context.support.AbstractApplicationContext$BeanPostProcessorChecker 
postProcessAfterInitialization
INFO: Bean 'org.apache.cxf.bus.spring.BusExtensionPostProcessor' is not 
eligible for getting processed by all BeanPostProcessors (for example: 
not eligible for auto-proxying)
2007-jul-06 22:20:18 
org.springframework.beans.factory.support.DefaultListableBeanFactory 
preInstantiateSingletons
INFO: Pre-instantiating singletons in 
org.springframework.beans.factory.support.DefaultListableBeanFactory@139b78e: 
defining beans 
[cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory];

root of factory hierarchy
Exception in thread "main" javax.xml.ws.WebServiceException: 
org.apache.cxf.service.factory.ServiceConstructionException: Failed to 
create service.
        at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:101)
        at 
org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:55)
        at javax.xml.ws.Service.<init>(Service.java:57)
        at javax.xml.ws.Service.create(Service.java:302)
        at 
org.apache.geronimo.samples.jws.client.CalculatorClient.add(CalculatorClient.java:41)
        at 
org.apache.geronimo.samples.jws.client.CalculatorClient.main(CalculatorClient.java:33)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: 
Failed to create service.
        at 
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:68)
        at 
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:74)
        at 
org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:107)
        at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:99)
        ... 5 more
Caused by: javax.wsdl.WSDLException: WSDLException: 
faultCode=PARSER_ERROR: Problem parsing 
'http://localhost:8080/jaxws-calculator-1.0/CalculatorService.wsdl'.: 
java.io.FileNotFoundException: 
http://localhost:8080/jaxws-calculator-1.0/CalculatorService.wsdl
        at com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
        at 
org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:177)
        at 
org.apache.cxf.wsdl11.WSDLManagerImpl.getDefinition(WSDLManagerImpl.java:123)
        at 
org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:66)
        ... 8 more
Caused by: java.io.FileNotFoundException: 
http://localhost:8080/jaxws-calculator-1.0/CalculatorService.wsdl
        at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
        at 
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:973)
        at 
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:184)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798)
        at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at 
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at 
com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
        at 
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
        ... 14 more




Mime
View raw message