Topic
  • 6 replies
  • Latest Post - ‏2012-02-05T02:47:56Z by Ivan.Xu
SystemAdmin
SystemAdmin
2233 Posts

Pinned topic Problem publishing a web service from Eclipse Indigo to WASCE 3.0

‏2012-01-30T23:20:26Z |
Hi,
I am trying to follow a simple JAX-WS web service example from the WASCE 2.1 user guide

My environment - Windows 7 professional (x64), Eclipse Indigo, WASCE v3.0 with eclipse adapter

I am able to start/stop the WASCE server from eclipse and debug/run simple jsp pages and servlets. However, if include 2 java files (SEI interface and the annotated service implementation file) I get the following error when run as -> run on server.

Thanks in advance for your help

Publishing on IBM WASCE v3.0 has encountered a problem.

WSDL generation failed
org.apache.geronimo.common.DeploymentException: WSDL generation failed
at org.apache.geronimo.jaxws.sun.tools.WsdlGenerator.generateWsdl(WsdlGenerator.java:176)
at org.apache.geronimo.jaxws.sun.tools.SunWsdlGenerator.generateWsdl(SunWsdlGenerator.java:34)
at org.apache.geronimo.axis2.builder.Axis2Builder.initialize(Axis2Builder.java:153)
at org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.configurePOJO(JAXWSServiceBuilder.java:321)
at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:637)
at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:174)
at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:763)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

In the console window, I see that the WASCE server started fine (I verified by checking the administrator console).
However, there was an exceptions as shown below:

