glassfish
  1. glassfish
  2. GLASSFISH-18981

Deployment of an ear file fails if path to GlassFish directory includes spaces

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Windows 7 64-bit
      Java 6u33 x64

      Description

      In GlassFish 3.1.2.2, deploying an ear containing a war and EJB jar fails when reading META-INF/beans.xml in the EJB jar. This seems to be a regression of GLASSFISH-17242 which is also a regression of GLASSFISH-5806.

      From the log:

      java.net.URISyntaxException: Illegal character in path at index 16: file:/C:/Program Files/glassfish-3.1.2.2/glassfish/domains/domain1/applications/web-portal-ear/web-portal-ejb-1.0-SNAPSHOT_jar/META-INF/beans.xml
      	at java.net.URI$Parser.fail(URI.java:2810)
      	at java.net.URI$Parser.checkChars(URI.java:2983)
      	at java.net.URI$Parser.parseHierarchical(URI.java:3067)
      	at java.net.URI$Parser.parse(URI.java:3015)
      	at java.net.URI.<init>(URI.java:577)
      	at java.net.URL.toURI(URL.java:918)
      	at org.glassfish.weld.BeanDeploymentArchiveImpl.handleEntry(BeanDeploymentArchiveImpl.java:504)
      	at org.glassfish.weld.BeanDeploymentArchiveImpl.collectJarInfo(BeanDeploymentArchiveImpl.java:482)
      	at org.glassfish.weld.BeanDeploymentArchiveImpl.populate(BeanDeploymentArchiveImpl.java:422)
      	at org.glassfish.weld.BeanDeploymentArchiveImpl.<init>(BeanDeploymentArchiveImpl.java:148)
      	at org.glassfish.weld.BeanDeploymentArchiveImpl.<init>(BeanDeploymentArchiveImpl.java:128)
      	at org.glassfish.weld.DeploymentImpl.<init>(DeploymentImpl.java:121)
      	at org.glassfish.weld.WeldDeployer.load(WeldDeployer.java:386)
      	at org.glassfish.weld.WeldDeployer.load(WeldDeployer.java:100)
      	at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:186)
      	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:264)
      	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:460)
      	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
      	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
      	at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
      	at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
      	at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
      	at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      	at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
      	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
      	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
      	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
      	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
      	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
      	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      	at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      	at java.lang.Thread.run(Thread.java:662)
      

      A workaround is to install GlassFish to a path not containing spaces.

        Activity

        Hide
        steve_taylor added a comment -

        I could not select 3.1.2.2 as the affected version.

        Show
        steve_taylor added a comment - I could not select 3.1.2.2 as the affected version.
        Hide
        Hong Zhang added a comment -

        Seems CDI code needs to do similar as what was fixed in the other issue: encode the space in the path before converting a URL or a String to a URI. Assign to CDI team.

        Show
        Hong Zhang added a comment - Seems CDI code needs to do similar as what was fixed in the other issue: encode the space in the path before converting a URL or a String to a URI. Assign to CDI team.
        Hide
        jjsnyder83 added a comment -

        The conversion to URI's was not necessary so I removed it.

        Show
        jjsnyder83 added a comment - The conversion to URI's was not necessary so I removed it.
        Hide
        jjsnyder83 added a comment -

        Added a findbugs error fix.

        Show
        jjsnyder83 added a comment - Added a findbugs error fix.

          People

          • Assignee:
            jjsnyder83
            Reporter:
            steve_taylor
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: