[JBoss JIRA] (WFLY-4576) JCE jar file inside a deployment fails the signature check
by Eric Hodges (JIRA)
[ https://issues.jboss.org/browse/WFLY-4576?page=com.atlassian.jira.plugin.... ]
Eric Hodges commented on WFLY-4576:
-----------------------------------
I've stepped into this in Java 9, WildFly 11 and can see the root cause.
1. VFS's VirtualJarInputStream sets the currentEntryStream field to VFSUtils.EMPTY_STREAM by default.
2. During verification, sun.net.www.protocol.jar.URLJarFile tries to copy the JAR file to a temporary file using java.nio.file.Files.copy().
3. Files.copy() calls VirtualJarInputStream.read() without first calling getNextEntry() or getNextZipEntry(), so the currentEntryStream is still set to EMPTY_STREAM.
4. Files.copy() creates an empty temporary file.
5. ZipFile fails with the "zip file is empty" exception.
I thought VirtualJarInputStream was implementing read() improperly, but the documentation on ZipInputStream.read() says explicitly that method should read from the current entry. The standard ZipInputStream implementation does the same thing as VirtualJarInputStream.
It looks like the bug is actually in sun.net.www.protocol.jar.URLJarFile. That shouldn't be trying to read a JAR file that way.
> JCE jar file inside a deployment fails the signature check
> ------------------------------------------------------------
>
> Key: WFLY-4576
> URL: https://issues.jboss.org/browse/WFLY-4576
> Project: WildFly
> Issue Type: Bug
> Components: VFS
> Affects Versions: 9.0.0.Beta2
> Environment: Wildfly build from master on April 22, 2015
> Reporter: Tom Fonteyne
> Attachments: bouncycastle.zip
>
>
> deploy a war file which contains the bouncycastle (or any other JCE) signed jar file. Initialise and try to use a cipher results in a failure due to VFS not being able to read and verify the file
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months
[JBoss JIRA] (WFLY-9573) EJB invocation over HTTP fails for calls that use application specific classes
by Heiko Lettmann (JIRA)
[ https://issues.jboss.org/browse/WFLY-9573?page=com.atlassian.jira.plugin.... ]
Heiko Lettmann commented on WFLY-9573:
--------------------------------------
Hi Peter. I have the same issue with EAP 7.1.0. I updated to wildfly http-client-1.0.9. Some invocations work then. Now I get another exception from the same library. Don´t know how to contact someone about this so I did it here...
javax.ejb.EJBException: java.io.IOException: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.String
org.jboss.as.ejb3.remote.AssociationImpl.receiveInvocationRequest(AssociationImpl.java:128)
org.wildfly.httpclient.ejb.HttpInvocationHandler.lambda$handleInternal$0(HttpInvocationHandler.java:131)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
java.io.IOException: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.String
org.wildfly.httpclient.ejb.HttpInvocationHandler$1.getRequestContent(HttpInvocationHandler.java:206)
org.jboss.as.ejb3.remote.AssociationImpl.receiveInvocationRequest(AssociationImpl.java:126)
org.wildfly.httpclient.ejb.HttpInvocationHandler.lambda$handleInternal$0(HttpInvocationHandler.java:131)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.String
org.wildfly.httpclient.ejb.HttpInvocationHandler$1.getRequestContent(HttpInvocationHandler.java:180)
org.jboss.as.ejb3.remote.AssociationImpl.receiveInvocationRequest(AssociationImpl.java:126)
org.wildfly.httpclient.ejb.HttpInvocationHandler.lambda$handleInternal$0(HttpInvocationHandler.java:131)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
> EJB invocation over HTTP fails for calls that use application specific classes
> ------------------------------------------------------------------------------
>
> Key: WFLY-9573
> URL: https://issues.jboss.org/browse/WFLY-9573
> Project: WildFly
> Issue Type: Bug
> Components: EJB, Naming, Remoting
> Affects Versions: 11.0.0.Final
> Reporter: peter craddock
> Assignee: David Lloyd
> Fix For: 12.0.0.Alpha1
>
>
> I first raised this as a discussion and [~jaikiran] asked that I raise this as a bug because he has recreated the issue in a small test case.
> Discussion is here
> https://developer.jboss.org/thread/276635
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months