]
Martin Both commented on JBVFS-202:
-----------------------------------
I've found the main bug in class VirtualJarFileInputStream.
The method "private byte get()" returns sometimes a legal 0xFF value
which is read in method "public int read()".
But the conversion of the byte value 0xFF in an int value results in -1.
The value -1 results in a next state and cuts the current state abruptly.
You have to change the get method to
private int get() {
return buffer[bufferPosition++] & 0xFF;
}
Now the Zip file has still invalid(!) crc check sums but it will be read without
ZipExceptions.
So there are more bugs in this part of JBoss but I do not care at this point.
You see the old class VirtualJarFileInputStream is very untestet and buggy.
My answer how to readjust the bugs is: Simple use the class and you will see it
does'nt work.
Now the deployment of my project with embedded EJBContainer is one step further but
still it does not work. Maybe another bug in JBoss? I think so.
Caused by: java.lang.NullPointerException
at
org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.createDDEndpoint(MetadataBuilder.java:213)
at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.build(MetadataBuilder.java:83)
at
org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.generateMetadataFromDeployment(DescriptorDeploymentAspect.java:135)
at
org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.start(DescriptorDeploymentAspect.java:68)
Invalid Local file header in ZIP file
-------------------------------------
Key: JBVFS-202
URL:
https://issues.jboss.org/browse/JBVFS-202
Project: JBoss VFS
Issue Type: Bug
Reporter: Martin Both
Assignee: Tomaz Cerar
I'm try to use the Embeddable EJBContainer of JBoss EAP 6.4.
I get a ZipException: invalid CEN header (bad signature)
JBoss writes an invalid Zip- file in
JBossEAP6.4\standalone\data\content\58\a481cdfbe31a8ad823b6708f17151589954ac6/content
The reason is, that the zip file content contains a Local file header with no size for
the file data. No Zip-Tool can unzip that and even JBoss cannot read that again.
Compare the method bufferLocalFileHeader() with the method bufferNextCentralFileHeader()
of class org.jboss.vfs,VirtualJarFileInputStream.
The one wirtes file sizes the other one not. If you would read the file format
specification of zip files than you would know that after the LocallFileHeader the file
data is written. Without knowledge of the compressed size it is not possible to read
that.
Deployment with Embeddable EJBContainer does not work for me due to this bug.
Trace:
2015-11-09 11:16:02,392 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss
EAP 6.4.0.GA (AS 7.5.0.Final-redhat-21) wurde gestartet in 2502ms - 168 von 205 Diensten
gestartet (61 Services sind "lazy", passiv oder werden bei Bedarf geladen)
2015-11-09 11:16:03,094 INFO [org.jboss.as.repository] (pool-4-thread-1) JBAS014900:
Content an Speicherort
C:\Users\A300859\workspaces\ProKom2.0_trunk\Servers\JBossEAP6.4\standalone\data\content\58\a481cdfbe31a8ad823b6708f17151589954ac6\content
hinzugefügt
2015-11-09 11:16:03,120 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5)
JBAS015876: Starte Deployment von "classes" (runtime-name: "classes")
2015-11-09 11:16:03,159 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2)
MSC000001: Failed to start service jboss.deployment.unit.classes.STRUCTURE:
org.jboss.msc.service.StartException in service jboss.deployment.unit.classes.STRUCTURE:
JBAS018733: Verarbeitung von Phase STRUCTURE von deployment "classes"
fehlgeschlagen
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166)
[jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980)
[jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913)
[jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_60]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018740:
Einhängen des Deployment-Contents fehlgeschlagen
at
org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:97)
[jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)
[jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
... 5 more
Caused by: java.util.zip.ZipException: invalid CEN header (bad signature)
at java.util.zip.ZipFile.open(Native Method) [rt.jar:1.8.0_60]
at java.util.zip.ZipFile.<init>(ZipFile.java:219) [rt.jar:1.8.0_60]
at java.util.zip.ZipFile.<init>(ZipFile.java:149) [rt.jar:1.8.0_60]
at java.util.jar.JarFile.<init>(JarFile.java:166) [rt.jar:1.8.0_60]
at java.util.jar.JarFile.<init>(JarFile.java:130) [rt.jar:1.8.0_60]
at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:90)
[jboss-vfs-3.2.9.Final-redhat-1.jar:3.2.9.Final-redhat-1]
at org.jboss.vfs.spi.JavaZipFileSystem.<init>(JavaZipFileSystem.java:77)
[jboss-vfs-3.2.9.Final-redhat-1.jar:3.2.9.Final-redhat-1]
at org.jboss.vfs.VFS.mountZip(VFS.java:386)
[jboss-vfs-3.2.9.Final-redhat-1.jar:3.2.9.Final-redhat-1]
at org.jboss.vfs.VFS.mountZip(VFS.java:410)
[jboss-vfs-3.2.9.Final-redhat-1.jar:3.2.9.Final-redhat-1]
at
org.jboss.as.server.deployment.DeploymentMountProvider$Factory$ServerDeploymentRepositoryImpl.mountDeploymentContent(DeploymentMountProvider.java:105)
[jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
at
org.jboss.as.server.deployment.module.DeploymentRootMountProcessor.deploy(DeploymentRootMountProcessor.java:93)
[jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]
... 6 more
2015-11-09 11:16:03,161 ERROR [org.jboss.as.controller.management-operation]
(pool-4-thread-1) JBAS014612: Operation ("deploy") fehlgeschlagen - Adresse:
([("deployment" => "classes")]) - Fehlerbeschreibung:
{"JBAS014671: Fehlgeschlagene Dienste" =>
{"jboss.deployment.unit.classes.STRUCTURE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.classes.STRUCTURE: JBAS018733: Verarbeitung von Phase STRUCTURE von
deployment \"classes\" fehlgeschlagen
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS018740: Einhängen des Deployment-Contents fehlgeschlagen
Caused by: java.util.zip.ZipException: invalid CEN header (bad signature)"}}
2015-11-09 11:16:03,163 ERROR [org.jboss.as.server] (pool-4-thread-1) JBAS015870: Deploy
von Deployment "classes" wurde mit folgender Fehlermeldung zurückgesetzt:
{"JBAS014671: Fehlgeschlagene Dienste" =>
{"jboss.deployment.unit.classes.STRUCTURE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.classes.STRUCTURE: JBAS018733: Verarbeitung von Phase STRUCTURE von
deployment \"classes\" fehlgeschlagen
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS018740: Einhängen des Deployment-Contents fehlgeschlagen
Caused by: java.util.zip.ZipException: invalid CEN header (bad signature)"}}
2015-11-09 11:16:03,165 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4)
JBAS015877: Deployment von classes in (runtime-name: "classes") 2ms gestoppt
2015-11-09 11:16:03,166 INFO [org.jboss.as.controller] (pool-4-thread-1) JBAS014774:
Dienst-Statusbericht
JBAS014777: Dienste, deren Start fehlgeschlagen ist: service
jboss.deployment.unit.classes.STRUCTURE