Skip to Main Content

Java and JavaScript in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Usage of JPEGImageDecoder in Oracle JVM

24987Oct 1 2002
Hi!

I am having problems with using JPEGImageDecoder interface in Oracle JVM. My goal is to write java stored procedure that reads picture from DB (JPEG stored in LONG RAW), changes it, and then writes it back to db (in JPEG format to LONG RAW).

Source code of my AnaGen class can be found at http://www.jware.hr/~marin/AnaGen.java

Code is loaded with loadjava to database and status is VALID.

I have created small PL/SQL stub:

CREATE OR REPLACE PROCEDURE anagen_test
AS LANGUAGE JAVA
NAME 'plusplus.AnaGen.test()';

Problem is that every call to anagen_test procedure results in error:

ORA-29532: Java call terminated by uncaught Java exception: java.lang.UnsatisfiedLinkError: sun.awt.image.codec.JPEGImageDecoderImpl.initDecoder
ORA-06512: at "LASERPLUS.ANAGEN_TEST", line 0
ORA-06512: at line 1


Database version is 9.2. I have also found source code of JPEGImageDecoderImpl. Implementation is using JNI to call external dll (jpeg.dll) that can be found in oracle\jdk\jre\bin directory.

Code is working ok from JDeveloper 9i (jdbc thin connection to db).

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2002
Added on Oct 1 2002
4 comments
526 views