Calling class via an Applet, Java stored within database

I don't know if this is the right place to post, but. I'm trying to create an Applet that references a JAVA class stored in the database. My code looks something like this:
<applet code="Hello.class" codebase="http://www.somesite.com/pls/dad/" width="150" height="30"></applet>
Hello.class is stored within a 10g database. The codebase is a vitural url that connects to a schema within the database. Can this be done?? and How??

Look at HttpCallout.java in the following code sample
http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/jwcache/Readme.html
Kuassi

Similar Messages

  • Calling a servlet from a Java Stored Procedure

    Hey,
    I'm trying to call a servlet from a Java Stored Procedure and I get an error.
    When I try to call the JSP-class from a main-method, everything works perfectly.
    Java Stored Procedure:
    public static void callServlet() {
    try {
    String servletURL = "http://127.0.0.1:7001/servletname";
    URL url = new URL(servletURL);
    HttpURLConnection conn = (HttpURLConnection)url.openConnection();
    conn.setDoOutput(true);
    conn.setRequestProperty("Pragma", "no-cache");
    conn.connect();
    ObjectInputStream ois = new ObjectInputStream(conn.getInputStream());
    Integer client = (Integer)ois.readObject();
    ois.close();
    System.out.println(client);
    conn.disconnect();
    } catch (Exception e) {
    e.printStackTrace();
    Servlet:
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    Integer id = new Integer(10);
    OutputStream os = response.getOutputStream();
    ObjectOutputStream oos = new ObjectOutputStream(os);
    oos.writeObject(id);
    oos.flush();
    oos.close();
    response.setStatus(0);
    Grant:
    call dbms_java.grant_permission( 'JAVA_USER', 'SYS:java.net.SocketPermission','localhost', 'resolve');
    call dbms_java.grant_permission( 'JAVA_USER','SYS:java.net.SocketPermission', '127.0.0.1:7001', 'connect,resolve');
    Package:
    CREATE OR REPLACE PACKAGE pck_jsp AS
    PROCEDURE callServlet();
    END pck_jsp;
    CREATE OR REPLACE PACKAGE BODY pck_jsp AS
    PROCEDURE callServlet()
    AS LANGUAGE JAVA
    NAME 'JSP.callServlet()';
    END pck_jsp;
    Architecture:
    AS: BEA WebLogic 8.1.2
    DB: Oracle 9i DB 2.0.4
    Exception:
    java.io.StreamCorruptedException: InputStream does not contain a serialized object
    at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java)
    at java.io.ObjectInputStream.<init>(ObjectInputStream.java)
    The Servlet and the class work together perfectly, only when I make the call from
    within the database things go wrong.
    Can anybody help me.
    Thank in advance,
    Bart Laeremans
    ... Desperately seeking knowledge ...

    Look at HttpCallout.java in the following code sample
    http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/jwcache/Readme.html
    Kuassi

  • Calling a URL from a Java Stored Procedure

    Hi,
    I'm trying to call a URL from a Java Stored Procedure in Oracle 8.1.7(Windows 2000). The ultimate goal is to call this stored procedure from a database trigger. The status of the object remains invalid in the database even after compilation and publishing without any errors. The code follows. Any suggestions/alternatives to accomplish this would be appreciated.
    Java Stored Procedure:
    CREATE OR REPLACE JAVA SOURCE NAMED "UPDATEATTR" AS
    import java.net.*;
    import java.util.*;
    import java.io.*;
    public class UpdateAttr {
    public static String testmain() {
    ObjectInputStream is;
    URL url;
    String uri =
    "http://www.yahoo.com";
    try {
    //calling the URL
    url = new URL(uri);
    URLConnection yahooConnection = yahoo.openConnection();
    } catch (Exception e) {
         e.printStackTrace(System.err);
    return "TEST_SUCCESSFUL";
    Code to Publish it:
    CREATE OR REPLACE FUNCTION setNewAttributes return VARCHAR2
    AS LANGUAGE JAVA NAME
    'UpdateAttr.testmain() return String';
    Thanks in advance.
    Ris

    Small mistake in the previous post. The object still has a status of "INVALID" though. The Java stored procedure should actually read:
    Java Stored Procedure:
    CREATE OR REPLACE JAVA SOURCE NAMED "UPDATEATTR" AS
    import java.net.*;
    import java.util.*;
    import java.io.*;
    public class UpdateAttr {
    public static String testmain() {
    ObjectInputStream is;
    URL url;
    String uri =
    "http://www.yahoo.com";
    try {
    //calling the URL
    URL yahoo = new URL(uri);
    URLConnection yahooConnection = yahoo.openConnection();
    } catch (Exception e) {
    e.printStackTrace(System.err);
    return "TEST_SUCCESSFUL";
    Code to Publish it:
    CREATE OR REPLACE FUNCTION setNewAttributes return
    VARCHAR2
    AS LANGUAGE JAVA NAME
    'UpdateAttr.testmain() return String';
    /

  • 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

  • How to find PL/SQL dependent on Java stored in database

    Is there a way to find out - which JAVA CLASS object a PL/SQL package calls?
    I have a PL/SQL package with a function F. The definition goes like this:
    PACKAGE P
    IS
    FUNCTION F ( n NUMBER )
    RETURN VARCHAR2
    AS
    LANGUAGE JAVA
    NAME 'com.foo.ServiceWrapper.getF(int) return java.lang.String';
    END P;
    And I expected to find the relationship between the JAVA CLASS and the PL/SQL package listed in DBA_DEPENDENCIES:
    SELECT *
    FROM DBA_DEPENDENCIES
    WHERE REFERENCED_TYPE = 'JAVA CLASS'
    AND NAME = 'P';
    But nothing shows up. Do you know, where to look?
    /Jorn

    You can go to the 'Program' 'Executable' Form and enter the search on the shortname. I don't think you have to modify the code though.
    I think you should look at metalink note 281877.1 and probably apply patch 2968357. Or at least modify the offending tablespace default parameters.

  • How to write call specs for a java stored procedure that takes a nested obj

    Example Class :
    public class B {
    int number;
    String str;
    public class A {
    private B[] _childern;
    public B[] getChildern(){
    return _children
    public static void saveAll(A a) throws SQLException {
    B[] children = a.getChildern();
    for(int i=0; i<children.length; i++){
    saveChild(children);
    public static void saveChild(B ch)throws SQLException {
    // do something
    What would be the call specification for the method A.saveAll(A)? Your help will be apprecited.
    Thank you
    Ajmal

    In other words, How to pass a Java Object from a Java stored procedure to a Java client ???
    Hello,
    I don't know to deal with a Vector object that has been generated from a stored procedure.
    Should I create first in the JDBC client and pass it as argument to the procedure ?
    Thanks in advance. Here is an extract ...
    On the client side :
    <<
    Vector buffer = new Vector();
    CallableStatement call =
    con.prepareCall ("{call my_procedure_run (?, ?)}");
    call.registerOutParameter(2, java.sql.Types.JAVA_OBJECT );
    call.setString (1, "bla bla bla");
    call.setObject (2, buffer);
    call.execute ();
    buffer = (Vector)call.getObject (2);
    >On the Java stored procedure
    <<
    public class my_procedure
    public static void Run(String input_value, Vector buffer)
    // ??? Vector buffer = new Vector();
    try
    while ( true )
    buffer.addElement(...) ;
    catch(Exception ex) { }

  • Is it possible to use iFS API within java stored procedure?

    question:
    is it possible to use the iFS API for file handling
    within a java stored procedure (which is invoced by a trigger)?
    is there an "elegant" workaround if it is not possible?
    problem:
    my java code using the iFS API works fine outside
    the java stored procedure
    but invoked via trigger as java stored procedure
    it throws following exception:
    IFS-20102: Unable to start service (IfsDefault)
    i am using:
    oracle 9.0.1
    oracle internet file system 9.0.1.1.0
    windows 2000
    thanks

    thanks for your help
    i looked through the applications developers guide
    the basics behind advanced queueing (as far as i understand) is:
    program A inserts a message into the queue - and program B gets message from the queue and processes it
    question 1:
    but what is the difference between advanced queuing and a queue i create by myself
    (simply with a database table) and let application B (which runs in a loop)
    check if the queue is filled
    or am i missing something important which makes advanced queuing more practicable for my problem?
    question 2:
    you wrote about advanced queuing support in iFS 9.0.3, but the newest version i found was iFS 9.0.2
    did you reffer to the advanced queuing mechanism in general or to a spezial queuing feature in iFS 9.0.3?
    thanks

  • How can I implement the connection pool in my java stored procedure

    my java stored procedures (in database 'B') have to connect to another oracle database ,let's say 'A'. And how can I implement the behavior like the so-called connection pool in my java stored procedure in 'B', as below.
    1. database B, has 2 java stored procedures sp1 and sp2
    2. both sp1 and sp2 connects to databse 'A'
    whatever I call the sp1 and sp2 and the database 'A' always only one connected session from sp1 and sp2 in database 'B'.
    THANKS A LOTS...

    my problem is I have a lots of java stored procedures need to cnnect to the remote oracle db, and I hope the remote db can only have a connected session from my java stored procedures in my local db. I try as below
    class sp{
    static Connection conn=null; //the remote db connection,
    public static void sp1(){...}//procedure 1, using conn
    public static void sp2(){...}//procedure 2, using conn,too
    I can 'see' the 'conn' variable if I invoke the sp1() and sp2() from the same client application(maybe sqlplus). But if I invoke the sp1() from client 'A' and invoke sp2() from client 'B' then the sp1() and sp2() can not see the 'conn' variable for each other. I think it's because the two clients cause oracle to create two instances of the class 'sp' and the sp1() and sp2() located in different instance seperately. Thus the sp1() and sp2() can not see 'conn' for each other. They can only see its own 'conn'.
    To connect to the remote db from the java stored procedure is easy but is it possible to connect to the remote db via database link from the java stored procedure at my local db ? If so, then I also archive my goal .
    BTW , thanks a lots...
    andrew :-)

  • Java Stored Procedure in EXECUTE IMMEDIATE

    Hi,
    I need advice for the following.
    I'm on Oracle 11g R2. I'm testing application in Oracle 11gR1 and R2 and Oracle Express.
    Purpose is to generate XML reports.
    I have PLSQL Stored Procedure which does that, but since there is bug in Oracle11gR2 related to XMLTRANSFORM I have and Java Stored Procedure which is workaround. They are both compiled, valid etc.
    Java class is :
    import java.io.PrintWriter;
    import java.io.Writer;
    import oracle.xml.parser.v2.DOMParser;
    import oracle.xml.parser.v2.XMLDocument;
    import oracle.xml.parser.v2.XSLProcessor;
    import oracle.xml.parser.v2.XSLStylesheet;
    * This class is used as Java stored procedure
    * There is a bug on Oracle11gR2, related to the limitation on the number of style sheet instructions
    * This stored procedure is workaround when PLSQL code can not be used.
    * File must not have package, otherwise is wrongly compiled in DB
    public class JavaXslt {
         public static void XMLTtransform(oracle.sql.CLOB xmlInput,oracle.sql.CLOB xslInput,oracle.sql.CLOB output) throws Exception{
              DOMParser parser;
              XMLDocument xml;
              XMLDocument xsldoc;
              try{
                   parser = new DOMParser();
                   parser.parse(xmlInput.getCharacterStream());
                   xml = parser.getDocument();
                   parser.parse(xslInput.getCharacterStream());
                   xsldoc = parser.getDocument();
                   XSLProcessor processor = new XSLProcessor();
                   XSLStylesheet xsl = processor.newXSLStylesheet(xsldoc);
                   Writer w = output.setCharacterStream(1L);
                   PrintWriter pw = new PrintWriter(w);
                   processor.processXSL(xsl, xml, pw);
              }catch (Exception ex){
                   throw ex;
    PROCEDURE Java_XmlTransform (xml CLOB, xslt CLOB, output CLOB) AS LANGUAGE JAVA
    NAME 'JavaXslt.XMLTtransform(oracle.sql.CLOB, oracle.sql.CLOB, oracle.sql.CLOB)';
    I'm calling Java stored procedure from PLSQL Stored procedure (if it is Oracle11gR2) like that :
    Java_Proc.Java_XmlTransform(inputXML, xslt, res);
    So till here everything works ok. XSLT as applied and output XML (res) is OK.
    But when Oracle Express is used Java is out of the question, so there is no Java stored procedure. Howewer PLSQL Stored procedure is still needed.
    So I had to put call to Java Stored procedure in EXECUTE IMMEDIATE statement in order to compile to PLSQL package.
    But when I do that :
    EXECUTE IMMEDIATE 'BEGIN Java_Proc.Java_XmlTransform (:1, :2, :3); END;' USING inputXML, xslt, res;
    result value CLOB (res) has zero length...
    What am I missing? Should i set return value to Java class?
    Hope my explanations are clear though.
    Thanks

    Hi odie_63,
    Thanks for quick response.
    I didn't clearly explained.
    When using Oracle 11gR1 and Oracle Express I'm using only PLSQL Procedure.
    When using Oracle 11gR2 i have to use Java Stored procedure because there is documented bug in R2.
    That's why i have to use EXECUTE IMMEDIATE. I don't know which version is the client DB and whether there is or no Java procedures.
    I did tried
    EXECUTE IMMEDIATE 'BEGIN Java_Proc.Java_XmlTransform (:1, :2, :3); END;' USING IN inputXML, IN xslt, OUT res; and the result was ORA-06537: OUT bind variable bound to an IN position
    When using IN OUT for last parameter i.e.
    EXECUTE IMMEDIATE 'BEGIN Java_Proc.Java_XmlTransform (:1, :2, :3); END;' USING IN inputXML, IN xslt, IN OUT res;
    there is no exception, but still DBMS_LOB.getlength(res) = 0
    Thanks

  • How to debug noclassdeferror from java stored procedure.

    Hi,
    I am making use of OracleSoapHttpConnection class to call a webservice from a java stored procedure. I used loadjava to load the soap.jar, everything loaded without any error. We can see the "OracleSoapHTTPConnection" class loaded in the all_objects table, still during runtime we get noclassdeferror. I am not sure on how to set classpath for oracle database jvm.
    Many Thanks.
    Chandana

    Please don't post duplicate messages in the forum. You're just cluttering up the place. How to resolve a noclassdeferror for OracleSoapHttpConnection class
    Cheers, APC

  • System Call via Java Stored Procedure?

    Within a Java stored procedure I do
    a FTP Call to a remote Server.
    The running FTP Process belongs to
    the Oracle System User (Operating System: Linux).
    Is there a possibility to run that FTP
    call with a different operating system
    user?

    another example of invoking a Java Stored Prodedure from WITHIN a PL/SQL function? What's the issue here? A java stored procedure is a java class wrapped in PL/SQL. Consequently the invocation from with PL/SQL is a straightforward PL/SQL call.
    So what is it that is troubling you?
    Cheers, APC

  • Is there an easy way to call a java class from an applet?

    Does anyone know of an easy way to call a server based java class from an applet? Has anyone done it or came across it? If yes how/where?
    Cheers, Chris.

    I'm not sure about the issue. Are you talking about "servelets"? "RMI"? Take a look at those issues.

  • Calling the Java Method in PL/SQL Java Stored procedure errors out

    Hi,
    I could not find a suitable thread to post my PL/SQL question so iam posting it here.........
    I have written a java class by name XYZ which has a method ABC for which there are 9 arguements being passed and its a VOID method.
    This java class has been loaded into ORACLE using DBMS_JAVA.LOADJAVA pkg, Now this class is being called in the oracle as a JAVA Stored procedure...... When ever im trying to call the procedure it throws the following error
    ORA-29531: no method
    *Cause:    An attempt was made to execute a non-existent method in a
    Java class.
    *Action:   Adjust the call or create the specified method.
    The code snippet as follows
    JAVA CODE:
    Class xyz
    public static void Abc (String hostName,
    int port,
    String serviceURL,
    String soapAction,
    int timeOut,
    String wsUser,
    String wsPasWd,
    String keyStore,
    String keyStorePasWd)
    //method implementation
    JAVA STORED PROCEDURE:
    create OR REPLACE procedure ABC_JAVA_SP_CALL
    (p_hostname in varchar2, p_port in number, p_serviceurl in varchar2, p_soapaction in varchar2, p_timeout in number, p_wsuser in varchar2, p_wspasswd in varchar2, p_ks_path in varchar2, p_ks_passwd in varchar2)
    as
    language java
    name 'xyz.Abc(java.lang.String, int, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String)';
    When i try to call
    declare
    p_hostname varchar2(100);
    p_port number;
    p_serviceurl varchar2(100);
    p_soapaction varchar2(100);
    p_timeout number;
    p_wsuser varchar2(100);
    p_wspasswd varchar2(100);
    p_ks_path varchar2(100);
    p_ks_passwd varchar2(100);
    begin
    //SP which returns the values for the required parameters.
    comppkg.getvcsinfo(
    p_hostname,
    p_port ,
    p_serviceurl,
    p_soapaction,
    p_timeout,
    p_wsuser,
    p_wspasswd,
    p_ks_path,
    p_ks_passwd
    Layer7_icengc_ws_tes(p_hostname,
    p_port ,
    p_serviceurl,
    p_soapaction,
    p_timeout,
    p_wsuser,
    p_wspasswd,
    p_ks_path,
    p_ks_passwd);
    end;
    This thing ends up with
    29531. 00000 - "no method %s in class %s"
    *Cause:    An attempt was made to execute a non-existent method in a
    Java class.
    *Action:   Adjust the call or create the specified method.
    Im not understanding what wrong am i doing
    pls help
    Edited by: madhusudan on Feb 12, 2013 8:07 PM

    Hello,
    there is the forum {forum:id=65} for questions about using Java within Oracle.
    Regards
    Marcus
    Edited by: Marwim on 13.02.2013 07:56
    I could not find a suitable thread to post my PL/SQL question so iam posting it here.........You got the hint to the correct forum alread in another thread {message:id=10837976}
    And if you think this is not related to Java but PL/SQL, then you should ask in {forum:id=75}

  • 21700 while calling java stored procedure in 9i

    I create a java stored procedure that takes a varray of a rowtype. When I call that procedure, I get an ora-21700. If I remove the varray from the parameter list, I can call the procedure okay. My goal is to create a generic java procedure that can take a rowtype from any table and create XML. Once I get the oracle.sql.ARRAY into my code, I am okay. I just can't seem to pass it in. I have pasted my code below:
    Java:
    import oracle.sql.*;
    public class test {
    public static String sayHello() {
    return("Hello, World!");
    public static void genXML(oracle.sql.ARRAY a, oracle.sql.CLOB c) throws Exce
    ption {
    c.putString(1,"<test>This is a test!</test>");
    PL/SQL:
    create or replace package mike is
    type dummy_record is varray (1) of dummy%rowtype;
    PROCEDURE GENERATE_XML(i dummy_record, c CLOB);
    FUNCTION SAYHELLO RETURN varchar2;
    end mike;
    show errors
    create or replace package body mike is
    PROCEDURE GENERATE_XML(i dummy_record,c CLOB)
    AS LANGUAGE JAVA
    NAME 'test.genXML(oracle.sql.ARRAY,oracle.sql.CLOB)';
    FUNCTION SAYHELLO RETURN varchar2
    AS LANGUAGE JAVA
    NAME 'test.sayHello() return java.lang.String';
    end mike;
    show errors
    DDL:
    SQL> describe dummy
    Name Null? Type
    USERNAME VARCHAR2(20)
    ID NUMBER
    Test Script:
    declare
    m Mike.dummy_record := Mike.DUMMY_RECORD();
    c CLOB;
    begin
    m.extend;
    select xml into c from t_clob;
    for rec in (select * from dummy)
    LOOP
    m(1) :=rec;
    mike.generate_xml(m,c);
    end loop;
    end;
    And finally, the output:
    declare
    ERROR at line 1:
    ORA-21700: object does not exist or is marked for delete
    ORA-06512: at "MMANGINO.MIKE", line 0
    ORA-06512: at line 10
    Sorry this post is so long, but I wanted it to be complete!
    Mike

    The first solution is to not do that in java in the first place.
    DDL should be in script files which are applied to oracle outside of java.
    Other than I believe there are some existing stored procedures in Oracle that take DDL strings and process them. Your user has to have permission of course. You can track them down via the documentation.

  • Can you make an SSL (https) call from a Java Stored Procedure?

    I have loaded a bunch of java classes. Ultimately, one of my routines makes an
    https call to another machine (https://machine:443/foo?xml...). I am receiving
    the following error message:
    SSL implementation not available
    I read
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_
    id=NOT&p_id=103051.1
    Which states
    3.17.6 You can not do SSL callouts from within 8i to other CORBA or EJBs. This
    also means that you can not callback with an SSL connection a CORBA object
    running in an 8i client.
    Does this mean that I can't do what I am trying to do from within 8.1.7?
    If there is any way to do this, I would really appreciate the advice. I need
    to call this Java API from a pl/sql routine, and it has to be via SSL. I would
    prefer to load all the Java into the database and avoid an exproc call.

    Anton/Joe,
    Yes, you can do this, but it might not be straightforward based on the version of Oracle you have. I've noticed there's a higher chance of getting this to work with 8.1.7 or higher (otherwise, you may need to load more classes, etc.). Mark Piermarini posted a nice example in a previous thread in this group:
    http://osi.oracle.com/~mbpierma/SSL_Java_DB.html
    Basically, he connected to UPS to get package tracking info.
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

Maybe you are looking for