[shrinkwrap-issues] [JBoss JIRA] (SHRINKRES-259) Shrinkwrap resolver generates invalid Zips

Matous Jobanek (JIRA) issues at jboss.org
Wed Jan 4 10:28:00 EST 2017


     [ https://issues.jboss.org/browse/SHRINKRES-259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matous Jobanek reassigned SHRINKRES-259:
----------------------------------------

    Assignee: Florian Besser


> Shrinkwrap resolver generates invalid Zips
> ------------------------------------------
>
>                 Key: SHRINKRES-259
>                 URL: https://issues.jboss.org/browse/SHRINKRES-259
>             Project: ShrinkWrap Resolvers
>          Issue Type: Bug
>    Affects Versions: 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4
>            Reporter: Florian Besser
>            Assignee: Florian Besser
>             Fix For: 3.0.0-alpha-3, 2.2.5
>
>
> Affects shrinkwrap-resolver-impl-maven:2.2.0 up to shrinkwrap-resolver-impl-maven:2.2.4
> The class MavenResolvedArtifactImpl.java generates a zip File using the function packageDirectories.
> zipFiles generated by this method contain 1 zipfile entry per file (this is good) *but also 1 entry per _directory_*. This means that wildfly will throw a FileNotFoundException like the following:
> {code:java}
> 14:17:41,203 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."rdp-pricedata-testing.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."X-Y-Z.ear".STRUCTURE: WFLYSRV0153: Failed to process phase STRUCTURE of deployment "X-Y-Z.ear"
> ...
> Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: WFLYEE0054: Failed to process children for EAR ["/C:/Daten/tools/wildfly-10.1.0.Final/bin/content/X-Y-Z.ear"]
> ...
> Caused by: java.io.FileNotFoundException: C:\Daten\tools\wildfly-10.1.0.Final\standalone\tmp\vfs\deployment\deployment8c1b4b7ccf088d0f\X-Y-other.war-1968e3b71e5fa852\com\sixgroup (The system cannot find the path specified)
> 	at java.io.FileOutputStream.open0(Native Method)
> 	at java.io.FileOutputStream.open(FileOutputStream.java:270)
> 	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
> 	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
> 	at org.jboss.vfs.VFSUtils.unzip(VFSUtils.java:899)
> 	at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:504)
> 	at org.jboss.vfs.VFS.mountZipExpanded(VFS.java:533)
> 	at org.jboss.as.ee.structure.EarStructureProcessor.mount(EarStructureProcessor.java:252)
> 	at org.jboss.as.ee.structure.EarStructureProcessor.createResourceRoot(EarStructureProcessor.java:271)
> 	at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:202)
> 	... 6 more
> {code}
> I'd suggest amending the code:
> {code:java}
> if (fileEntry.isDirectory()) {
>     zipFile.putNextEntry(new ZipEntry(entry));
> }
> {code}
> to:
> {code:java}
> if (fileEntry.isDirectory()) {
>     continue;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the shrinkwrap-issues mailing list