[jboss-jira] [JBoss JIRA] (WFCORE-3950) Unclear exception when specifying non-archive file as resource-root
Tomas Hofman (JIRA)
issues at jboss.org
Tue Jul 3 04:36:00 EDT 2018
[ https://issues.jboss.org/browse/WFCORE-3950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomas Hofman updated WFCORE-3950:
---------------------------------
Summary: Unclear exception when specifying non-archive file as resource-root (was: ZipException occurs specifying resource at EAR root )
> Unclear exception when specifying non-archive file as resource-root
> -------------------------------------------------------------------
>
> Key: WFCORE-3950
> URL: https://issues.jboss.org/browse/WFCORE-3950
> Project: WildFly Core
> Issue Type: Bug
> Components: Modules, VFS
> Affects Versions: 6.0.0.Alpha2
> Reporter: Tomas Hofman
> Assignee: Tomas Hofman
> Priority: Minor
>
> 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:
> * https://access.redhat.com/discussions/671203
> * https://developer.jboss.org/thread/253050
> * https://blog.akquinet.de/2017/08/14/customizing-application-properties-with-jboss-eapwildfly/
> 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:
> {code}
> 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
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list