Skip to Main Content

SQL & PL/SQL

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!

LOAD_JAVA

mshaqalaihApr 7 2018 — edited Apr 8 2018

hi every body

I used DBMS_JAVA.loadjava to load apache.poi into oracle database, to read and write to ms word files.

every thing go straight ..

and then I create this java class

CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED COMMON_DATA."WordReader" AS

import java.io.File;

import java.io.FileInputStream;

import java.io.FileNotFoundException;

import java.io.IOException;

import java.util.List;

import org.apache.poi.xwpf.usermodel.XWPFDocument;

import org.apache.poi.xwpf.usermodel.XWPFTable;

public class WordReader {

   

    public static void readWord() throws FileNotFoundException, IOException {

        String path = "D:\\DB12C2\\admin\\orcl\\dpdump\\readdoc.docx";

        XWPFDocument doc;

                File file;

                FileInputStream fis = null;

                try {

                    file = new File(path);

                    fis = new FileInputStream(file);

                    doc = new XWPFDocument(fis);

                   

                    List<XWPFTable> tables = doc.getTables();

                   

                System.out.println(tables.get(0).getRow(1).getCell(0).getText());

                }

                finally {

                    try {

                        if(fis != null) {

                            fis.close();

                            fis = null;

                        }

                    }

                    catch(IOException ioEx) {

                        // Swallow this exception. It would have occured onyl

                        // when releasing the file handle and should not pose

                        // problems to later processing.

                    }

                }

    }

}

but when I call this class this error appeared:

ORA-29532: Java call terminated by uncaught Java exception: java.lang.VerifyError: (class: org/apache/poi/xwpf/usermodel/XWPFDocument,

method: onDocumentRead signature: ()V) catch_type not a subclass of Throwable.

how can i solve this problem??

thanks

maher

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 6 2018
Added on Apr 7 2018
21 comments
690 views