Java Stored Procedures and Oracle XE

Hi folks,
Does anyone know if Oracle XE supports Java Stored Procedures.
Thanks in advance,
Kris

Unfortunately you misunderstood me. I didn't call Oracle XE crippled, Yes, I did misunderstand. Apologies.
Bottom line - JMS is not extant. JMS and AQ are not quite the same thing.
AQ was developed back in early Oracle8 (8.0) (and possibly the late Oracle 7) days and seems to have been a pure PL/SQL implementation (probably with hooks at the C/C++ DB kernel level). The extensions that link to JMS came later.
Since JMS depends on Java, and since 'Java in the database' is not part of XE by design and well documented, I considered you comment
that JMS is not supported at all in Oracle XE or is at least
severly crippled.to be more than you apparently meant it to be,
AQ is 'supported' but lack of Java Stored Procs causes some limitations here as you have noted, as well as in Oracle Text and interMedia support.
I'd love to see Java in the database for future upgrades to XE.

Similar Messages

  • Java stored procedures and triggers in lite

    Hi
    We are using java stored procedures and java triggers in our application for oracle lite database 5.1.
    We would like to know whether these procedures and triggers are uploaded or associated with tables or not because triggers are not being fired for the tables.
    The question is - how to find the uploaded procedures and triggers in system tables.
    We dont find any tables like (all_objects, user_objects) for this in oracle lite system catalogs given in the documentation.
    thanks in advance
    yugandhar

    I don't have much experience with Lite, but I'm running 9i Personal Edition. Any information about triggers can be found in the "ALL_TRIGGERS" view. You will want to filter out any rows where OWNER = 'SYS' unless you created your triggers as SYS. As for procedures and functions, you can see what you have created in the "ALL_OBJECTS" view where OBJECT_TYPE = 'PROCEDURE' or 'FUNCTION', once again filtering out rows where OWNER = 'SYS'. To see the code of any procedure or function, select substr(text,1,80) from ALL_SOURCE where NAME = 'function name' ORDER BY LINE.
    Hope this helps!

  • Java Stored Procedures and Triggers

    I want to to use Java stored procedures and triggers within the Oracle 11g XE
    So please , someone can help me because i tried but it didn't work
    I don't know where is the problem
    Thanks !!

    WRONG FORUM!
    Welcome to the forum but this forum is for Java JDBC questions and issues. Your question should be posted in the SQL and PL/SQL forum
    PL/SQL
    >
    I want to to use Java stored procedures and triggers within the Oracle 11g XE
    So please , someone can help me because i tried but it didn't work
    I don't know where is the problem
    >
    Mark this question ANSWERED and repost the question in the other forum
    Before you post review the Oracle Database Java Developer's Guide - it shows how to create Java stored procedures and has example code
    http://docs.oracle.com/cd/B28359_01/java.111/b31225/chfive.htm
    And in the new post don't just say "I tried but it didn't work". You need to post the code that you tried and what you mean by "didn't work".
    If you got any exceptions or errors you need to post a copy of the exact message or error that you are getting.

  • Java stored procedures and referencing classes

    We are referencing to some classes/libraries which are not present in the database. In normal java world, you specify the libraries/classes needed to run your piece of code in the CLASSPATH and that forms part of your complete code.
    Can java stored procedures in the database refer to libraries or class files it requires on the file system rather than the database? Is it possible to make this happen?
    Thanks

    pshiva,
    Posting the same question to multiple forums usually doesn't increase your chances of getting an answer, and it just frustrates those wishing to answer you with the result being that any future questions you post may have less chance of being answered -- because of your uncourteous, initial behaviour.
    I have answered your other thread:
    java stored procedures and referencing classes
    In my opinion, that forum (the Database JVM forum) is the most appropriate for your question.
    Good Luck,
    Avi.

  • How to create java stored procedure from oracle(Dastageer)

    how to create java stored procedure from oracle-please help me to create the procedure.

    Hi,
    This forum is exclusively for discussions related to Sun Java Studio Creator. Please post your question in the appropriate forum.
    Thanks,
    RK.

  • URGENT: Java stored procedure on oracle 92 database is not working

    Hi,
    I am having an issue regarding java stored procedures. I have created a java class that uses the bouncycastleprovider ( bcprov-jdk13-141.jar ) to encrypt strings. I tested against the version of the java virtual machine that comes bundled with oracle and it works perfectly. I then used JDeveloper to load the class on the database with the resolve, noverify and order flags checked and it shows no errors but when I try to execute the stored procedure it throws the following exception:
    java.lang.ExceptionInInitializerError:
    java.lang.SecurityException: Cannot set up certs for trusted CAs: java.net.MalformedURLException: no protocol: US_export_policy.jar
    at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
    at javax.crypto.Cipher.a(DashoA6275)
    at javax.crypto.Cipher.getInstance(DashoA6275)
    at RijndaelEnhanced.encrypt(RijndaelEnhanced.java:57)
    at RijndaelEnhanced.encrypt(RijndaelEnhanced.java:73)
    I loaded jce1_2_2.jar, sunjce_provider.jar, bcprov-jdk13-141.jar. Also replaced the US_export_policy.jar, local_policy.jar with the unrestrictive version. I add the security provider dinamically with a call to Security.insertProviderAt(new org.bouncycastle.jce.provider.BouncyCastleProvider(), 2);
    I also did a select on the user_objects table and all the classes are in VALID status.
    When I run my application using the java virtual machine that is located under C:\Oracle\oracli9i\jdk\jre\bin directory it works fine but when I try to execute on the database it won't work. I found a bug that was if the jce1_2_1.jar file existed in the C:\Oracle\oracli9i\jdk\jre\lib\ext directory ( even if it's extension is renamed ) it won't work because the certification file had expired but I don't know if this has anything to do with this error.
    Am I missing something?
    Please I need an urgent solution to this problem.
    Thanks in advance.
    Bruno Oliveira

    SomeoneElse wrote:
    Waaaaahhhhhhh!I was just thinking the same thing.... ya beat me to it...
    To the OP:
    As an up and coming DB Developer who now works for a small tech firm straight outta college, I can tell you for sure that you will definitely not get anywhere in your impatient life... look behind your back you miserable dude, your job might be in danger since ya got a bad attitude AND you can't figure out an error you are getting from a Java SP. So instead of helping you, I am going to simply tell you how you SHOULD act in a community of practice.
    1. Be nice when looking for help
    2. BE NICE WHEN LOOKING FOR HELP!!!
    Pretty simple right?
    Know what else is really simple? Looking at the topics of each board to make sure ya post in the right board! You people disgust me; somehow getting by in your professional career acting the way you do. I sure hope your "online" persona isn't a reflection of your real attitude towards people, almost pathetic and extremely immature.
    Sorry bout the rant, it is Friday, I know :) Didn't get my coffee this morning. Have a good one all!
    -Tim

  • Issue with sending mail through java stored procedure in Oracle

    Hello
    I am using Oracle 9i DB. I created a java stored procedure to send mail using the code given below. The java class works fine standalone. When its run from Java, mail is sent as desired. But when the java stored procedure is called from pl/sql "Must issue a STARTTLS command first" error is thrown. Please let me know if am missing something. Tried the same code in 11.2.0.2 DB and got the same error
    Error:
    javax.mail.MessagingException: 530 5.7.0 Must issue a STARTTLS command first. va6sm31201010igc.6
    Code for creating java stored procedure: (T1 is the table created for debugging)
    ==================================================
    create or replace and compile java source named "MailUtil1" AS
    import java.util.Enumeration;
    import java.util.Properties;
    import javax.mail.Message;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    public class MailUtil1 {
    public static void sendMailwithSTARTTLS(String host, //smtp.projectp.com
    String from, //sender mail id
    String fromPwd,//sender mail pwd
    String port,//587
    String to,//recepient email ids
    String cc,
    String subject,
    String messageBody) {
    try{
    Properties props = System.getProperties();
    props.put("mail.smtp.starttls.enable", "True"); // added this line
    props.put("mail.smtp.host", host);
    props.put("mail.smtp.user", from);
    props.put("mail.smtp.password", fromPwd);
    props.put("mail.smtp.port", port);
    props.put("mail.smtp.auth", "true");
    #sql { insert into t1 (c1) values ('1'||:host)};
    Session session = Session.getDefaultInstance(props, null);
    MimeMessage message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    #sql { insert into t1 (c1) values ('2')};
    InternetAddress[] toAddress = new InternetAddress[1];
    // To get the array of addresses
    for( int i=0; i < toAddress.length; i++ ) { // changed from a while loop
    toAddress[i] = new InternetAddress(to);
    //System.out.println(Message.RecipientType.TO);
    for( int i=0; i < toAddress.length; i++) { // changed from a while loop
    message.addRecipient(Message.RecipientType.TO, toAddress);
    if (cc!=null) {
    InternetAddress [] ccAddress = new InternetAddress[1];
    for(int j=0;j<ccAddress.length;j++){
    ccAddress[j] = new InternetAddress(cc);
    for (int j=0;j<ccAddress.length;j++){
    message.addRecipient(Message.RecipientType.CC, ccAddress[j]);
    message.setSubject(subject);
    message.setText(messageBody);
    message.saveChanges();
    #sql { insert into t1 (c1) values ('3')};
    Enumeration en = message.getAllHeaderLines();
    String token;
    while(en.hasMoreElements()){
    token ="E:"+en.nextElement().toString();
    #sql { insert into t1 (c1) values (:token)};
    token ="ConTyp:"+message.getContentType();
    #sql { insert into t1 (c1) values (:token)};
    token = "Encod:"+message.getEncoding();
    #sql { insert into t1 (c1) values (:token)};
    token = "Con:"+message.getContent();
    #sql { insert into t1 (c1) values (:token)};
    Transport transport = session.getTransport("smtp");
    #sql { insert into t1 (c1) values ('3.1')};
    transport.connect(host, from, fromPwd);
    #sql { insert into t1 (c1) values ('3.2')};
    transport.sendMessage(message, message.getAllRecipients());
    #sql { insert into t1 (c1) values ('3.3')};
    transport.close();
    #sql { insert into t1 (c1) values ('4')};
    catch(Exception e){
    e.printStackTrace();
    String ex= e.toString();
    try{
    #sql { insert into t1 (c1) values (:ex)};
    catch(Exception e1)
    Edited by: user12050615 on Jan 16, 2012 12:18 AM

    Hello,
    Thanks for the reply. Actually I have seen that post before creating this thread. I thought that I could make use of java mail to work around this problem. I created a java class that succesfully sends mail to SSL host. I tried to call this java class from pl-sql through java stored procedure. That did not work
    So, is this not supported in Oracle ? Please note that I have tested this in both 9i and 11g , in both the versions I got the error. You can refer to the code in the above post.
    Thanks
    Srikanth
    Edited by: user12050615 on Jan 16, 2012 12:17 AM

  • Java stored procedure problem(oracle db)

    HI,
    we have a java stored procedure with the following definition, and that works as we want it to:
    CREATE OR REPLACE FUNCTION processBulletin(in_varchar VARCHAR2) RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'JavaParser.Bufr_Ingest.processBulletin(java.lang.String) return java.lang.String';
    And the Java portion:
    public static String processBulletin(String in_bull)
    ... do something with in_bull
    The problem is that we've recently discovered that the 32767 size restiriction on the input parameter varchar2 is too small. I don't want to rewrite the entire Java procedure. I figured the simplest (or at least temporary)solution would be to have the Java procedure accept a CLOB, convert that clob to a string and continue as it would. I was hoping someone might be able to tell me if the following would be possible:
    CREATE OR REPLACE FUNCTION processBulletin(in_clob CLOB) RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'JavaParser.Bufr_Ingest.processBulletin(oracle.sql.CLOB) return java.lang.String';
    And the Java portion:
    public static String processBulletin(oracle.sql.CLOB in_clob)
    String in_bull = clob_in.getSubString(1, (int)clob_in.length());
    ... do something with in_bull
    Thanks

    I don't know about Java stored procedures, but in JDBC you usually use streams to work with CLOBS. Here's Oracle JDBC Developers Guide, Working with LOBs

  • Java stored procedure in Oracle 8i

    Hi,
    I read in the whitepaper of Oracle "Stored Procedure Tutorial", I have a little problem understanding the following syntax in the example enclosed, please help.
    In Java environment the method:
    public static void assignEMailAddress(Connection conn, int eno, String fname, String lname) throws Exception;
    this method take 4 parameters, but when it is public to SQL, the parameter is ignored!
    Is this understood by the DBMS?
    Is this Connection-typed parameter must ALWAYS be the first one in the proceudre list or the procedure list can be in any order?
    The tutorial is given in Oracle 8i, Lite, we will be using the real Entreprise Oracle 8i, does it make any difference in how we should load java stored procedure?
    I really appreciate any help. thanks
    null

    Mapping between Java types and pl/sql types
    can only be done for standard Java datatypes.
    You cannot publish a java procedure accepting a Connection variable to PLSQL.
    Hope this helps.

  • Java Stored Procedures and Sockets

    We need to synchronize data real time b/w Oracle and the legacy HP3000 system.
    For sending data from Oracle to HP3000 we are thinking of using Sockets.
    We dont know whether a socket connection can be established from the Oracle database level or need to be from the OS level(here Linux)
    I heard that Java stored procedures(JSP) can establish socket connection.
    Can someone provide me pointers regarding
    (a) setting up socket connection from the database
    (b) possibility of transferring data via sockets and using jdbc, and how to send data efficiently and if it is wise
    Thanks,
    Vinoj

    I don't have much experience with Lite, but I'm running 9i Personal Edition. Any information about triggers can be found in the "ALL_TRIGGERS" view. You will want to filter out any rows where OWNER = 'SYS' unless you created your triggers as SYS. As for procedures and functions, you can see what you have created in the "ALL_OBJECTS" view where OBJECT_TYPE = 'PROCEDURE' or 'FUNCTION', once again filtering out rows where OWNER = 'SYS'. To see the code of any procedure or function, select substr(text,1,80) from ALL_SOURCE where NAME = 'function name' ORDER BY LINE.
    Hope this helps!

  • Use of Java packages in Java stored procedures? (Oracle 10.2)

    Hi all-
    Does Oracle's Java stored procedures support Java packages? In all the examples I've seen, packages are never used, and when I added one to a test file, it compiled it just fine, but referencing the class from the package itself resulted in a compiling error.
    In other words, it seems to make absolutely no difference if I preface my Java class with
    package com.mycompany.whatever;
    and while I can "import com.mycompany.whatever.MyClass" in another Java file, it seems to not care at all whether I do so or not.
    Thanks for any clarification,
    Ilford

    Hi Ilford:
    Sure you can use fully package notation in your Java classes.
    Look at this Java source code:
    http://dbprism.cvs.sourceforge.net/dbprism/cms-2.1/src/com/prism/cms/core/
    All of them are Java Stored procedures.
    Best regards, Marcelo.

  • JCE Based Java Stored Procedure in Oracle 8i

    I have a Java class which is created based on JCE 1.2.1. I need to call this Java class from PL/SQL. Therefore, I want to create a Java stored procedure based on this Java class. I just read some topics in this forum and it seems that many people are unable to have JCE correctly setup on Oracle8 JVM.
    My question is how to configure the JVM of Oracle8i to use the JCE?
    I am using Oracle 8.1.6 on unix.
    Thanks,

    unfortunately, for JCE to work, you need a fix to OracleJVM that we will be providing in the next major release
    Thanks for your reply.
    The JCE optional package could be installed on SUN's JDK 1.2.x or higher. Since Oracle 8.1.6's JServer support SUN's JDK 1.2.1. Therefore, in theory, JCE could be installed for Oracle 8.1.6 or higher.
    However, the cofiguration of JCE on the JVM requires the modification of Java security policy file. I followed the JCE's installation guide but it did not work on Oracle's JServer.
    My question is: How to install JCE 1.2.1 on Oracle 8.1.6? Is it possible to configure the JVM of Oracle 8.1.x to use JCE? If yes, how?
    Thanks,
    JCE is an optional package even in J2SE 1.3 - it is required in J2SE 1.4
    OracleJVM will be J2SE 1.4 compliant in the nest major release and we plan to support JCE
    I have a Java class which is created based on JCE 1.2.1. I need to call this Java class from PL/SQL. Therefore, I want to create a Java stored procedure based on this Java class. I just read some topics in this forum and it seems that many people are unable to have JCE correctly setup on Oracle8 JVM.
    My question is how to configure the JVM of Oracle8i to use the JCE?
    I am using Oracle 8.1.6 on unix.
    Thanks,

  • Java Stored Proc and Oracle 8.0.6.20?

    Hi,
    I have a customer using Oracle 8.0.6 (on multi-platforms). We'll need to implement a pl/sql which needs to execute an external script.
    My understanding is there are only 2 ways to achieve this: (a) use Java stored procedure, (b) use C/C++ library
    Question 1: Is Java Stored Proc available in 8.0.6?
    Question 2: Is there anywhere I can download Oracle 8.0.6 (Windows, or Tru64, Linux)?
    - Will

    java in the database was introduced from Oracle8i onwards. this version of Oracle does not support java virtual machine in the database.
    You would need to use C/C++ external procedures.

  • Support a singly report on SQL Stored Procedure and Oracle Stored Procedure

    Hi,
    I have a requirement in which I need to create a report that will run both on oracle and sql server.
    Report is designed as follows.
    Main report contain 2 sub-reports.Sub-reports areĀ  based on stored procedure that takes three input parameters(beginDate,endDate and hostname which is a comma-separated string).
    Main report also have three parameters (beginDate,endDate and hostnameList) that I am linking with both sub-reports.
    Since the crystal picks the same name of the parameter as we define in procedure it showing '@' symbol in all the parameters when I change the datasoure from oracle to sql server and that's why sub reports defined in main report loose all the linking and same happens when I switch from sql to oracle since in case of oracle it does not have '@' symbol in variable name.
    How can I have one report that work with both DBs without loosing the links.
    Any help will be appreciated.
    Thanks,
    Amrita

    There is no way of doing this in CR. At least not that I've ever heard of anyway.
    If you REALLY need to make this work and it REALLY has to be just 1 report... Here is what I'd do...
    In the SQL Server database, add a new table that contains the same columns that are being returned by the sp's. If you can't add new tables to the database, use a different database or server...
    Create a Linked Server linking the Oracle db to SQL Server. (If you take the 3rd server rout, do the same with the SQL Server)
    Write a new sp that will accept the {?WhichServer} parameter and populate the new table with the result set.
    Then just query that table for your report.
    I know this probably isn't the rout you were wanting to take but it should work...
    Jason

  • Java stored procedure in oracle spatial

    hi,
    i am getting confuse on this issue. i am using oracle 10g R2 as a dbms. what version of jdk should i use to compile my java program? right now i am using jdk 1.5 but each time i want to create class file, it cannot be loaded succesfully in my database. i try to use -source and -target to 1.4 but there is a conflict version. could anybody explain to me and give me a suggestion. thanks.

    Hi,
    Have you checked this link http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html which mentions all the necessary Oracle Database 10g Release 2 (10.2.0.4) JDBC Drivers. The jar files has classes for use with both jdk 1.4 and 1.5.
    -Priyanka

Maybe you are looking for