A
arashamiri
Hi!
I have following problem:
We store java classes in oracle (version 10g) blob fields, in order to
load them later with a special classloader using ojdbc14 drivers.
I use the following way to obtain a class:
<snip>
BLOB blob = ((OracleResultSet) rs).getBLOB(someBlobFieldName);
byte[] b = blob.getBytes(1,blob.length());
</snip>
my problem is that by trying to convert the byteArray to a class in a
classloader, I receive following error:
java.lang.ClassFormatError: ... (Extra bytes at the end of the class
file)
When I print the blob to the screen, I see a lot of zeros at the end,
which I suppose are the problem.
How can I trim the blob to a correct size depending on the class it
contains????
please, please, help.
arash.
I have following problem:
We store java classes in oracle (version 10g) blob fields, in order to
load them later with a special classloader using ojdbc14 drivers.
I use the following way to obtain a class:
<snip>
BLOB blob = ((OracleResultSet) rs).getBLOB(someBlobFieldName);
byte[] b = blob.getBytes(1,blob.length());
</snip>
my problem is that by trying to convert the byteArray to a class in a
classloader, I receive following error:
java.lang.ClassFormatError: ... (Extra bytes at the end of the class
file)
When I print the blob to the screen, I see a lot of zeros at the end,
which I suppose are the problem.
How can I trim the blob to a correct size depending on the class it
contains????
please, please, help.
arash.