012-01-30 15:06:48,949 WARN JAXWSTools Missing C:\Program Files\Java\lib. This may be required for wsgen to run.
Process output: {}java.lang.NoClassDefFoundError: Files\IBM\WebSphere\AppServerCommunityEdition\repository\org\apache\geronimo\specs\geronimo-jaxws_2/2_spec\1/1;C:\Program
Caused by: java.lang.ClassNotFoundException: Files\IBM\WebSphere\AppServerCommunityEdition\repository\org\apache\geronimo\specs\geronimo-jaxws_2.2_spec\1.1;C:\Program
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Files\IBM\WebSphere\AppServerCommunityEdition\repository\org\apache\geronimo\specs\geronimo-jaxws_2.2_spec\1.1;C:\Program. Program will exit.
Exception in thread "main"
Updated on 2012-02-05T02:47:56Z at 2012-02-05T02:47:56Z by Ivan.Xu
  • Ivan.Xu
    Ivan.Xu
    14 Posts

    Re: Problem publishing a web service from Eclipse Indigo to WASCE 3.0

    ‏2012-01-31T15:02:40Z  
    WSDL generation requires JDK installed, could you double check this ?
  • SystemAdmin
    SystemAdmin
    2233 Posts

    Re: Problem publishing a web service from Eclipse Indigo to WASCE 3.0

    ‏2012-01-31T17:10:52Z  
    • Ivan.Xu
    • ‏2012-01-31T15:02:40Z
    WSDL generation requires JDK installed, could you double check this ?
    Thanks Ivan for your response.

    Yes I double checked to confirm that JDK (1.6.0_30) has been installed. Maybe I am missing the configuration in eclipse/wasce to point to this JDK. If so, how do i set this up?

    My file structure is:
    C:\Program Files\Java
    (jdk1.6.0_31 folder)
    (jre6 folder)

    Few observations about the error message -

    java.lang.NoClassDefFoundError: Files\IBM\WebSphere\AppServerCommunityEdition\repository\org\apache\geronimo\specs\geronimo-jaxws_2/2_spec\1/1;

    The path should be more like C:\Program Files\IBM\WebSphere....

    Also, there is a warning - WARN JAXWSTools Missing C:\Program Files\Java\lib. This may be required for wsgen to run.

    However, the lib folder mentioned in this path "C:\Program Files\Java\lib" does not exist on my machine
  • adisarun
    adisarun
    1 Post

    Re: Problem publishing a web service from Eclipse Indigo to WASCE 3.0

    ‏2012-01-31T17:31:26Z  
    Thanks Ivan for your response.

    Yes I double checked to confirm that JDK (1.6.0_30) has been installed. Maybe I am missing the configuration in eclipse/wasce to point to this JDK. If so, how do i set this up?

    My file structure is:
    C:\Program Files\Java
    (jdk1.6.0_31 folder)
    (jre6 folder)

    Few observations about the error message -

    java.lang.NoClassDefFoundError: Files\IBM\WebSphere\AppServerCommunityEdition\repository\org\apache\geronimo\specs\geronimo-jaxws_2/2_spec\1/1;

    The path should be more like C:\Program Files\IBM\WebSphere....

    Also, there is a warning - WARN JAXWSTools Missing C:\Program Files\Java\lib. This may be required for wsgen to run.

    However, the lib folder mentioned in this path "C:\Program Files\Java\lib" does not exist on my machine
    Thushar,

    I do have almost the same issue with Eclipse Indigo. I have the JDK installed on the same path along with jre exactly as you mentioned.

    I use Apache geronimo server instead. "Developing a JAX-WS POJO Web Service" following the tutorial from https://cwiki.apache.org/GMOxDOC21/developing-a-jax-ws-pojo-web-service.html throws the following error on deployment. The geronimo server starts fine but could not deploy the service.

    Geronimo Application Server started
    2012-01-31 22:58:54,312 WARN JAXWSTools Missing C:\Program Files\Java\lib. This may be required for wsgen to run.
    Process output: {}java.lang.NoClassDefFoundError: Adiththan\geronimo-tomcat7-javaee6-3/0-beta-1\repository\org\apache\geronimo\specs\geronimo-jaxws_2/2_spec\1/1;E:\Arun
    Caused by: java.lang.ClassNotFoundException: Adiththan\geronimo-tomcat7-javaee6-3.0-beta-1\repository\org\apache\geronimo\specs\geronimo-jaxws_2.2_spec\1.1;E:\Arun
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: Adiththan\geronimo-tomcat7-javaee6-3.0-beta-1\repository\org\apache\geronimo\specs\geronimo-jaxws_2.2_spec\1.1;E:\Arun. Program will exit.
    Exception in thread "main"

    WSDL generation failed
    org.apache.geronimo.common.DeploymentException: WSDL generation failed
    at org.apache.geronimo.jaxws.sun.tools.WsdlGenerator.generateWsdl(WsdlGenerator.java:176)
    at org.apache.geronimo.jaxws.sun.tools.SunWsdlGenerator.generateWsdl(SunWsdlGenerator.java:34)
    at org.apache.geronimo.axis2.builder.Axis2Builder.initialize(Axis2Builder.java:153)
    at org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.configurePOJO(JAXWSServiceBuilder.java:321)
    at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(TomcatModuleBuilder.java:637)
    at org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:174)
    at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:763)
    at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
    at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
    at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
    at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:344)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
    at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
    at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
    at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
    at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    I have checked the "geronimo-tomcat7-javaee6-3/0-beta-1\repository\org\apache\geronimo\specs\geronimo-jaxws_2/2_spec\" directory and found a jaxws jar with version 2.1. Is the difference in the version of jaxws jar (2.1) and geronimo server (3.0) introduces such problem and preventing the service from getting deployed.

    Please help me in fixing the problem, if you get any solutions.

    Regards,
    Arun
  • Ivan.Xu
    Ivan.Xu
    14 Posts

    Re: Problem publishing a web service from Eclipse Indigo to WASCE 3.0

    ‏2012-02-01T13:33:06Z  
    Hmm, before starting the server, make sure JAVA_HOME is configured to point to your JDK location. And in the var/log/server.log file, there should be a link like :
    2011-11-15 16:09:04,650 INFO BasicServerInfo System property http://java.home = D:\SUNJDK6_24\jre
    While generation the WSDL file, it will try to locate the tools.jar file with the location D:\SUNJDK6_24\lib\tools.jar.
  • SystemAdmin
    SystemAdmin
    2233 Posts

    Re: Problem publishing a web service from Eclipse Indigo to WASCE 3.0

    ‏2012-02-02T19:34:33Z  
    • Ivan.Xu
    • ‏2012-02-01T13:33:06Z
    Hmm, before starting the server, make sure JAVA_HOME is configured to point to your JDK location. And in the var/log/server.log file, there should be a link like :
    2011-11-15 16:09:04,650 INFO BasicServerInfo System property http://java.home = D:\SUNJDK6_24\jre
    While generation the WSDL file, it will try to locate the tools.jar file with the location D:\SUNJDK6_24\lib\tools.jar.
    Thanks Ivan for your reply

    I looked into the server.log as you suggested and i see that the java home is not pointing to the JDK as required. My log shows the following:

    2012-01-27 12:04:17,493 INFO BasicServerInfo System property http://java.vm.info = mixed mode
    2012-01-27 12:04:17,493 INFO BasicServerInfo System property http://java.home = C:\Program Files\Java\jre6

    I checked into my enivronment variables on my windows 7 (64 bit) machine and JAVA_HOME is not defined. Do I need to add this environment var?

    How do you make sure that JAVA_HOME is configured to point to the correct JDK location.

    I appreciate your help

    Thanks
  • Ivan.Xu
    Ivan.Xu
    14 Posts

    Re: Problem publishing a web service from Eclipse Indigo to WASCE 3.0

    ‏2012-02-05T02:47:56Z  
    Configure it in the OS environment is one option, you could also set it before starting the server. For windows, use set command.