-
1. Re: VFS problem with WildFly 11 and Java 9
lukaszracon Feb 8, 2018 11:48 PM (in response to ehodges)One way is to exclude BC from war/ear and depend on BC provided by Wildfly's module:
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0">
<deployment>
<dependencies>
<module name="org.bouncycastle"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
The other option is to register BC in JDK (your JDK8 may already have it - I would check java.security):
Installing Bouncy Castle or To configure a JCE Provider (Sun Java System Application Server Platform Edition 8.2 Administration Guide)
See these issues/comments:
[WFLY-4576] JCE jar file inside a deployment fails the signature check - JBoss Issue Tracker
[CRASH-106] Better configuration of Bouncy Castle deployment for JBoss AS7 - Jira
-
2. Re: VFS problem with WildFly 11 and Java 9
ehodges Feb 9, 2018 9:59 AM (in response to ehodges)That's too bad. We've been able to avoid any JBoss specific deployment stuff up until now. We don't want to rely on Bouncy Castle being installed in the JRE. We want to be able to pick the version of Bouncy Castle our app uses.
At first I thought this was a bug in VirtualJarInputStream, but ZipInputStream behaves the same way. The bug is really in sun.net.www.protocol.jar.URLJarFile. It tries to read from a ZipInputStream like it was a normal InputStream. I guess maybe the problem is in the ambiguous meaning of the read() method.
-
3. Re: VFS problem with WildFly 11 and Java 9
lukaszracon Feb 9, 2018 10:34 AM (in response to ehodges)If you need specific BC version you can deploy it as Wildfly module.
-
4. Re: VFS problem with WildFly 11 and Java 9
ehodges Feb 9, 2018 2:21 PM (in response to lukaszracon)We're using Java 9, so it doesn't look like we can add BouncyCastle to the JRE. Java 9 gets rid of the lib/ext extension mechanism.
-
5. Re: VFS problem with WildFly 11 and Java 9
ehodges Feb 16, 2018 9:26 AM (in response to ehodges)I've opened a bug with Oracle about the underlying issue.
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8198274