All,
I'm trying to get my crypto application running on an open-vm. For
that, I went throught the tendious process of replacing all the crypto
providers, but am currently stuck with the following exception.
java.lang.ArrayIndexOutOfBoundsException
at java.lang.VMSystem.arraycopy (VMSystem.java)
at java.lang.System.arraycopy (System.java:238)
at javax.crypto.CipherInputStream.read (CipherInputStream.java:237)
at java.io.DataInputStream.readFully (DataInputStream.java:283)
at java.io.DataInputStream.readUnsignedShort
(DataInputStream.java:498)
at java.io.DataInputStream.readUTF (DataInputStream.java:592)
at java.io.DataInputStream.readUTF (DataInputStream.java:575)
at org.bouncycastle.jce.provider.JDKKeyStore.decodeKey
(JDKKeyStore.java:411)
at org.bouncycastle.jce.provider.JDKKeyStore.access$100
(JDKKeyStore.java:41)
at org.bouncycastle.jce.provider.JDKKeyStore
$StoreEntry.getObject (JDKKeyStore.java:230)
at org.bouncycastle.jce.provider.JDKKeyStore.engineGetKey
(JDKKeyStore.java:605)
at java.security.KeyStore.getKey (KeyStore.java:270)
at
org.metastatic.jessie.provider.X509KeyManagerFactory.engineInit
(X509KeyManagerFactory.java:202)
at javax.net.ssl.KeyManagerFactory.init (KeyManagerFactory.java:
278)
at org.mortbay.http.SslListener.createFactory (SslListener.java:
265)
at org.mortbay.http.SslListener.newServerSocket
(SslListener.java:287)
at org.mortbay.util.ThreadedServer.open (ThreadedServer.java:477)
at org.mortbay.util.ThreadedServer.start (ThreadedServer.java:503)
at org.mortbay.http.SocketListener.start (SocketListener.java:203)
at org.mortbay.http.HttpServer.doStart (HttpServer.java:716)
at org.mortbay.util.Container.start (Container.java:72)
at com.bbn.pb.TestServer.main (TestServer.java:89)
at java.lang.VirtualMachine.invokeMain (VirtualMachine.java)
at java.lang.VirtualMachine.main (VirtualMachine.java:108)
The exception was produced with running sablevm 1.13 on a 2.6 linux
box, and I can reproduce it with kaffe 1.1.6, so it doesn't seem to be
a VM bug. (I independantly confirmed on the sablevm mailing list).
The same code runs perfectly fine on Sun's jdk1.4.2_10.
Sablevm 1.13 pulls in gnu classpath version 0.19, so my current
through is that there is
a bug in the InputStream classes that 0.19 provides.
I have a standalone test case that I am happy to send out upon
request.