1 Reply Latest reply: Dec 28, 2010 3:51 AM by gimbal2 RSS

    Problems running the JEE 6 helloservice

    793952
      Hello everyone,

      I am trying to run the helloservice app and web. The main problem is my port
      number is different from the specified port number - 8080. So I have edited the files
      to correct this. I get the following error /warning with the appclient -

      Copying 1 file to C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\jaxws\appclient\dist\appclientClient
      22-Dec-2010 16:28:42 com.sun.enterprise.transaction.JavaEETransactionManagerSimplified initDelegates
      INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
      22-Dec-2010 16:28:43 com.sun.enterprise.deployment.util.ModuleContentValidator accept
      WARNING: wsdl file META-INF/wsdl/localhost_2020/helloservice/HelloService.wsdl does not exist for service-ref appclient.HelloAppClient/service
      Hello, world.

      But it seems to be running

      However, I can't seem to run the webclient at all -

      WARNING: StandardWrapperValve[HelloServlet]: PWC1382: Allocate exception for servlet HelloServlet
      com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class webclient.HelloServlet
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:312)
      at com.sun.enterprise.web.WebContainer.createServletInstance(WebContainer.java:709)
      at com.sun.enterprise.web.WebModule.createServletInstance(WebModule.java:1937)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1252)
      at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1059)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:187)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
      at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
      at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
      at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Env-Prop: webclient.HelloServlet/service@Field-Injectable Resource. Class name = webclient.HelloServlet Field name=service@javax.jws.WebServiceRef@@@ into class webclient.HelloServlet
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:614)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:384)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:141)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:127)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:306)
      ... 27 more
      Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/webclient.HelloServlet/service' in SerialContext [Root exception is javax.naming.NamingException [Root exception is java.lang.reflect.InvocationTargetException]]
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:513)
      ... 31 more
      Caused by: javax.naming.NamingException [Root exception is java.lang.reflect.InvocationTargetException]
      at org.glassfish.webservices.WebServiceReferenceManagerImpl.resolveWSReference(WebServiceReferenceManagerImpl.java:272)
      at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$WebServiceRefProxy.create(ComponentEnvManagerImpl.java:979)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:688)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:657)
      at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:148)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:428)
      ... 33 more
      Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.glassfish.webservices.WebServiceReferenceManagerImpl.initiateInstance(WebServiceReferenceManagerImpl.java:320)
      at org.glassfish.webservices.WebServiceReferenceManagerImpl.resolveWSReference(WebServiceReferenceManagerImpl.java:145)
      ... 38 more
      Caused by: javax.xml.ws.WebServiceException: Failed to access the WSDL at: file:/C:/glassfishv3/glassfish/docs/javaee-tutorial/examples/jaxws/webclient/build/web/WEB-INF/wsdl/localhost_2020/helloservice/HelloService.wsdl. It failed with:
      C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\jaxws\webclient\build\web\WEB-INF\wsdl\localhost_2020\helloservice\HelloService.wsdl (The system cannot find the path specified).
      at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.tryWithMex(RuntimeWSDLParser.java:184)
      at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:166)
      at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:131)
      at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:271)
      at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:234)
      at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:182)
      at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:106)
      at javax.xml.ws.Service.<init>(Service.java:57)
      at helloservice.endpoint.HelloService.<init>(HelloService.java:58)
      ... 44 more
      Caused by: java.io.FileNotFoundException: C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\jaxws\webclient\build\web\WEB-INF\wsdl\localhost_2020\helloservice\HelloService.wsdl (The system cannot find the path specified)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:106)
      at java.io.FileInputStream.<init>(FileInputStream.java:66)
      at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
      at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
      at java.net.URL.openStream(URL.java:1010)
      at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:837)
      at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:294)
      at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:151)
      ... 51 more

      Any ideas?

      Thanks

      eve
        • 1. Re: Problems running the JEE 6 helloservice
          gimbal2
          Java 101: when you get a stacktrace, actually read it and try to understand what is going on. The root cause (the one at the bottom of the stacktrace) is usually the real problem, so lets pick that one out:
          Caused by: java.io.FileNotFoundException: C:\glassfishv3\glassfish\docs\javaee-tutorial\examples\jaxws\webclient\build\web\WEB-INF\wsdl\localhost_2020\helloservice\HelloService.wsdl (The system cannot find the path specified)
          Java doesn't lie to you. This file really does not exist and because it does not exist the client apparently cannot function.

          Don't ask me why the file cannot be found - I don't have access to your system, your IDE or your settings so I cannot know what you did or did not do. Its probably going to take some head banging and a few cups of coffee but above all logical and intelligent reasoning to figure it out. Good luck!