About Oracle JVM

I am running Oracle 10g Standard Edition on a Fedora Core 2 machine.
In the first connection after startup, It work with Java Stored Procedures and DBMS_JAVA perfectly.
But in other connection afterward, Java Stored Procedures and DBMS_JAVA will cause an ORA-07445 and disconnect.
My database is running under dedicated Server Mode.
db01_ora_5006.trc
ksedmp: internal or fatal error
ORA-07445: exception encountered: core dump [joe_well_known_internal()+39] [SIGSEGV] [Address not mapped to object] [0x13F7D5C] [] []
Current SQL statement for this session:
select dbms_java.handleMd5('///',29) from dual
How can I solve this ??

I have try Server Server Mode, only work on for first statement. It seems only working on the first share server.

Similar Messages

  • How do I avoid re-entrant problems in Oracle JVM

    I have a Java program called LanguageFunctions. This Java program has several methods that translate the data within a String or CLOB. I want to use this Java program as a stored procedure, and specifically the methods as Oracle functions. I want this function to be accessed simultaneously without either re-entrant, lock or performance concerns. I want to be able to use the functions something like this:
    SELECT TO_CHINESE(VARCHARCOL1) FROM DUAL;
    SELECT TO_FINISH(CLOBCOL1) FROM DUAL;
    I am having trouble understanding the Java requirements for these methods. I am greatly concerned about multi-user usage and issues with re-entrant code. Does this have to be a static class? If not, how when and where does it get instantiated (I hope not for every invocation of the function)? How to I avoid having one user accidentally changing the data within the method when executed in parallel?
    BTW: I have successfully moved these into the Oracle JVM, and executed them as a single user. My main concern is the re-entrant code issues.
    Thanks

    Thanks for the reply, I meant no disrespect, I was just trying to be a little funny...
    I did read that any method that you want to use as an Oracle function must be static. So I understand that as a given. However, the class I am converting uses static Class variables. You can see this in the example as the textOut variable.
    When two users are accessing this function in parallel, I could see the following series of events ocurring, and it is my concern. There is only one textOut, and I believe it can be modifed by both functions simultanesouly with unexpected results. I'm assuming my for loop is set to x < 2.
    SessionA issues: SELECT TO_DANISH('HELLO') FROM DUAL;
       A --> textOut = ""
       A --> textOut = "HELLO"
       A --> textOut = "HELLOxy"
       A --> textOut = "HELLOxyxy"
    SessionB issues: SELECT TO_DANISH('GOODBYE') FROM DUAL;
       B --> textOut = ""
       A --> textOut = "xy"
       B --> textOut = "GOODBYE"
       A --> textOut = "GOODBYExy"
    Session A returns: "GOODBYExy"     (expected "HELLOxyxy")
       B --> textOut = "GOODBYExyxy"
       B --> textOut = "GOODBYExyxyxy"
    Session B returns: "GOODBYExyxyxy" (expected "GOODBYExyxy")I'm I correct in my assumption that this is an issue? If so, what type of programm architecture would be best to use to manage this? I've tried to provide a simple working example of the issue, but the program that I'm working on actually alters the contents of textOut (as a static Class variable) in 5 or 6 different methods, including one method using recursion. I know I may need to make changes to the program architecture to make it work properly in a multi-user environment as an Oracle function. I'm just a little confused on what the appropriate architecture is. Once again any help is appreciated!
    Joel

  • Oracle JVM 6u21 and Eclipse

    If you have been experiencing Eclipse crashes since updating to Sun/Oracle JVM 6u21 (aka 1.6.0_21), head over to the following blog post to read about a workaround...
    http://lt-rider.blogspot.com/2010/07/oracle-jvm-6u21-and-eclipse.html
    - Konstantin

    Oracle has produced another build of 6u21 JVM that reverts the change that adversely affected Eclipse. If you have reverted back to an older JVM, you can safely move forward to 6u21. The build 1.6.0_21-b07 is safe to use. The version that Eclipse has trouble with is b06. You can check which version you have by running "java -version".
    - Konstantin

  • Oracle JVM and Operating System JVM different?

    Are Oracle JVM and Operating System JVM different?
    For applying the DST patches if JVM is updated from OS patches do we need to apply any other jvm patches again?

    Hi,
    Yes, the OracleJVM is embedded in the RDBMS kernel and does not share any reference/components with the JDK (i.e., OS JVM); fwiw, you can learn more about OracleJVM (archtecture, memory management, security, threading, performance) in chapter two of my book.
    Regarding the DST patch, there is an RDBMS patch that should cover OracleJVM as well; Re: How to verify if the DST patch applied correctly or not.
    Kuassi http://db360.blogspot.com

  • Difference between upgrdae and migration about oracle database

    Difference between upgrdae and migration about oracle database
    please give the comments

    Well, the question is almost philosophic...<br>
    In 9i, there is a Migration Guide whereas in 10g there is a Upgrade Guide.<br>
    Furthermore, in 9i, there is the command line startup migrate whereas in 10g that's startup upgrade.
    Somebody think upgrade when go to new release, and migration when go to new version.<br>
    Others think upgrade when new version replace database in place, and migration when new version include a move of database.<br>
    Another point of view is : upgrade is for technical, and migration for application/data.<br>
    <br>
    Well, after these explanations, your upgrade/migratation notion will not be more clear, but I think that is not very important, only a terminology game. The most important is to know what you need : new version or new release.<br>
    <br>
    Nicolas.

  • File read/write in Oracle JVM

    Are there any known issues around file read/write in Oracle JVM. I finally got around the issue of getting the error that says no permission is there by giving <<ALL FILES>> option, but still I don't see a file being created. Any help is appreciated.
    Code:
    try{
    fwriter = new PrintWriter(new FileOutputStream("debugLog.txt",true));
    } catch (IOException ioe) {
    System.err.println("IO Exception for Output File" + ioe.getMessage());
    Thanks.
    -Mujib

    A couple of suggestions:
    1. (Please don't be offended...) I assume you have some stuff like:
    fwriter.println("hello");
    fwriter.flush();
    fwriter.close();
    in your try block?
    2. Try catching FileNotFoundException and SecurityException also.
    3. Try providing a full path on the file just to make sure it's not buried somewhere odd.
    John H.

  • ORACLE JVM (8.1.5 - 9.0.1)를 수동으로 설치하기

    제품 : ORACLE SERVER
    작성날짜 : 2002-09-27
    Oracle JVM (8.1.5 - 9.0.1)를 수동으로 설치하기
    ==============================================
    Purpose
    v 8.1.5, 8.1.6, 8.1.7 and 9.0.1에서 Oracle JVM의 모든 구성 요소
    를 설치하기 위해 실행해야 하는 sql script들을 설명하고,
    JVM이 성공적으로 설치되었는지 test program으로 확인해 봅니다.
    주의 : 이 script들은 반드시
    SYS 또는 INTERNAL 로 실행되어야만 합니다.
    'initjvm.sql' script는 JVM을 설치하기위해 필요합니다.
    그리고 그 외에 추가되는 script들은 각각에 설명된 추가적인
    기능을위해 실행되어야 하는 script들입니다.
    ("--"표시로 주석 처리가 되어 있습니다.)
    설치에 앞서 점검해야 할 사항
    다음은 권장되는 사항입니다.
    SHARED_POOL_SIZE >= 65 MB
    JAVA_POOL_SIZE >= 50 MB
    SYSTEM tablespace내에 50 MB 이상의 free space
    250 MB 이상의 rollback segment space
    주의 : 위 사항이 만족되지 않거나 부족한 경우 다음 에러가 발생하거나
    script실행 도중 hang이 걸릴 수 있습니다.
    ORA-3113 : end-of-file on communication channel
    ORA-4030 : out of process memory when trying to allocate %s bytes
    ORA-4031 : unable to allocate bytes of shared memory
    Explanation
    Oracle JVM을 수동으로 설치하기
    JVM version 8.1.5를 위한 script
    initjvm.sql 만 실행해 주면 됩니다.
    -------- Script jvm_install_815.sql start ------------------
    -- Setup a database for running Java and the ORB
    spool initjvm.log
    start @$ORACLE_HOME/javavm/install/initjvm.sql
    spool off
    -------- Script jvm_install_815.sql end ------------------
    JVM version 8.1.6를 위한 script
    -------- Script jvm_install_816.sql start ------------------
    -- Setup a database for running Java and the ORB
    spool initjvm.log
    start @$ORACLE_HOME/javavm/install/initjvm.sql
    spool off
    -- Initializes Java library needed by PL/SQL
    spool initplsj.log
    start @$ORACLE_HOME/rdbms/admin/initplsj.sql
    spool off
    -- Load AQ/JMS jar files into the database
    spool initaqjms.log
    start @$ORACLE_HOME/rdbms/admin/initaqjms.sql
    spool off
    -- Load RepAPI server classes and publish 'repapi' obj
    spool initrepapi.log
    start @$ORACLE_HOME/rdbms/admin/initrepapi.sql
    spool off
    -------- Script jvm_install_816.sql end ------------------
    Scripts needed for JVM version 8.1.7
    8.1.7에는 새로운 Java API와 component들이 추가되어
    수행해야 하는 script들이 더 많습니다.
    -------- Script jvm_install_817.sql start ------------------
    -- Setup a database for running Java and the ORB
    spool jvminst.log
    start @$ORACLE_HOME/javavm/install/initjvm.sql
    spool off
    -- Loads xml components into the JServer
    spool initxml.log
    start @$ORACLE_HOME/oracore/admin/initxml.sql
    spool off
    -- loads the XMLSQL Utility (XSU) into the database
    spool catxsu.log
    start @$ORACLE_HOME/rdbms/admin/catxsu.sql
    spool off
    -- JIS (OSE) installation
    spool init_jis.log
    start @$ORACLE_HOME/javavm/install/init_jis.sql
    spool off
    -- Turn on JAccelerator (ncomp) for JIS
    spool jisja.log
    start @$ORACLE_HOME/javavm/install/jisja.sql
    spool off
    -- Adds the set of default end points to the server
    -- with hardcoded values for the admin service
    spool jisaephc.log
    start @$ORACLE_HOME/javavm/install/jisaephc.sql
    spool off
    -- Load PLSQL Gateway Servlet jar files into the database
    spool initplgs.log
    start @$ORACLE_HOME/rdbms/admin/initplgs.sql
    spool off
    -- Install Oracle JSP
    spool initjsp.log
    start @$ORACLE_HOME/jsp/install/initjsp.sql
    spool off
    -- Turn on JAccelerator for JSP libs
    spool jspja.log
    start @$ORACLE_HOME/jsp/install/jspja.sql
    spool off
    -- Initializes Java library needed by PL/SQL
    spool initplsj.log
    start @$ORACLE_HOME/rdbms/admin/initplsj.sql
    spool off
    -- Load AQ/JMS jar files into the database
    spool initjms.log
    start @$ORACLE_HOME/rdbms/admin/initjms.sql
    spool off
    -- Load RepAPI server classes and publish 'repapi' obj
    spool initrepapi.log
    start @$ORACLE_HOME/rdbms/admin/initrepapi.sql
    spool off
    -- loads sql, objects, extensibility and xml related java
    spool initsoxx.log
    start @$ORACLE_HOME/rdbms/admin/initsoxx.sql
    spool off
    -- Configure OSE defauls admin Web Service
    spool jisaep.log
    start @$ORACLE_HOME/javavm/install/jisaep admin 8080 9090
    spool off
    -------- Script jvm_install_817.sql end ------------------
    JVM version 9.0.1 을 설치하기 위한 script
    Using the database configuration assistant, follwoing scripts will be
    executed:
    -- Setup a database for running Java and the ORB
    SQL>@$ORACLE_HOME/javavm/install/initjvm.sql;
    -- INITialize (load) XML components in JServer
    SQL>@$ORACLE_HOME/xdk/admin/initxml.sql;
    -- Loads NCOMP'ed XML Parser
    SQL>@$ORACLE_HOME/xdk/admin/xmlja.sql;
    -- loads the XMLSQL Utility (XSU) into the database.
    SQL>@$ORACLE_HOME/rdbms/admin/catxsu.sql;
    -- install the Oracle Servlet Engine (OSE)
    SQL>@$ORACLE_HOME/javavm/install/init_jis.sql <$ORACLE_HOME>;
    -- Adds the set of default end points to the server
    -- with hardcoded values for the admin service
    SQL>@$ORACLE_HOME/javavm/install/jisaephc.sql <$ORACLE_HOME>;
    -- turn on J Accelerator
    SQL>@$ORACLE_HOME/javavm/install/jisja.sql <$ORACLE_HOME>;
    -- register EJB/Corba Dynamic Registration Endpoint
    SQL>@$ORACLE_HOME/javavm/install/jisdr.sql 2481 2482;
    -- init Java server pages @$ORACLE_HOME@$ORACLE_HOME@$ORACLE_HOME
    SQL>@$ORACLE_HOME/jsp/install/initjsp.sql;
    -- turn on J Accelerator for JSP libs
    SQL>@$ORACLE_HOME/jsp/install/jspja.sql;
    -- script used to load AQ/JMS jar files into the database
    SQL>@$ORACLE_HOME/rdbms/admin/initjms.sql;
    -- load RepAPI server classes and publish 'repapi' obj
    SQL>@$ORACLE_HOME/rdbms/admin/initrapi.sql;
    -- loads sql, objects, extensibility and xml related java
    SQL>@$ORACLE_HOME/rdbms/admin/initsoxx.sql;
    -- Loads appctxapi.jar for JavaVm enabled Database.Called by jcoreini.tsc
    SQL>@$ORACLE_HOME/rdbms/admin/initapcx.sql;
    -- script used to load CDC jar files into the database
    SQL>@$ORACLE_HOME/rdbms/admin/initcdc.sql;
    -- Loads the Java stored procedures as required by the
    -- Summary Advisor.
    SQL>@$ORACLE_HOME/rdbms/admin/initqsma.sql;
    --Initialize sqlj type feature in 9i db
    SQL>@$ORACLE_HOME/rdbms/admin/initsjty.sql;
    --load java componenets for AQ HTTP Propagation
    SQL>@$ORACLE_HOME/rdbms/admin/initaqhp.sql;
    Test program으로 JVM test해보기
    Java Stored Procedure 만들기
    다음과 같은 순서로 Java Stored Procedure를 만들어 봅니다.
    1. Java program을 만듭니다.
    2. program을 database로 loading합니다.
    3. Java program을 SQL (PL/SQL Wrapper)로 publish합니다.
    4. SQL 또는 PL/SQL에서 만든 Java program을 호출합니다.
    Step 1: Java program을 만듭니다.
    ======
    EchoInput.java
    public class EchoInput {
    public static void main (String[] args){
    for (int i=0; i<args.length;i++)
    System.out.println(args);}}
    Step 2: program을 database로 loading합니다.
    ======
    UNIX prompt상에서 다음을 실행합니다:
    % loadjava -u scott/tiger -v -r EchoInput.java
    또는 SQL*Plus에서는 다음과 같이 할 수도 있습니다:
    CREATE OR REPLACE JAVA SOURCE NAMED "EchoInput" AS
    public class EchoInput { public static void main (String[] args) {
    for (int i=0; i<args.length;i++) System.out.println(args[i]);}}
    Step 3: Java program을 SQL (PL/SQL Wrapper)로 publish합니다.
    ======
    SQL 또는 PL/SQL에서 만든 Java program을 호출하기 위해서는
    Java program을 SQL (PL/SQL Wrapper)로 publish해야 합니다.
    이과정을 PL/SQL Wrapper를 만든다고도 합니다.
    일단 published/wrapped가 되면 SQL 또는 PL/SQL을 통해 호출될 수
    있습니다.
    예제 :
    create or replace procedure echo_input (
    s1 varchar2, s2 varchar2, s3 varchar2)
    as language Java
    name 'EchoInput.main(java.lang.String[])';
    Step 4: SQL 또는 PL/SQL에서 만든 Java program을 호출합니다.
    ======
    call dbms_java.set_output(5000);
    call echo_input('It', 'works', 'now!');
    주의 : SQL*Plus에서 실행할 경우 먼저 'set serveroutput on'을
    해주시기 바랍니다.
    결과 화면
    SQL> set serveroutput on
    SQL> call dbms_java.set_output(5000);
    Call completed.
    SQL> call echo_input('It', 'works', 'now!');
    It
    works
    now!
    Call completed.
    SQL>
    Example
    Reference Documents

    제품 : ORACLE SERVER
    작성날짜 : 2002-09-27
    Oracle JVM (8.1.5 - 9.0.1)를 수동으로 설치하기
    ==============================================
    Purpose
    v 8.1.5, 8.1.6, 8.1.7 and 9.0.1에서 Oracle JVM의 모든 구성 요소
    를 설치하기 위해 실행해야 하는 sql script들을 설명하고,
    JVM이 성공적으로 설치되었는지 test program으로 확인해 봅니다.
    주의 : 이 script들은 반드시
    SYS 또는 INTERNAL 로 실행되어야만 합니다.
    'initjvm.sql' script는 JVM을 설치하기위해 필요합니다.
    그리고 그 외에 추가되는 script들은 각각에 설명된 추가적인
    기능을위해 실행되어야 하는 script들입니다.
    ("--"표시로 주석 처리가 되어 있습니다.)
    설치에 앞서 점검해야 할 사항
    다음은 권장되는 사항입니다.
    SHARED_POOL_SIZE >= 65 MB
    JAVA_POOL_SIZE >= 50 MB
    SYSTEM tablespace내에 50 MB 이상의 free space
    250 MB 이상의 rollback segment space
    주의 : 위 사항이 만족되지 않거나 부족한 경우 다음 에러가 발생하거나
    script실행 도중 hang이 걸릴 수 있습니다.
    ORA-3113 : end-of-file on communication channel
    ORA-4030 : out of process memory when trying to allocate %s bytes
    ORA-4031 : unable to allocate bytes of shared memory
    Explanation
    Oracle JVM을 수동으로 설치하기
    JVM version 8.1.5를 위한 script
    initjvm.sql 만 실행해 주면 됩니다.
    -------- Script jvm_install_815.sql start ------------------
    -- Setup a database for running Java and the ORB
    spool initjvm.log
    start @$ORACLE_HOME/javavm/install/initjvm.sql
    spool off
    -------- Script jvm_install_815.sql end ------------------
    JVM version 8.1.6를 위한 script
    -------- Script jvm_install_816.sql start ------------------
    -- Setup a database for running Java and the ORB
    spool initjvm.log
    start @$ORACLE_HOME/javavm/install/initjvm.sql
    spool off
    -- Initializes Java library needed by PL/SQL
    spool initplsj.log
    start @$ORACLE_HOME/rdbms/admin/initplsj.sql
    spool off
    -- Load AQ/JMS jar files into the database
    spool initaqjms.log
    start @$ORACLE_HOME/rdbms/admin/initaqjms.sql
    spool off
    -- Load RepAPI server classes and publish 'repapi' obj
    spool initrepapi.log
    start @$ORACLE_HOME/rdbms/admin/initrepapi.sql
    spool off
    -------- Script jvm_install_816.sql end ------------------
    Scripts needed for JVM version 8.1.7
    8.1.7에는 새로운 Java API와 component들이 추가되어
    수행해야 하는 script들이 더 많습니다.
    -------- Script jvm_install_817.sql start ------------------
    -- Setup a database for running Java and the ORB
    spool jvminst.log
    start @$ORACLE_HOME/javavm/install/initjvm.sql
    spool off
    -- Loads xml components into the JServer
    spool initxml.log
    start @$ORACLE_HOME/oracore/admin/initxml.sql
    spool off
    -- loads the XMLSQL Utility (XSU) into the database
    spool catxsu.log
    start @$ORACLE_HOME/rdbms/admin/catxsu.sql
    spool off
    -- JIS (OSE) installation
    spool init_jis.log
    start @$ORACLE_HOME/javavm/install/init_jis.sql
    spool off
    -- Turn on JAccelerator (ncomp) for JIS
    spool jisja.log
    start @$ORACLE_HOME/javavm/install/jisja.sql
    spool off
    -- Adds the set of default end points to the server
    -- with hardcoded values for the admin service
    spool jisaephc.log
    start @$ORACLE_HOME/javavm/install/jisaephc.sql
    spool off
    -- Load PLSQL Gateway Servlet jar files into the database
    spool initplgs.log
    start @$ORACLE_HOME/rdbms/admin/initplgs.sql
    spool off
    -- Install Oracle JSP
    spool initjsp.log
    start @$ORACLE_HOME/jsp/install/initjsp.sql
    spool off
    -- Turn on JAccelerator for JSP libs
    spool jspja.log
    start @$ORACLE_HOME/jsp/install/jspja.sql
    spool off
    -- Initializes Java library needed by PL/SQL
    spool initplsj.log
    start @$ORACLE_HOME/rdbms/admin/initplsj.sql
    spool off
    -- Load AQ/JMS jar files into the database
    spool initjms.log
    start @$ORACLE_HOME/rdbms/admin/initjms.sql
    spool off
    -- Load RepAPI server classes and publish 'repapi' obj
    spool initrepapi.log
    start @$ORACLE_HOME/rdbms/admin/initrepapi.sql
    spool off
    -- loads sql, objects, extensibility and xml related java
    spool initsoxx.log
    start @$ORACLE_HOME/rdbms/admin/initsoxx.sql
    spool off
    -- Configure OSE defauls admin Web Service
    spool jisaep.log
    start @$ORACLE_HOME/javavm/install/jisaep admin 8080 9090
    spool off
    -------- Script jvm_install_817.sql end ------------------
    JVM version 9.0.1 을 설치하기 위한 script
    Using the database configuration assistant, follwoing scripts will be
    executed:
    -- Setup a database for running Java and the ORB
    SQL>@$ORACLE_HOME/javavm/install/initjvm.sql;
    -- INITialize (load) XML components in JServer
    SQL>@$ORACLE_HOME/xdk/admin/initxml.sql;
    -- Loads NCOMP'ed XML Parser
    SQL>@$ORACLE_HOME/xdk/admin/xmlja.sql;
    -- loads the XMLSQL Utility (XSU) into the database.
    SQL>@$ORACLE_HOME/rdbms/admin/catxsu.sql;
    -- install the Oracle Servlet Engine (OSE)
    SQL>@$ORACLE_HOME/javavm/install/init_jis.sql <$ORACLE_HOME>;
    -- Adds the set of default end points to the server
    -- with hardcoded values for the admin service
    SQL>@$ORACLE_HOME/javavm/install/jisaephc.sql <$ORACLE_HOME>;
    -- turn on J Accelerator
    SQL>@$ORACLE_HOME/javavm/install/jisja.sql <$ORACLE_HOME>;
    -- register EJB/Corba Dynamic Registration Endpoint
    SQL>@$ORACLE_HOME/javavm/install/jisdr.sql 2481 2482;
    -- init Java server pages @$ORACLE_HOME@$ORACLE_HOME@$ORACLE_HOME
    SQL>@$ORACLE_HOME/jsp/install/initjsp.sql;
    -- turn on J Accelerator for JSP libs
    SQL>@$ORACLE_HOME/jsp/install/jspja.sql;
    -- script used to load AQ/JMS jar files into the database
    SQL>@$ORACLE_HOME/rdbms/admin/initjms.sql;
    -- load RepAPI server classes and publish 'repapi' obj
    SQL>@$ORACLE_HOME/rdbms/admin/initrapi.sql;
    -- loads sql, objects, extensibility and xml related java
    SQL>@$ORACLE_HOME/rdbms/admin/initsoxx.sql;
    -- Loads appctxapi.jar for JavaVm enabled Database.Called by jcoreini.tsc
    SQL>@$ORACLE_HOME/rdbms/admin/initapcx.sql;
    -- script used to load CDC jar files into the database
    SQL>@$ORACLE_HOME/rdbms/admin/initcdc.sql;
    -- Loads the Java stored procedures as required by the
    -- Summary Advisor.
    SQL>@$ORACLE_HOME/rdbms/admin/initqsma.sql;
    --Initialize sqlj type feature in 9i db
    SQL>@$ORACLE_HOME/rdbms/admin/initsjty.sql;
    --load java componenets for AQ HTTP Propagation
    SQL>@$ORACLE_HOME/rdbms/admin/initaqhp.sql;
    Test program으로 JVM test해보기
    Java Stored Procedure 만들기
    다음과 같은 순서로 Java Stored Procedure를 만들어 봅니다.
    1. Java program을 만듭니다.
    2. program을 database로 loading합니다.
    3. Java program을 SQL (PL/SQL Wrapper)로 publish합니다.
    4. SQL 또는 PL/SQL에서 만든 Java program을 호출합니다.
    Step 1: Java program을 만듭니다.
    ======
    EchoInput.java
    public class EchoInput {
    public static void main (String[] args){
    for (int i=0; i<args.length;i++)
    System.out.println(args);}}
    Step 2: program을 database로 loading합니다.
    ======
    UNIX prompt상에서 다음을 실행합니다:
    % loadjava -u scott/tiger -v -r EchoInput.java
    또는 SQL*Plus에서는 다음과 같이 할 수도 있습니다:
    CREATE OR REPLACE JAVA SOURCE NAMED "EchoInput" AS
    public class EchoInput { public static void main (String[] args) {
    for (int i=0; i<args.length;i++) System.out.println(args[i]);}}
    Step 3: Java program을 SQL (PL/SQL Wrapper)로 publish합니다.
    ======
    SQL 또는 PL/SQL에서 만든 Java program을 호출하기 위해서는
    Java program을 SQL (PL/SQL Wrapper)로 publish해야 합니다.
    이과정을 PL/SQL Wrapper를 만든다고도 합니다.
    일단 published/wrapped가 되면 SQL 또는 PL/SQL을 통해 호출될 수
    있습니다.
    예제 :
    create or replace procedure echo_input (
    s1 varchar2, s2 varchar2, s3 varchar2)
    as language Java
    name 'EchoInput.main(java.lang.String[])';
    Step 4: SQL 또는 PL/SQL에서 만든 Java program을 호출합니다.
    ======
    call dbms_java.set_output(5000);
    call echo_input('It', 'works', 'now!');
    주의 : SQL*Plus에서 실행할 경우 먼저 'set serveroutput on'을
    해주시기 바랍니다.
    결과 화면
    SQL> set serveroutput on
    SQL> call dbms_java.set_output(5000);
    Call completed.
    SQL> call echo_input('It', 'works', 'now!');
    It
    works
    now!
    Call completed.
    SQL>
    Example
    Reference Documents

  • Document about Oracle 10g New Features

    Hi all,
    I would like to share a document I wrote about Oracle 10g New Feature. I hope it would be useful.
    Currently, I am updating the document to include Release 2 features. Any comments or suggestion is appreciated.
    Download link:
    http://www.operflow.com/Oracle_10g_DB_Summary.pdf

    Hi Ahmed,
    Good Work !!!
    I just visit your blog it is very interesting about you and your country.
    Regards
    Taj

  • Not able to view Forms Server version in Help: About Oracle Applications after the forms upgrade 10.1.2.3.0

    Hi all,
    DB:11.2.0.3.0
    EBS:12.1.3
    O/S: Sun Solaris SPARC 64 bits
    I am not able to view Forms Server version in Help: About Oracle Applications after the forms upgrade 10.1.2.3.0 after the forms upgrade 10.1.2.3.0 as per note:Upgrading OracleAS 10g Forms and Reports to 10.1.2.3 (437878.1)
    Java/jre upgraded to 1.7.0.45 and JAR files regenerated(without force option). Able to opne forms without any issues.
    A)
    $ORACLE_HOME/bin/frmcmp help=y
    FRM-91500: Unable to start/complete the build.
    B)
    $ORACLE_HOME/bin/rwrun ?|grep Release
    Report Builder: Release 10.1.2.3.0 - Production on Thu Nov
    28 14:20:45 2013
    Is this an issue? Could anyone please share the fix if faced the similar issue earlier.
    Thank You for your time
    Regards,

    Hi Hussein,
    You mean reboot the solaris server and then start database and applications services. We have two databases running on this solaris server.
    DBWR Trace file shows:
    Read of datafile '+ASMDG002/test1/datafile/system.823.828585081' (fno 1) header failed with ORA-01206
    Rereading datafile 1 header failed with ORA-01206
    V10 STYLE FILE HEADER:
            Compatibility Vsn = 186646528=0xb200000
            Db ID=0=0x0, Db Name='TEST1'
            Activation ID=0=0x0
            Control Seq=31739=0x7bfb, File size=230400=0x38400
            File Number=1, Blksiz=8192, File Type=3 DATA
    Tablespace #0 - SYSTEM  rel_fn:1
    Creation   at   scn: 0x0000.00000004 04/27/2000 23:14:44
    Backup taken at scn: 0x0001.db8e5a1a 04/17/2010 04:16:14 thread:1
    reset logs count:0x316351ab scn: 0x0938.0b32c3b1
    prev reset logs count:0x31279a4c scn: 0x0938.08469022
    recovered at 11/28/2013 19:43:22
    status:0x2004 root dba:0x00c38235 chkpt cnt: 364108 ctl cnt:364107
    begin-hot-backup file size: 230400
    Checkpointed at scn:  0x0938.0cb9fe5a 11/28/2013 15:04:52
    thread:1 rba:(0x132.49a43.10)
    enabled  threads:  01000000 00000000 00000000 00000000 00000000 00000000
    Hot Backup end marker scn: 0x0000.00000000
    aux_file is NOT DEFINED
    Plugged readony: NO
    Plugin scnscn: 0x0000.00000000
    Plugin resetlogs scn/timescn: 0x0000.00000000 01/01/1988
    00:00:00
    Foreign creation scn/timescn: 0x0000.00000000 01/01/1988
    00:00:00
    Foreign checkpoint scn/timescn: 0x0000.00000000 01/01/1988
    00:00:00
    Online move state: 0
    DDE rules only execution for: ORA 1110
    ----- START Event Driven Actions Dump ----
    ---- END Event Driven Actions Dump ----
    ----- START DDE Actions Dump -----
    Executing SYNC actions
    ----- START DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
    Successfully dispatched
    ----- END DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK'
    (SUCCESS, 0 csec) -----
    Executing ASYNC actions
    ----- END DDE Actions Dump (total 0 csec) -----
    ORA-01186: file 1 failed verification tests
    ORA-01122: database file 1 failed verification check
    ORA-01110: data file 1:
    '+ASMDG002/test1/datafile/system.823.828585081'
    ORA-01206: file is not part of this database - wrong
    database id
    Thanks,

  • Advantages of using Oracle JVM over JPDA for Remote Debugging?

    What are the "additional features" that the documentation hints at when using the Oracle JVM for remote debugging vs. the JPDA protocoL? Can a member of the JDEV briefly address this? What exactly am I losing when using JPDA?

    I am not getting anywhere with 'NCOMPing' the stuff. Attempts to NCOMP keeps erroring out . The first of the errors is
    'Error while determining classes contained in jsch-1.29_minimalClassListAndTCD
    mper.java
    Exception oracle.aurora.sqljdecl.ParseException: Encountered "-" at line 14
    column 18.
    Was expecting one of:
    "extends" ...
    "implements" ...
    The following operations failed
    jsch-0.1.29_minimalClassListAndTCDumper.java: creation
    exiting : Failures occurred during processing
    Kuassi, I have looked at a few of your posts where you make mention of a file titled 'Settings_os.properties'. I see no such file in my Oracle installation. What am I missing here ?

  • [ask] about oracle sql injection and escalation

    Hello,i'm student , i'm studying oracle,now i want to research about oracle sql injection,i had read some tuttorial such as *'Hacking Oracle From Web,Advanced SQL Injection In Oracle Databases,Oracle Hacker HandBook ...'* but when i try to demo on localserver (11.0.1.6) but not run,and this is my demo
    -- first,i created table users
    create table users (name nvarchar2(50),pass nvarchar2(50))
    -- then i created procedure with system user
    create or replace procedure system.adduser(u nvarchar2,p nvarchar2)
    as
    begin
      insert into users values(u,p);
    end;
    -- grant execute privilege to oc user
    grant execute on adduser to oc
    -- login with user oc and create a procedure
    create or replace procedure sqli
    as
    begin
      execute immediate 'grant dba to oc';
    end;
    -- and then,i run system's procedure
    declare
    begin
      system.adduser('admin','admin'' ; execute immediate  ''declare begin sqli() end;');
    end;
    i hope oracle master help me to i can understand and improving my knowledge
    Thanks

    The best forum for this is probably Forum Home » Java » SQLJ/JDBC
    Presumably you are refering to oracle.sql.TIMESTAMP. While this is intended to (and does) correspond to java.sql.Timestamp it can't be a subclass because it needs to be a subclass of oracle.sql.Datum.

  • Setting max heap in Oracle JVM

    Hello -
    I'm having a problem with a Java stored procedure running out of heap memory in Oracle 10g running Java 1.4.
    Normally (running Java in a standard context) I would just modify the -Xmx with a higher value, but for the life of me I can't figure out how to do it in a stored procedure context.
    I have browsed Google and I have browsed the Oracle JVM installation stuff, all to no avail.
    Can anyone help me with how to set my max heap size, or verify that it's impossible? I have taken all of the standard Oracle memory parameters (JAVA_POOL, UGA/PGA/SGA limits) out of the picture by jacking them up and keeping an eye on memory values up to the point that the procedure fails (at ~700m), so I'm pretty sure that this is my problem.
    So far I have looked at:
    Config files
    Config tables
    DB parameters
    I haven't been able to find anything remotely related to JVM option configuration in any of the above.
    It is worth noting that I ran across another forum where someone was wanting to set their minimum heap size, and they were told that it was not possible. I'm just having trouble believing that it's the same story with something as critical as max heap size.
    Much obliged for any help.
    Thanks,
    Annaka

    From Metalink Note 466112.1:
    Applies to:
    Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 10.2.0.3
    This problem can occur on any platform.
    Symptoms
    When attempting to execute a java class that works fine in a stand alone JVM, fails with Oracle JVM with the following error:
    ERROR
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.OutOfMemoryError
    ORA-06512: at "IDS_SYS.POD", line 3
    Cause
    The MaxMemorySize was set 256M (the default values) where the JSO needs memory more than 256 MB to run.
    This can be checked as following:
    SQL> create or replace function getMaxMemorySize return number
    2 is language java name
    3 'oracle.aurora.vm.OracleRuntime.getMaxMemorySize() returns long';
    4 /
    Function created.
    SQL> select getMaxMemorySize from dual;
    GETMAXMEMORYSIZE
    268435456
    After increasing the MaxMemorySize to a larger value(1 GB), the problem was fixed
    Solution
    Please increase the MaxMemorySize to a larger values(i.e. 1GB), this can be done as following:
    SQL> create or replace function setMaxMemorySize(num number) return number
    2 is language java name
    3 'oracle.aurora.vm.OracleRuntime.setMaxMemorySize(long) returns long';
    4 /
    Function created.
    SQL> select setMaxMemorySize(1024*1024*1024) from dual;
    SETMAXMEMORYSIZE(1024*1024*1024)
    Then you can check if the value is set correctly using the following:
    SQL> select getMaxMemorySize from dual;
    GETMAXMEMORYSIZE
    1073741824
    In my case I had to set the parameter within a job's the session.
    bye
    TPD
    Edited by: TPD on Sep 23, 2008 4:27 PM - tags added

  • Is it possible to enable Java in oracle 10g express with the oracle jvm?

    I've oracle 10g express installed. I would like to create java stored procedures in a schema. But, how do I have the database java-enabled?

    It might be possible.
    Realize, however, that the Oracle JVM is a component of the Standard Edition One and higher - so to be able to use it you need to license Standard Edition One or higher.
    If you are going to violate the license anyway, why not stick with an Edition that contains the JVM.

  • Oracle JVM in iAS (8i or 9i)

    How does the Oracle JVM work in iAS? I installed Oracle EE 8.1.7 and deployed java classes, looked at OSE, and deployed some EJB's. The classes are stored in the database as objects and JNDI is used to reference the servlets and EJBs. So if I install 9i AS, where do the EJB classes get stored? And where (exactly) does the Oracle JVM run in 9i AS?
    Thanks,
    John H.

    I have, the problem is that my program successfully replicates and crashes upon completion of replication, but so does oracle 8 navigator.

  • Java multithreading support in Oracle JVM

    Dear all,
    I have some questions and observations regarding multithreading support in Oracle JVM. I have some java code that is stored in the database and is multithreaded (in separate threads I run a plsql procedure that does a lot of precessing). If I run the code with my standalone JVM it works like a charm, everything gets executed in separate threads. But if I store the code in the database and run it (with the custom JVM Oracle implemented for the server) it does not do any threading, all I have is a single thread that runs everything sequentially.
    The logic is this: using JDBC I create a connection, get a parameter (number of threads) and then launch the threads (each thread creates its own connection and runs the plsql procedure). No resource is shared (I have no synchronized code, I do not yield).
    My question is: does Oracle JVM supports multithreading or not? If yes, how to achieve it? Maybe there is something handled in JDBC? (although my code useses JDBC is not multithreaded) If this is not possible with java, do you now how to run something (oracle function, procedure) concurrently with PLSQL? (I tried with DBMS_JOBS but it does not work on all my databases and our DBAs discourage the use of them). Performing multithreading my launching different sqlPlus processes is not an option (as we have no security standard regarding the authentication -> connection is made by specifying in clear text the user and password).
    I wanted to use java because is more simple, secure (the connection is already established as the classes are stored in the database) and easy to maintain (until now we use different scripts which run on Unix and Windows and this leads to double work).
    The Oracle versions I use are 10g and 11g.
    Thank you all very much for your time
    Just the best,
    Don

    don wrote:
    My question is: does Oracle JVM supports multithreading or not? If yes, how to achieve it? Maybe there is something handled in JDBC? (although my code useses JDBC is not multithreaded) If this is not possible with java, do you now how to run something (oracle function, procedure) concurrently with PLSQL? (I tried with DBMS_JOBS but it does not work on all my databases and our DBAs discourage the use of them). Performing multithreading my launching different sqlPlus processes is not an option (as we have no security standard regarding the authentication -> connection is made by specifying in clear text the user and password).
    (Obviously the other post answers your question.)
    If I am reading that correctly then you have a management issue - not a technological one.
    You have a task to complete, presumably doing it efficiently is something that the company wants.
    And you have two alternatives both of which the DBAs are not allowing you to use.
    So at that point it is up to management to insist that the DBAs provide specific technological reasons (not hand waving) why those solutions are not suitable. And they should also be required to provide the outline of an alternative that is suitable.
    Besides that you might consider why your solution cannot be implemented entirely in a single threaded PL/SQL routine. The fact that is harder is not a reason when the point of the excercise is to create something that is more efficient.

