Generated war file cannot be read by Jboss 5.1.GA and Mucommander, commandline it unzips fine


(awouda) #1

My ear build generates amongst others a web module like this

deploy project(path: ':XPOSEWEB', configuration: 'archives')

One needs the ‘configuration’ part to generate a .war file, otherwise it defaults to .jar (found on the forum elsewhere).

However there is something with this war. I use muCommander a lot, it natively can browse through ears, wars, jars etc. However the war file builded by the ear plugin is not accesible. MuCommander says it cannot read the contents. (It does read perfectly the generated war file which is generated by the concerning subproject, but that one is not included in the ear…)

When I manually unzip this ‘corrupted’ war, it expands fine. However as muCommander cannot read it find and Jboss startup logs displays

ERROR [AbstractKernelController] Error installing to Real: name=vfszip:/Users/a.wouda/Development/jboss-5.1.0.GA-XPOSE/server/default/deploy/XPOSE-EAR-1.0.ear/ state=PreReal mode=Manual requiredState=Real
org.jboss.deployers.spi.DeploymentException: Failed to create web module
 at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:461)
 at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:97)
 at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
 at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
 at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
 at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
 at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
 at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
 at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
 at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
 at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
 at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
 at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
 at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
 at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
 at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
 at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
 at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
 at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
 at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
 at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
 at org.jboss.Main.boot(Main.java:221)
 at org.jboss.Main$1.run(Main.java:556)
 at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.IllegalArgumentException
 at java.util.zip.ZipInputStream.getUTF8String(ZipInputStream.java:317)
 at java.util.zip.ZipInputStream.getFileName(ZipInputStream.java:436)
 at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:255)
 at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:82)
 at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:130)
 at org.jboss.util.file.JarUtils.unjar(JarUtils.java:310)
 at org.jboss.virtual.plugins.copy.AbstractCopyMechanism.unjar(AbstractCopyMechanism.java:320)
 at org.jboss.virtual.plugins.copy.UnjarCopyMechanism.doCopy(UnjarCopyMechanism.java:52)
 at org.jboss.virtual.plugins.copy.AbstractCopyMechanism.copy(AbstractCopyMechanism.java:176)
 at org.jboss.virtual.plugins.copy.AbstractCopyMechanism.copy(AbstractCopyMechanism.java:135)
 at org.jboss.virtual.VFSUtils.copy(VFSUtils.java:871)
 at org.jboss.virtual.VFSUtils.unjar(VFSUtils.java:852)
 at org.jboss.web.deployers.AbstractWarDeployer.deploy(AbstractWarDeployer.java:360)
 ... 34 more

It seems that the war file itself it having issues, somewhere this illegalArgument slipped in.

Any ideas how I can fix this? Should there be a switch for UTF8 or something? I read that is a wrong manifest file with respect to the UTF8 encoding message but I cannot find it.

tia,

Alex


(awouda) #2

Solved.

It was an encoding issue. On OSX put

System.setProperty(“file.encoding”, “UTF-8”) in the root build.gradle and the generated war is readable.