wsit
  1. wsit
  2. WSIT-346

There seem to be problems with loading client config files from classpath in app client

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: 1.0
    • Component/s: policy
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Sun

    • Issuezilla Id:
      346

      Description

      I got email from Peter Liu who has been trying clients in app-client project
      with the exception below. I'll ask him to attach his project and mention exact
      configuration. I tried myself and I don't get the same with latest Glassfish and
      WSIT bits in appclient project.

      Feb 1, 2007 3:57:50 PM [com.sun.xml.ws.policy.jaxws.PolicyConfigParser] parseModel
      SEVERE: WSP001002: wsdl:import failed.
      java.util.zip.ZipException: The system cannot find the path specified
      java.util.zip.ZipFile.open(Native Method)
      java.util.zip.ZipFile.<init>(ZipFile.java:203)
      java.util.jar.JarFile.<init>(JarFile.java:132)
      java.util.jar.JarFile.<init>(JarFile.java:70)
      sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:56)
      sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:41)
      sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:63)
      sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:102)
      sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:124)
      java.net.URL.openStream(URL.java:1007)
      com.sun.xml.ws.policy.jaxws.PolicyConfigResolver.resolveEntity(PolicyConfigResolver.java:65)
      com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseImport(RuntimeWSDLParser.java:244)
      com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseImport(RuntimeWSDLParser.java:649)
      com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parseWSDL(RuntimeWSDLParser.java:302)
      com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:207)
      com.sun.xml.ws.api.model.wsdl.WSDLModel$WSDLParser.parse(WSDLModel.java:118)
      com.sun.xml.ws.policy.jaxws.PolicyConfigParser.parseModel(PolicyConfigParser.java:282)
      com.sun.xml.ws.policy.jaxws.PolicyConfigParser.parseModel(PolicyConfigParser.java:239)
      com.sun.xml.ws.policy.jaxws.PolicyConfigParser.parse(PolicyConfigParser.java:91)
      com.sun.xml.ws.policy.jaxws.PolicyWSDLParserExtension.postFinished(PolicyWSDLParserExtension.java:1155)
      com.sun.xml.ws.wsdl.parser.DelegatingParserExtension.postFinished(DelegatingParserExtension.java:182)
      com.sun.xml.ws.wsdl.parser.WSDLParserExtensionFacade.postFinished(WSDLParserExtensionFacade.java:320)
      com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:196)
      com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:222)
      com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:184)
      com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:159)
      com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:82)
      javax.xml.ws.Service.<init>(Service.java:56)
      x.HelloServiceService.<init>(HelloServiceService.java:37)
      sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      com.sun.enterprise.naming.NamingManagerImpl.initiateInstance(NamingManagerImpl.java:1025)
      com.sun.enterprise.naming.NamingManagerImpl.getClientServiceObject(NamingManagerImpl.java:1068)
      com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:930)
      com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:160)
      com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:313)
      javax.naming.InitialContext.lookup(InitialContext.java:351)
      com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:274)
      com.sun.enterprise.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:193)
      com.sun.enterprise.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:131)
      com.sun.enterprise.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:123)
      com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:335)
      com.sun.enterprise.appclient.Main.main(Main.java:185)

        Activity

        Hide
        japod added a comment -

        As agreed with snajper via phone, waiting for testcase to start working on the
        issue...

        It seems [com.sun.xml.ws.policy.jaxws.PolicyConfigResolver] has a problem to get
        imported wsdl from given jar file.

        Show
        japod added a comment - As agreed with snajper via phone, waiting for testcase to start working on the issue... It seems [com.sun.xml.ws.policy.jaxws.PolicyConfigResolver] has a problem to get imported wsdl from given jar file.
        Hide
        ritzmann added a comment -

        In particular, we need to know the exact version of WSIT and how the clients are
        deployed (e.g. inside servlet). And we need all the WSIT client configuration
        files. It should also be verified if all client config files are indeed
        contained in the JAR and whether they are in the correct location. Judging by
        the log, it might just be a simple configuration issue.

        A side remark for us internally, we need to fix that log message. It should
        contain the name of the file that it was trying to import.

        Show
        ritzmann added a comment - In particular, we need to know the exact version of WSIT and how the clients are deployed (e.g. inside servlet). And we need all the WSIT client configuration files. It should also be verified if all client config files are indeed contained in the JAR and whether they are in the correct location. Judging by the log, it might just be a simple configuration issue. A side remark for us internally, we need to fix that log message. It should contain the name of the file that it was trying to import.
        Hide
        snajper added a comment -

        I'm downgrading to P3 for now, because it's appclient and we are not able to
        reproduce.

        Show
        snajper added a comment - I'm downgrading to P3 for now, because it's appclient and we are not able to reproduce.
        Hide
        petertcliu added a comment -

        Created an attachment (id=209)
        Zip file containing client and server netbeans projects

        Show
        petertcliu added a comment - Created an attachment (id=209) Zip file containing client and server netbeans projects
        Hide
        japod added a comment -

        Peter,

        Thanks for the project files!

        However, I am not able to reproduce your issue. I have tried with:

        1) glassfish v2 b34 (integrated WSIT)
        2) glassfish v2 b33 (integrated WSIT)
        3) glassfish v2 b33 + standalone WSIT

        platform Solaris x86, java version "1.5.0_10"

        After running the client I did not see any exception in the server.log:

        init:
        deps-jar:
        wsimport-init:
        wsimport-client-check-HelloServiceService:
        wsimport-client-HelloServiceService:
        wsimport-client-generate:
        wsimport-client-compile:
        compile:
        dist:
        pre-run-deploy:
        Distributing
        /export/home/japod/issues/wsit/346/HelloAppClient_WSIT/dist/HelloAppClient_WSIT.jar
        to [localhost:4848_server]
        Start registering the project's server resources
        Finished registering server resources
        deployment started : 0%
        deployment finished : 100%
        Deploying application in domain completed successfully
        Trying to create reference for application in target server completed successfully
        Trying to start application in target server completed successfully
        Deployment of application HelloAppClient_WSIT completed successfully
        Target module started
        am-init:
        post-run-deploy:
        run-deploy:
        Copying 1 file to /export/home/japod/issues/wsit/346/HelloAppClient_WSIT/dist
        run-tool:
        Result = Hello World
        run-jar:
        run-display-browser:
        run:
        BUILD SUCCESSFUL (total time: 13 seconds)

        Show
        japod added a comment - Peter, Thanks for the project files! However, I am not able to reproduce your issue. I have tried with: 1) glassfish v2 b34 (integrated WSIT) 2) glassfish v2 b33 (integrated WSIT) 3) glassfish v2 b33 + standalone WSIT platform Solaris x86, java version "1.5.0_10" After running the client I did not see any exception in the server.log: init: deps-jar: wsimport-init: wsimport-client-check-HelloServiceService: wsimport-client-HelloServiceService: wsimport-client-generate: wsimport-client-compile: compile: dist: pre-run-deploy: Distributing /export/home/japod/issues/wsit/346/HelloAppClient_WSIT/dist/HelloAppClient_WSIT.jar to [localhost:4848_server] Start registering the project's server resources Finished registering server resources deployment started : 0% deployment finished : 100% Deploying application in domain completed successfully Trying to create reference for application in target server completed successfully Trying to start application in target server completed successfully Deployment of application HelloAppClient_WSIT completed successfully Target module started am-init: post-run-deploy: run-deploy: Copying 1 file to /export/home/japod/issues/wsit/346/HelloAppClient_WSIT/dist run-tool: Result = Hello World run-jar: run-display-browser: run: BUILD SUCCESSFUL (total time: 13 seconds)
        Hide
        petertcliu added a comment -

        This turns out to be an issue with spaces in the path name for the appclient
        project. The test NetBeans appclient project I submitted was originally created
        in the "Documents and Settings" directory on my Windows laptop. When I moved
        the project to a location without spaces in the path name, the problem went away.

        I am raising this issue back up to p1 because NetBeans, by default, puts all
        projects in the "Documents and Settings" directory on Windows platform and there
        is no restrictions on path names containing spaces, so it is highly likely for
        NetBeans users to hit this problem.

        Show
        petertcliu added a comment - This turns out to be an issue with spaces in the path name for the appclient project. The test NetBeans appclient project I submitted was originally created in the "Documents and Settings" directory on my Windows laptop. When I moved the project to a location without spaces in the path name, the problem went away. I am raising this issue back up to p1 because NetBeans, by default, puts all projects in the "Documents and Settings" directory on Windows platform and there is no restrictions on path names containing spaces, so it is highly likely for NetBeans users to hit this problem.
        Hide
        japod added a comment -

        Accepting the issue, it is reproducible on Solaris as well.

        Lowering the priority to P2 since there is a workaround.

        Show
        japod added a comment - Accepting the issue, it is reproducible on Solaris as well. Lowering the priority to P2 since there is a workaround.
        Hide
        japod added a comment -

        fixed in cvs

        Show
        japod added a comment - fixed in cvs
        Hide
        mmatula added a comment -

        This issue was fixed before we created 1.0 branch, so the fix is in 1.0 ->
        setting target milestone to say so.

        Show
        mmatula added a comment - This issue was fixed before we created 1.0 branch, so the fix is in 1.0 -> setting target milestone to say so.

          People

          • Assignee:
            Jakub Podlesak
            Reporter:
            snajper
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: