Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-3950

Unclear exception when specifying non-archive file as resource-root

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 6.0.0.Alpha5
    • 6.0.0.Alpha2
    • Modules, VFS
    • None

      Based on the knowledge of several resources, I am aware EAP 7 does not allow resource files at the EAR's root to enter the classpath:

      Nevertheless I tried it anyhow! I placed a Java Properties file in my EAR's root, and added jboss-deployment-structure.xml to specify the Java Properties file as a <resource>. Upon deploying this exception was given:

      ERROR (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."test.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."test.ear".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "test.ear"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:172)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYSRV0168: Error loading jboss-deployment-structure.xml from C:\eap-7.1\standalone\tmp\vfs\temp\temp4dfe4a42c99e5d22\content-7091913dc2c38e24\contents\META-INF\jboss-deployment-structure.xml
        at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:338)
        at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:310)
        at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.deploy(DeploymentStructureDescriptorParser.java:160)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
        ... 5 more
      Caused by: javax.xml.stream.XMLStreamException: java.util.zip.ZipException: error in opening zip file
        at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.parseResourceRoot(JBossDeploymentStructureParser12.java:770)
        at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.parseResources(JBossDeploymentStructureParser12.java:700)
        at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.parseModuleStructureSpec(JBossDeploymentStructureParser12.java:347)
        at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.parseDeployment(JBossDeploymentStructureParser12.java:263)
        at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.readElement(JBossDeploymentStructureParser12.java:240)
        at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.readElement(JBossDeploymentStructureParser12.java:69)
        at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:122)
        at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:76)
        at org.jboss.as.server.deployment.module.descriptor.DeploymentStructureDescriptorParser.parse(DeploymentStructureDescriptorParser.java:332)
        ... 8 more
      Caused by: java.util.zip.ZipException: error in opening zip file
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:225)
        at java.util.zip.ZipFile.<init>(ZipFile.java:155)
        at java.util.jar.JarFile.<init>(JarFile.java:166)
        at java.util.jar.JarFile.<init>(JarFile.java:130)
        at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:90)
        at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:77)
        at org.jboss.vfs.VFS.mountZip(VFS.java:386)
        at org.jboss.vfs.VFS.mountZip(VFS.java:410)
        at org.jboss.as.server.deployment.module.descriptor.JBossDeploymentStructureParser12.parseResourceRoot(JBossDeploymentStructureParser12.java:760)
        ... 16 more
      

      Moving the Java Properties file to a readable location (like META-INF) resolved the exception. However, I am pretty sure "error in opening zip file" isn't the right problem to report back to the user.

              thofman Tomas Hofman
              thofman Tomas Hofman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: