Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Java call terminated by uncaught Java exception

Java call terminated by uncaught Java exception

From: h <heba11282_at_yahoo.com>
Date: 1 Feb 2005 02:19:09 -0800
Message-ID: <1107253149.421372.307080@f14g2000cwb.googlegroups.com>


HI,

"i want to create file .xls from pl*sql but i don't want it to be in slk or csv format as i want to 've rows with background color & these fromats doesn't support this "

& i got some help from OTN dbforum
" With just pl/sql you cannot create xls files. You can use Java. Here you can find some demo's:
http://www.andykhan.com/jexcelapi/ "

then i do this

THIS IS MY CLASS WHICH CALL jexcel API jar :

package ExcelGenPackage;

import java.io.File;
import java.io.IOException;
import java.lang.Number;
import java.util.Date;

import jxl.*;
import jxl.write.*;

public class ExcelGenClass
{

public ExcelGenClass()
{

}

/**

*
* @param args
*/

public static void main(String[] args)
{

ExcelGenClass excelGenClass = new ExcelGenClass(); Write_XLS();
}
public static void Write_XLS()
{

try
{

WritableWorkbook workbook = Workbook.createWorkbook(new File("C:\\output.xls"));
WritableSheet sheet = workbook.createSheet("First Sheet", 0); Label label = new Label(0, 2, "A label record"); sheet.addCell(label);

Label label1 = new Label(0, 4, "A Second label record "); sheet.addCell(label1);

// All sheets and cells added. Now write out the workbook workbook.write();
workbook.close();

}
catch (JXLException e)
{

System.out.println("JXLException ");
}
catch (IOException e)
{

System.out.println("IOException ");
}

}
}

I Load the jar & the class into pl*sql
then i add wrapped procedure

PROCEDURE Test_Proc AS LANGUAGE JAVA
NAME 'ExcelGenPackage.ExcelGenClass.Write_XLS()';

when i call Test_Proc
i got this exception

ORA-29532: Java call terminated by uncaught Java exception: java.lang.IncompatibleClassChangeError: Error detected by bytecode verifier when class was created

please help Received on Tue Feb 01 2005 - 04:19:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US