Home » Developer & Programmer » JDeveloper, Java & XML » Calling Java function from pl/sql
Calling Java function from pl/sql [message #658330] |
Fri, 09 December 2016 10:30 |
|
dineshkumar18
Messages: 28 Registered: September 2016
|
Junior Member |
|
|
Below is the Java query which am using
<Code>
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.pdf.PdfReader;
import com.itextpdf.text.pdf.PdfStamper;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
public class EncryptPdf
{
String owner = "PASS2";
String user = "PASS1";
public static final String DEST = "/SANVOL/DW_REPORTS/REPORTS/CRDB_Statements/4010390898001_e.pdf";
public static final String SRC = "/SANVOL/DW_REPORTS/REPORTS/CRDB_Statements/4010390898001.pdf";
public static void main(String[] args)
throws IOException, DocumentException
{
File file = new File("/SANVOL/DW_REPORTS/REPORTS/CRDB_Statements/4010390898001.pdf");
file.getParentFile().mkdirs();
new EncryptPdf().manipulatePdf("/SANVOL/DW_REPORTS/REPORTS/CRDB_Statements/4010390898001.pdf", "/SANVOL/DW_REPORTS/REPORTS/CRDB_Statements/4010390898001_e.pdf");
}
public void manipulatePdf(String src, String dest)
throws IOException, DocumentException
{
PdfReader reader = new PdfReader(src);
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest));
stamper.setEncryption(this.user.getBytes(), this.owner.getBytes(),
2052, 10);
stamper.close();
reader.close();
}
}
</Code>
Oracle procedure which am using:
<Code>
create or replace
PROCEDURE PR_encryptpdf (src in varchar2,dest in varchar2)
AS LANGUAGE JAVA
NAME 'EncryptPdf.manipulatePdf(java.lang.String ,java.lang.String)';
</code>
am not able to call the function successfully.it is showing class "manipulatePdf" is not found in class EncryptPdf
Please assist
|
|
|
Goto Forum:
Current Time: Fri Apr 26 11:10:59 CDT 2024
|