Maybe you are looking for

  • Can we check CLOB datatype to null?

    Hi , i want check clob datatype to null so i have used decode(col1,null,n1,n2) ..it executes the query but it gives nothing ..doesn't return data only show o .. can you please tell me how to do ?

  • Tv@nywhere master on Abit IC7-max3

    Hy Guys, have a Tv@nywhere master working on my KT6 Delta for about 8 months now without any problem. Now my son want that card on his mobo, an Abit IC7-max3. I've tried to install it. Everything went fine. But now when I want to scan for channels no

  • Movie Playback Buttons

    Hi. I am very unexperienced with this, so please bear with me...I'm trying to create a button that can skip my flash intro anytime I press it? I chose my button. It is in a "button" layer and it is called "btn_forward". Can someone please give me a c

  • It's no use settting Timeout Seconds for JTA in WebLogic6.0 under HP_UX11

              Hello,all, I use WebLogic Server 6.0 under HP_UX11. When I execute a long time query           method with container_manager_transaction, I got a Exception: weblogic.transaction.RoolbackException:           Transaction timed out after 31 se

  • Syncing photos of my art & my photography to my ipod touch

    I have 2 folders of photo/image content that I want to snyc to my ipod touch, one is a folder with my photograps, the other folder has photos of my artwork, but itunes will only sync one folder or the other, but not both. how do I get itunes to snyc