Publishing JSP form JAVA stored procedure [Oracle8i 8.1.7]

Hi folks,
I wonder if anybody knows a way to publish JSP from JAVA stored procedure.
I know there is a way to load java class using PL/SQL package DBMS_JAVA.loadjava(), or
oracle.aurora.server.tools.loadjava.LoadJavaMain.serverMain() from java.
But I need somthing like publishjsp to translate the JSP.
Also would be nice if I can invoke this from a LOB where I have stored my JSP.
Any ideas?
Mitko

I case anyone is interested.
I managed to find out what I was doing wrong.
First when you call a stored procedure that is in a package and is a method of a class. You call it referencing the packagename.method. Leaving out the class name. Also, since this was a method that returns a value. The return value has to be assigned to a variable or used in an sql statement. Such as:
var x number;
call claimsprocedures.ip(19990033) into :x;call completed
print x;(then the value is displayed in sql*plus
scirco.
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by scirco:
I created a simple java stored procedure and depoloyed it using the deployment wizard. The code for the class is as follows:
// Copyright (c) 2000 CAP-MPT
package ClaimsProcedures;
import sqlj.runtime.*;
import sqlj.runtime.ref.*;
import java.sql.*;
import java.sql.SQLException;
* A Sqlj class.
* <P>
* @author Sebastian Circo
public class ClaimsFinancialHistory extends Object {
* Constructor
public ClaimsFinancialHistory() {
public static int IP(int Claimno) throws SQLException {
int Val;
Val = 0;
#sql {select sum(amount) into :Val from reshist
where claimno = :Claimno and type = 'RI'};
return Val;
The wizard indicated that everything deployed properly. However when I try to call the procedure/method "IP" from sql*plus I get the following message: ORA-06576: not a valid function or procedure name. I double checked to make sure that I'm publishing the "IP" method and I still get the same error. I also tried calling the procedure with the schema.class.procedure form, still same error.
Can anyone help?
thanks
scirco<HR></BLOCKQUOTE>
null

Similar Messages

  • CLASSPATH configuration for jsp (java stored procedures)

    Hi.
    I have a very simple question for you people.
    I don't know where to set up the CLASSPATH configuration on a HP-UX so that Aurora can see this include jar file and my java stored procedure can run correctly.
    Thanks a lot.
    Flavio Matiello

    The way global variables could be created using java classes is by using static variables.The class variable values are stored in the JVM's memory
    In Oracle8i Each session gets its own JVM & hence you cannot have a Java class variable which could
    span across sessions.
    Hope this helps

  • Runtime.Exec() fails -- Through java stored procedure in Oracle8i

    HI,
    I HAVE A JAVA STORED PROCEDURE WHICH EXECUTES
    A HOST COMMAND USING Runtime.Exec().
    BUT IT IS NOT WORKING.
    RIGHTS FOR THE USER HAVE BEEN GIVEN USING
    Dbms_grant_persmission(). The database in on
    SUN SOLARIS. THE EXITVALUE OF THE RUNTIME.EXEC COMMAND IS 255(SEGMENTATION
    ERROR - CORE DUMPED).
    PLEASE LET ME KNOW WHERE THE PROBLEM LIES. THE FUNCTION IS WORKING WELL IF THE DATABASE IS ON NT PLATFORM BUT FAILS TO WORK WHEN I STORED THE PROCEDURE IN A DATABASE RUNNING ON SUN SOLARIS AND TRIED TO EXECUTE A SOLARIS COMMAND THROUGH THE PROCEDURE.
    Thanks for ur interest!
    with best regards,
    Mathan

    I have similar problem on HP-UX, I would appreciate if you
    somehow were able to solve it.
    Thanks
    Rahul Shah

  • ResultSet from Java Stored Procedures

    Hi,
    How do I obtain a resultset from a Java Stored Procedure?
    My stored procedure, deployed in Oracle8i, has Database package as sample.Have published setConnection() and getDept() methods.
    Code for Java Stored Procedure:
    package SPPackage;
    import java.sql.*;
    public class StoredProcApplication {
    protected static Connection connection = null;
    protected static Statement stmt = null;
    protected static ResultSet res = null;
    public static void setConnection() throws SQLException {
    connection = new oracle.jdbc.driver.OracleDriver().defaultConnection();
    public static void getDept(Object[] obj) throws SQLException {
    if (connection == null) {
    setConnection();
    if (stmt == null) {
    stmt = connection.createStatement();
    if (res == null) {
    res = stmt.executeQuery("select * from DEPT");
    obj[0] = res;
    Code for TesterApplication :
    package SPPackage;
    import java.sql.*;
    public class TesterApplication {
    private static final String URL = "jdbc:oracle:thin:@sandeep:1521:oracle8i";
    private static final String userId = "sandeep";
    private static final String password = "sandeep";
    private Connection connection;
    private CallableStatement stmt;
    private ResultSet res;
    public void setConnection() throws ClassNotFoundException,SQLException {
    Class.forName("oracle.jdbc.driver.OracleDriver");
    connection = DriverManager.getConnection(URL,userId,password);
    public void getResultFromSP() throws SQLException {
    //prepare to call the stored procedure
    stmt = connection.prepareCall("{call sample.getDept(?)}");
    //register the OUT parameters
    stmt.registerOutParameter(1,Types.OTHER);
    //execute the query
    stmt.execute();
    ResultSet res = (ResultSet)stmt.getObject(1);
    while (res.next()) {
    System.out.print(res.getInt(1) + " | " );
    System.out.print(res.getString(2) + " | " );
    System.out.print(res.getString(3) + " \n " );
    public TesterApplication() throws SQLException,ClassNotFoundException {
    try {
    setConnection();
    getResultFromSP();
    } finally {
    if (res != null) { res.close(); res = null; }
    if (stmt != null) { stmt.close(); stmt = null; }
    if (connection != null) { connection.close(); connection = null; }
    public static void main(String[] args) {
    try {
    TesterApplication ta = new TesterApplication();
    } catch (Exception e) {
    System.err.println("Error while executing stored procedure " + e.getMessage());
    e.printStackTrace();
    When I run the TesterApplication, I get the following exception :
    java.sql.SQLException: Invalid column type: get_internal_type
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled Code)
    at oracle.jdbc.driver.OracleStatement.get_internal_type(Compiled Code)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(Compiled Code)
    Also, if I want to execute the ResultSet in the stored proc itself, and return the values as Arrays of int[], and String[], how do I do it?By default the you can populate only int[0], String[0] , i.e. only one value!!!
    if my statement is unknown, i.e, it might return a combination of updates and resultsets, how do I go about processing the result?
    Please advise!!
    TIA
    Sandeep
    null

    Hi kkirk,
    I found the post you mentioned.Well it dates back to November 1999 - "Problem returning resultset or ARRAY from java stored proc" by Stuart Popejoy ([email protected]).Too bad, it is still not solved!!
    I am not very good at PL/SQL.However, it would still be helpful, if you could post the code here, or at my email address.
    Meanwhile, I was trying this during the week-end.There seems to be a glimmer of hope!!
    Let me know, if this makes sense :
    CallableStatement cs = connection.prepareCall("begin open ? for select * from dept; end");
    try {
    cs.registerOutParameter(1,OracleTypes.CURSOR);
    ResultSet res = ((OracleCallableStatement)cs).getCursor(1);
    while (res.next()) {
    //get the values
    } catch (Exception e) {
    e.printStacktrace();
    However, I am getting an exception trace
    Error while executing stored procedure Invalid column type: getLong
    java.sql.SQLException: Invalid column type: getLong
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled Code)
    at oracle.jdbc.driver.OracleStatement.getLongValue(Compiled Code)
    Not quite sure why this is happening!!
    TIA,
    Sandeep
    null

  • Calling XML API's from Java Stored Procedures in DB

    Hi,
    I am have and Oracle 10gR2 db installed and XML Publisher Enterprise Server 5.6.2.
    I have created the following Java Class and used loadjava to make it a Java Stored Procedure:
    <code>
    import java.io.IOException;
    import java.lang.Object;
    import oracle.apps.xdo.XDOException;
    import oracle.apps.xdo.template.FOProcessor;
    import oracle.apps.xdo.template.RTFProcessor;
    public class callingXMLP{
    public static String rtfToXsl(String rtfFile, String xslFile)
    try {
    RTFProcessor rtfProcessor = new RTFProcessor(rtfFile); //Input RTF
    rtfProcessor.setOutput(xslFile);
    rtfProcessor.process();
    } catch (IOException IOE) {
    return" Error "+IOE.getMessage();}
    catch(XDOException XDE ){
    return" Error "+XDE.getMessage();
    return "Success";
    public static String mergeXmlXsl(String xmlFile, String xslFile, String outputFile)
    FOProcessor processor = new FOProcessor();
    processor.setData(xmlFile); //Input XML File
    processor.setTemplate(xslFile); //Input XSL File
    processor.setOutput(outputFile); //Ouput File
    processor.setOutputFormat(FOProcessor.FORMAT_PDF);
    //start processing
    try {
    processor.generate();
    catch (XDOException e){
    e.printStackTrace();
    //System.exit(1);
    return "Error - "+e.getMessage();
    //System.exit(0);
    return "Success";
    </code>
    I then wrap this using the following function spec in pl/sql:
    create or replace function callXMLP(input1 VARCHAR2, output1 VARCHAR2) RETURN VARCHAR2
    as language java name 'callingXMLP.rtfToXsl(java.lang.String,java.lang.String) return java.lang.String';
    and
    create or replace function mergeXMLXSL(xml VARCHAR2, xsl VARCHAR2, output VARCHAR2) RETURN VARCHAR2
    as language java name 'callingXMLP.mergeXmlXsl(java.lang.String,java.lang.String,java.lang.String) return java.lang.String';
    Calling the callXMLP function works fine, and produces an XSL file from the input RTF file as expected.
    When I run the mergeXMLXSL function, it says that the function has completed successfully, but it seems to be throwing an XDOException error as it is returning "Error - null" message from the Java.
    A PDF document is being created, but it does not have any content. I have also modified the Java to create an RTF instead, but still the same thing happens.
    Is there anything that I need to check, or something that I am missing when trying to create the final PDF document?
    Please help, I am completely stuck with this now.
    Many Thanks,
    Cj

    Hello Chris,
    I have been able to create a PDF from the database. I loaded the following jar files and removed any java class that could not compile.
    activation.jar, axis-ant.jar, axis.jar, axis-schema.jar, bicmn.jar, bipres.jar, collections.jar,
    commons-beanutils.jar, commons-collections-3.1.jar, commons-collections.jar, commons-dbcp-1.1.jar commons-digester.jar, commons-discovery.jar, commons-el.jar, commons-fileupload.jar, commons-logging-api.jar commons-logging.jar, commons-pool-1.1.jar, http_client.jar, i18nAPI_v3.jar, javamail.jar, jaxrpc.jar,
    jewt4.jar, jsp-el-api.jar, log4j-1.2.8.jar, logkit-1.2.jar, ojpse.jar, oracle-el.jar, oraclepki.jar,
    orai18n.jar, quartz-1.5.1.jar, quartz-oracle-1.5.1.jar, regexp.jar, saaj.jar, service-gateway.jar, share.jar, uix2.jar, uix2tags.jar, versioninfo.jar, wsdl4j.jar, xdocore.jar, xdoparser.jar, xdo-server-delivery-1.0-SNAPSHOT.jar, xdo-server-kernel-0.1.jar, xdo-server-kernel-impl-0.1.jar, xdo-server-scheduling-1.0-SNAPSHOT.jar, xercesImpl.jar, xmlparserv2-904.jar, xmlpserver.jar, xsu12.jar
    I needed to copy the XML Publisher fonts to the database server and ran the following java grants, note my $ORACLE_HOME is /opt/app/oracle/product/10.1.0/
    dbms_java.grant_permission('XMLP', 'java.util.PropertyPermission', '*', 'read,write');
    dbms_java.grant_permission('XMLP', 'java.net.SocketPermission', '*', 'connect, resolve');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/tmp/*', 'read, write, delete');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/opt/app/oracle/product/10.1.0/javavm/lib/*', 'read');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/opt/app/oracle/product/10.1.0/javavm/lib/fonts/*', 'read');
    dbms_java.grant_permission('XMLP', 'java.lang.RuntimePermission', 'setFactory', '');
    George

  • Accessing XML API's from Java Stored Procedures in DB

    I am working in an environment that does not contain any Oracle applications and we have been looking at XML publisher as a stand alone service. I have successfully configured the UI and created some command line java programs to produce documents and deliver these documents.
    How do I install (do I need to install) XML Publisher java in the database in order to access XML Publisher API's from stored procedures. Any clues or help would be gratefully appreciated.
    George

    Hello Chris,
    I have been able to create a PDF from the database. I loaded the following jar files and removed any java class that could not compile.
    activation.jar, axis-ant.jar, axis.jar, axis-schema.jar, bicmn.jar, bipres.jar, collections.jar,
    commons-beanutils.jar, commons-collections-3.1.jar, commons-collections.jar, commons-dbcp-1.1.jar commons-digester.jar, commons-discovery.jar, commons-el.jar, commons-fileupload.jar, commons-logging-api.jar commons-logging.jar, commons-pool-1.1.jar, http_client.jar, i18nAPI_v3.jar, javamail.jar, jaxrpc.jar,
    jewt4.jar, jsp-el-api.jar, log4j-1.2.8.jar, logkit-1.2.jar, ojpse.jar, oracle-el.jar, oraclepki.jar,
    orai18n.jar, quartz-1.5.1.jar, quartz-oracle-1.5.1.jar, regexp.jar, saaj.jar, service-gateway.jar, share.jar, uix2.jar, uix2tags.jar, versioninfo.jar, wsdl4j.jar, xdocore.jar, xdoparser.jar, xdo-server-delivery-1.0-SNAPSHOT.jar, xdo-server-kernel-0.1.jar, xdo-server-kernel-impl-0.1.jar, xdo-server-scheduling-1.0-SNAPSHOT.jar, xercesImpl.jar, xmlparserv2-904.jar, xmlpserver.jar, xsu12.jar
    I needed to copy the XML Publisher fonts to the database server and ran the following java grants, note my $ORACLE_HOME is /opt/app/oracle/product/10.1.0/
    dbms_java.grant_permission('XMLP', 'java.util.PropertyPermission', '*', 'read,write');
    dbms_java.grant_permission('XMLP', 'java.net.SocketPermission', '*', 'connect, resolve');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/tmp/*', 'read, write, delete');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/opt/app/oracle/product/10.1.0/javavm/lib/*', 'read');
    dbms_java.grant_permission('XMLP', 'java.io.FilePermission', '/opt/app/oracle/product/10.1.0/javavm/lib/fonts/*', 'read');
    dbms_java.grant_permission('XMLP', 'java.lang.RuntimePermission', 'setFactory', '');
    George

  • Error deploying java stored procedure

    Anyway, I've got a really simple java function that takes an XML document in a CLOB as a parameter and simply returns whether or not it's a valid document. Works fine in JDeveloper, but when I try to load it into the database, I get:
    Errors in cdh_j_validate:
    ORA-29521: referenced name oracle/xml/parser/v2/DOMParser could not be found
    The XML Parser is installed on the database and is functioning properly.. I am deploying my Java stored procedure to the same schema that the xml parser was installed into. Any suggestions?
    Thanks in advance,
    Craig Drabik
    null

    This is due to a current restriction in the loadjava utility. The following is the excerpt from the Release notes on the subject:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>
    Incomplete Deployment to Oracle8i When Using JDBC Thin Driver and Net8 Name-value List (1250825)
    In the Connection Manager, it is possible to create a connection to Oracle 8i using the Oracle JDBC Thin driver and Net8 name-value pairs as the connection method. This connection can be viewed in the Database Browser, but deployment will not complete because the loadjava utility requires a database string of the form "@host:port:SID" when using the Oracle JDBC Thin driver.
    There are two work-arounds to this problem:
    Use the Named Host connection method instead of Net Name-Value Pair when creating this connection type in the Connection Manager.
    Use the Oracle JDBC OCI-8 driver instead of the Oracle JDBC Thin driver. To use the Oracle JDBC OCI-8 driver with JDeveloper, please see the section entitled 'Connection Requirements for OCI and Type 2 JDBC Drivers' in the online documentation.
    <HR></BLOCKQUOTE>
    -- Brian

  • Error loading Java Stored Procedure

    When I attempt to deploy a java stored procedure using JDeveloper I get the following error: "ORA-29545: badly formed class: User has attempted to load a class (TestingJava.Testerama) into a restricted package. Permission can be granted using dbms_java.grant_permission(<user>, LoadClassInPackage...". I have attempted to grant the proper permissions but get a "java.lang.SecurityException: policy table update" error. The user granting the permissions has the Java_Admin role. What do I do?
    null

    I think u dont've previleges to run
    the procedure.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by arunr12:
    hi I am calling java stored procedure from jdbc. i am getting wierd exceptions:
    CallableStatement cstmt = conn.prepareCall("begin SEND_MAIL(?,?,?);end;");
    cstmt.setString(1,"[email protected]");
    cstmt.setString(2,"Mail from Stored Proc");
    cstmt.setString(3,"This is test mail from Oracle8i");
    cstmt.execute();
    i am getting following Exception:
    java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.util.PropertyPermission * read,write) has not been granted by dbms_java.grant_permission to SchemaProtectionDomain(ISTORE_CUST|PolicyTableProxy(ISTORE_CUST))
    ORA-06512: at "ISTORE_CUST.SEND_MAIL", line 0
    ORA-06512: at line 1
    <HR></BLOCKQUOTE>
    null

  • Java stored procedures in 8.1.6

    I created a simple java stored procedure and depoloyed it using the deployment wizard. The code for the class is as follows:
    // Copyright (c) 2000 CAP-MPT
    package ClaimsProcedures;
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    import java.sql.*;
    import java.sql.SQLException;
    * A Sqlj class.
    * <P>
    * @author Sebastian Circo
    public class ClaimsFinancialHistory extends Object {
    * Constructor
    public ClaimsFinancialHistory() {
    public static int IP(int Claimno) throws SQLException {
    int Val;
    Val = 0;
    #sql {select sum(amount) into :Val from reshist
    where claimno = :Claimno and type = 'RI'};
    return Val;
    The wizard indicated that everything deployed properly. However when I try to call the procedure/method "IP" from sql*plus I get the following message: ORA-06576: not a valid function or procedure name. I double checked to make sure that I'm publishing the "IP" method and I still get the same error. I also tried calling the procedure with the schema.class.procedure form, still same error.
    Can anyone help?
    thanks
    scirco

    I case anyone is interested.
    I managed to find out what I was doing wrong.
    First when you call a stored procedure that is in a package and is a method of a class. You call it referencing the packagename.method. Leaving out the class name. Also, since this was a method that returns a value. The return value has to be assigned to a variable or used in an sql statement. Such as:
    var x number;
    call claimsprocedures.ip(19990033) into :x;call completed
    print x;(then the value is displayed in sql*plus
    scirco.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by scirco:
    I created a simple java stored procedure and depoloyed it using the deployment wizard. The code for the class is as follows:
    // Copyright (c) 2000 CAP-MPT
    package ClaimsProcedures;
    import sqlj.runtime.*;
    import sqlj.runtime.ref.*;
    import java.sql.*;
    import java.sql.SQLException;
    * A Sqlj class.
    * <P>
    * @author Sebastian Circo
    public class ClaimsFinancialHistory extends Object {
    * Constructor
    public ClaimsFinancialHistory() {
    public static int IP(int Claimno) throws SQLException {
    int Val;
    Val = 0;
    #sql {select sum(amount) into :Val from reshist
    where claimno = :Claimno and type = 'RI'};
    return Val;
    The wizard indicated that everything deployed properly. However when I try to call the procedure/method "IP" from sql*plus I get the following message: ORA-06576: not a valid function or procedure name. I double checked to make sure that I'm publishing the "IP" method and I still get the same error. I also tried calling the procedure with the schema.class.procedure form, still same error.
    Can anyone help?
    thanks
    scirco<HR></BLOCKQUOTE>
    null

  • HELP!!! Problem of Calling external Web Service from a Java Stored Procedur

    1.I read the topic on http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html about Calling external Web Service from a Java Stored Procedur.
    2.After I import .jar to Oracle what is required by the topic,som error occued.
    Like: ORA-29521: javax/activation/ActivationDataFlavor class not found,
    ORA-29545: badly formed class.
    3.These is not enough .jar required on the topic? What can I do for ORA-29545: badly formed class?
    Thany you!

    Try this
    Re: HELP! Loading Java Classes into Oracle ERROR

  • Broken Java Stored Procedure Demo

    The link to download HotelBookingsSample.jar does not work. It is located on http://otn.oracle.com/sample_code/tech/java/jsp/samples/jsptrigger/Readme.html

    Do as follows:
    Define a JDBC Connection to your DB - use this name only.
    Create a Deployment profile (Java Stored Procedure )(with [x]Publish option) to the same connection.
    Then in the deployment tab of the Message View (View | Message View), you will see the deployment.
    Then you can call your procedures, functions using SQL*Plus by
    Expand Connection Folder
    Right Click on the JDBC Connection
    Select Invoke SQL*Plus...
    This will invoke SQL*Plus with the info from this connection.
    In SQL*Plus enter various statements to invoke your Java Stored Procedure.
    For grins, try:
    In JDeveloper, select
    File | New ... Class / JavaStoredProcedure
    Add the following methods to the bottom:
    =============
    public static String getJDBTime( ) {
    return (new Date()).toString();
    private static int nSeq = 0;
    public static int getNextSequence( ) {
    return nSeq++;
    ===========
    Then Create a deployment profile and deploy it.
    Then Invoke SQL*Plus and call it as:
    select <PackageName>.FunctionName() from dual;
    In my case, my SQL*Plus window looked as:
    SQL>
    SQL>
    SQL> select MYPROJECT5.GETJDBTIME() from dual;
    MYPROJECT5.GETJDBTIME()
    Wed Dec 20 16:12:16 CST 2000
    SQL> select MYPROJECT5.GETJDBTIME() from dual;
    MYPROJECT5.GETJDBTIME()
    Wed Dec 20 16:12:22 CST 2000
    SQL> select MYPROJECT5.GETNEXTSEQUENCE() from dual;
    MYPROJECT5.GETNEXTSEQUENCE()
    0
    SQL> select MYPROJECT5.GETNEXTSEQUENCE() from dual;
    MYPROJECT5.GETNEXTSEQUENCE()
    1
    SQL> select MYPROJECT5.GETNEXTSEQUENCE() from dual;
    MYPROJECT5.GETNEXTSEQUENCE()
    2
    SQL>
    I hope this helps,
    -John
    null

  • NameFromLastDDL Error during java stored procedure upload...

    Hi guys,
    I am trying to upload a class to send email within a java stored procedure.
    JDeveloper fails to upload the class, and the error message doesn't help me:
    I guess the automatically generated SQL statment features a "NameFromLastDDL" argument, but i have no control over that....anybody had this issue before ?
    Following, the "ugly" exception:
    Error while creating class client/Utils
    ORA-06550: line 1, column 91:
    PLS-00201: identifier 'NameFromLastDDL' must be declared
    ORA-06550: line 1, column 85:
    PL/SQL: Statement ignored
    java.sql.SQLException: ORA-06550: line 1, column 91:
    PLS-00201: identifier 'NameFromLastDDL' must be declared
    ORA-06550: line 1, column 85:
    PL/SQL: Statement ignored
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:184)
         at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:873)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3076)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4273)
         at oracle.aurora.server.tools.loadjava.ClientClassObject.create(ClientClassObject.java:68)
         at oracle.aurora.server.tools.loadjava.SchemaObject.process1(SchemaObject.java:223)
         at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:530)
         at oracle.aurora.server.tools.loadjava.LoadJava.addClass(LoadJava.java:584)
         at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:434)
         at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:378)
         at oracle.aurora.server.tools.loadjava.LoadJava.addJar(LoadJava.java:717)
         at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:430)
         at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:378)
         at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:347)
         at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:643)
         at oracle.aurora.server.tools.loadjava.LoadJava.processDeferredFiles(LoadJava.java:615)
         at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:806)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:116)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:46)
         at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:97)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:473)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:360)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeployToMostRecent(StoredProcHandler.java:256)
         at oracle.jdevimpl.deploy.StoredProcProfileDt$2.run(StoredProcProfileDt.java:193)
    The following operations failed
    class client/Utils: creation (createFailed)
    oracle.aurora.server.tools.loadjava.ToolsException: Failures occurred during processing
         at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:863)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:116)
         at oracle.jdeveloper.deploy.tools.OracleLoadjava.deploy(OracleLoadjava.java:46)
         at oracle.jdevimpl.deploy.OracleDeployer.deploy(OracleDeployer.java:97)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:473)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeploy(StoredProcHandler.java:360)
         at oracle.jdevimpl.deploy.StoredProcHandler.doDeployToMostRecent(StoredProcHandler.java:256)
         at oracle.jdevimpl.deploy.StoredProcProfileDt$2.run(StoredProcProfileDt.java:193)

    I think u dont've previleges to run
    the procedure.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by arunr12:
    hi I am calling java stored procedure from jdbc. i am getting wierd exceptions:
    CallableStatement cstmt = conn.prepareCall("begin SEND_MAIL(?,?,?);end;");
    cstmt.setString(1,"[email protected]");
    cstmt.setString(2,"Mail from Stored Proc");
    cstmt.setString(3,"This is test mail from Oracle8i");
    cstmt.execute();
    i am getting following Exception:
    java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception: java.security.AccessControlException: the Permission (java.util.PropertyPermission * read,write) has not been granted by dbms_java.grant_permission to SchemaProtectionDomain(ISTORE_CUST|PolicyTableProxy(ISTORE_CUST))
    ORA-06512: at "ISTORE_CUST.SEND_MAIL", line 0
    ORA-06512: at line 1
    <HR></BLOCKQUOTE>
    null

  • Size limitation that can be passed to Java stored procedure

    Hello!
    I enjoy using Oracle8i these days. But I have some questions
    about Java stored procedure. I want to pass the XML data to Java
    stored procedure as IN parameter. But I got some errors when the
    data size is long. Is there any limitation in the data size that
    can be passed to Java stored procedure?
    Would you please help me ?
    This message is long, but would you please read my message?
    Contents
    1. Outline : I write what I want to do and the error message I
    got
    2. About the data size boundary: I write about the boundary
    size. I found that it depend on which calling sequence I use.
    3. The source code of the Java stored procedure
    4. The source code of the Java code that call the Java stored
    procedure
    5. The call spec
    6. Environment
    1.Outline
    I want to pass the XML data to Java stored procedure. But I got
    some errors when the data size is long. The error message I got
    is below.
    [ Error messages and stack trace ]
    java.sql.SQLException: ORA-01460: unimplemented or unreasonable
    conversion reque
    sted
    java.sql.SQLException: ORA-01460: unimplemented or unreasonable
    conversion reque
    sted
    at oracle.jdbc.ttc7.TTIoer.processError(Compiled Code)
    at oracle.jdbc.ttc7.Oall7.receive(Compiled Code)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(Compiled Code)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch
    (TTC7Protocol.java:721
    at oracle.jdbc.driver.OracleStatement.doExecuteOther
    (Compiled Code)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch
    (Compiled Code)
    at oracle.jdbc.driver.OracleStatement.doExecute(Compiled
    Code)
    at
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(Compiled
    Code
    at
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate
    (OraclePrepar
    edStatement.java:256)
    at oracle.jdbc.driver.OraclePreparedStatement.execute
    (OraclePreparedStat
    ement.java:273)
    at javaSp.javaSpTestMain.sample_test
    (javaSpTestMain.java:37)
    at javaSp.javaSpTestMain.main(javaSpTestMain.java:72)
    2. About the data size boundary
    I don|ft know the boundary that I got errors exactly, but I
    found that the boundary will be changed if I use |gprepareCall("
    CALL insertData(?)");|h or |gprepareCall ("begin insertData
    (?); end ;")|h.
    When I use |gprepareCall(" CALL insertData(?)".
    The data size 3931 byte ---&#61664; No Error
    The data size 4045 byte ---&#61664; Error
    Whne I use prepareCall ("begin insertData(?); end ;")
    The data size 32612 byte --&#61664;No Error
    The data size 32692 byte ---&#61664; Error
    3. The source code of the Java stored procedure
    public class javaSpBytesSample {
    public javaSpBytesSample() {
    public static int insertData( byte[] xmlDataBytes ) throws
    SQLException{
    int oraCode =0;
    String xmlData = new String(xmlDataBytes);
    try{
    Connection l_connection; //Database Connection Object
    //parse XML Data
    dits_parser dp = new dits_parser(xmlData);
    //Get data num
    int datanum = dp.getElementNum("name");
    //insesrt the data
    PreparedStatement l_stmt;
    for( int i = 0; i < datanum; i++ ){
    l_stmt = l_connection.prepareStatement("INSERT INTO test
    " +
    "(LPID, NAME, SEX) " +
    "values(?, ?, ?)");
    l_stmt.setString(1,"LIPD_null");
    l_stmt.setString(2,dp.getElemntValueByTagName("name",i));
    l_stmt.setString(3,dp.getElemntValueByTagName("sex",i));
    l_stmt.execute();
    l_stmt.close(); //Close the Statement
    l_stmt = l_connection.prepareStatement("COMMIT"); //
    Commit the changes
    l_stmt.execute();
    l_stmt.close(); //Close the Statement l_stmt.execute
    (); // Execute the Statement
    catch(SQLException e ){
    System.out.println(e.toString());
    return(e.getErrorCode());
    return(oraCode);
    4. The source code of the Java code that call the Java stored
    procedure
    public static void sample_test(int num) {
    //make data
    Patient p = new Patient();
    byte[] xmlData = p.generateXMLData(num);
    try{
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    Connection m_connection = DriverManager.getConnection
    ("jdbc:oracle:thin:@max:1521:test",
    "testuser", "testuser");
    CallableStatement l_stmt =
    // m_connection.prepareCall(" CALL insertData(?)");
    m_connection.prepareCall("begin insertData(?); end
    l_stmt.setBytes(1,xmlData);
    l_stmt.execute();
    l_stmt.close();
    System.out.println("SUCCESS to insert data");
    catch(SQLException e ){
    System.out.println( e.toString());
    e.printStackTrace();
    5. The call spec
    CREATE OR REPLACE PROCEDURE insertData( xmlData IN LONG RAW)
    AS
    LANGUAGE JAVA NAME 'javaSp.javaSpBytesSample.insertData(byte[])';
    6. Environment
    OS: Windows NT 4.0 SP3
    RDBMS: Oracle 8i Enterprise Edition Release 8.1.5.0.0 for
    Windows NT
    JDBC Driver: Oracle JDBC Drivers 8.1.5.0.0.
    JVM: Java1.1.6_Borland ( The test program that call Java stored
    procedure run on this Java VM)
    null

    Iam passing an array of objects from Java to the C
    file. The total size of data that Iam sending is
    around 1GB. I have to load this data into the Shared
    memory after getting it in my C file. Iam working on
    HP-UX (64-bit). Everything works fine for around 400MB
    of data. When I try to send around 500MB of data, the
    disk utilization becomes 100%, so does my memory
    utilization and I get a "Not enough space" when I try
    to access shared memory. I have allocated nearly 2.5GB
    in my SHMMAX variable. Also, I have around 45GB of
    disk free. The JVM heap size is also at 2048MB. Where did you get the 400/500 number from? Is that the size of the file?
    What do you do with the data? Are you doing nothing but copying it byte for byte into shared memory?
    If yes then a simple test is to write a C application that does the same thing. If it has problems then it means you have an environment problem.
    If no then you are probably increasing the size of the data by creating a structure to hold it. How much overhead does that add to the size of the data?

  • How to open external files in a Java stored procedure?

    Hi y'all,
    I'm trying to open an external text file from a Java stored procedure. The java sp has been successfully loaded, resolved, published, etc. in Oracle. I'm using the following statement to try to open the file (enclosed in a try/catch block):
    BufferedReader fileObj = new BufferedReader(new FileReader("fileName.txt"));
    I'm getting a file not found error. Where is Oracle looking (i.e., what directory)?
    Your help is greatly appreciated,
    Gary

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Gary Nool ([email protected]):
    Hi y'all,
    I'm trying to open an external text file from a Java stored procedure. The java sp has been successfully loaded, resolved, published, etc. in Oracle. I'm using the following statement to try to open the file (enclosed in a try/catch block):
    BufferedReader fileObj = new BufferedReader(new FileReader("fileName.txt"));
    I'm getting a file not found error. Where is Oracle looking (i.e., what directory)?
    Your help is greatly appreciated,
    Gary<HR></BLOCKQUOTE>
    Hi Gary,
    you must use a "database directory", e.g:
    SQL>create directory WORKING_DIR as '/home2/common/';
    SQL> select * from all_directories;
    OWNER DIRECTORY_NAME
    DIRECTORY_PATH
    SYS WORKING_DIR
    /home2/common/
    Gert

  • Java Stored Procedure SAXParser XML Schema Validation

    Using Oracle XML Developers Kit 10.2.0.2.0 - Production.
    Attempting to validate using XML Schema in a Java stored procedure with the code:
                   if ( schemaDoc == null )
                        // Obtain default connection
                        Connection conn = new OracleDriver().defaultConnection();
                        OraclePreparedStatement stmt = (OraclePreparedStatement) conn.prepareStatement("SELECT XmlDocObj FROM XmlDoc WHERE XmlDocNbr = 2");
                        OracleResultSet rset = (OracleResultSet)stmt.executeQuery();
                        if ( rset.next() )
                             // get the XMLType
                             XMLType schemaXml = (XMLType)rset.getObject(1);
                             XSDBuilder builder = new XSDBuilder();
                             XMLSchema schemaDoc = (XMLSchema)builder.build(new InputSource(schemaXml.getInputStream()));
                   if ( inst == null )
                        inst = new ValidateCoreRequest();
                   ErrorHandlerImpl handler = inst.getNewErrorHandler();
    SAXParser saxParser = new SAXParser();
    saxParser.setXMLSchema(schemaDoc);
    saxParser.setValidationMode(XMLParser.SCHEMA_VALIDATION);
    saxParser.setErrorHandler(handler);
    saxParser.parse(new InputSource(new StringReader(docStr)));
    if( handler.validationError )
                        errorMsg[0] = handler.saxParseException.getMessage().substring(0, Math.min(199, handler.saxParseException.getMessage().length()));
    Never reports validation errors in the XML. Although the XDK Programmers Guide states "...you can use
    the oracle.xml.parser.schema.XSDBuilder class to build an XML schema and
    then configure the parser to use it by invoking the XMLParser.setXMLSchema()
    method. In this case, the XML parser automatically sets the validation mode to
    SCHEMA_STRICT_VALIDATION and ignores the schemaLocation and
    noNamespaceSchemaLocation attributes." No validation seems to occur. I have tried to set an xsi:noNamespaceSchemaLocation attribute on the root XML node, but this results in URL errors if the URL is not valid or schema build errors if the URL is valid, but does not point to a real location.
    It appears that without a schema location attribute, no schema validation occurs. Using setXMLSchema() with a database source does not seem to cause the schema location attributes to be ignored. At least for Java stored procedures.
    Does XML Schema validation work in the database for externally referenced schemas?
    Thank You,
    Art

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jan Vissers ([email protected]):
    I have two schemas A and B. A contains a java stored procedure which calls a java stored procedure stored in B. Upon resolving the "A" Java Stored Procedures I get the following error:
    ORA-29545: badly formed class: at offset 3093 of Adapter.TFADPBeschikbaarheid.sendAanvraag expecting a class-oracle.xml.parser.v2.XMLDocument but encountered a class-oracle.xml.parser.v2.XMLDocument.
    ... Question:
    it is expecting something which it has in fact encountered... SO!!!! What is the error.
    Thx,
    Jan<HR></BLOCKQUOTE>
    Try this:
    Edit your XSU installation script located on lib directory of Oracle XSU's distribution:
    Find the line:
    loadjava -r -v -u $USER_PASSWORD xmlparserv2.jar
    Replace by:
    loadjava -r -v -g public -u $USER_PASSWORD xmlparserv2.jar
    And installs your Oracle XSU again.
    Best regards, Marcelo.

Maybe you are looking for

  • Image Maps not working in Firefox or IE

    For some reason my Golive 9 submenu image maps (News, Locations, etc.) work in Safari, but not in Firefox or IE. Plus some elements seem scrambled in the two latter browser apps. Here's the web page: http://www.frankparsons.com/express/index.html Why

  • Search capabilities in iCal (Mac OSX v10.7 Lion)

    I've lost the ability to search through my calendars with the "upgrade" to Lion. Does anyone have a solution?

  • High speed usb port?

    I have a older laptop. 5 or 6 years old. When I plug my ipod into the usb port a message pops up saying that this devise could preform faster, if I had a high speed usb port on my computer. Could this be the problem why I cant put songs from itunes o

  • Solution Manager 4.0 install error logging in for DDIC step 29

    Has anyone else seen the error 'Test logon to SAP System <sid> failed"? It states that it cannot login for DDIC. This is at step 29 during the install of the solution manager 4.0. We are running on a Windows 2003 Server/Oracle 10g. Any help would be

  • JDeveloper 11.1.2.3, ADF Faces, JQuery Integration via ADF Library

    I cannot seem to get a consuming application to execute jquery's ready() function defined within a adflib application. Here is my setup directory structure of where my javascript files are: CommonApp -ViewController --public_html ---resources ----js