appeal of Java

Hello

Could someone give me everything (would be great if it will be simple) example / tutorial how can I call my program Java of APEX (on the page, simply, for example, by clicking on the button) is it possible?

Thank you.

You can compile your Java directly as a stored procedure of Java (from sqlplus), or assuming that you already have a Java o/s (on the Oracle Server) program, and then call you it just from pl/sql using either a stored proc separate Java (oldest approach) or DBMS_SCHEDULER.run_job (newer approach). I remember well, using the java stored proc allows to find easily the STDOUT in pl/sql. You use DBMS_SCHEDULER.run_job, you can redirect STDOUT your program flat files and access its contents as an external table. Many examples on asktom.oracle.com or in the forum of pl/sql.

Example (untested) simple:

create or replace procedure PROC1(p_parm1 in varchar2)
  as
begin
-- -- from DBA account
-- grant execute on DBMS_SCHEDULER to SCOTT;
-- grant create job to SCOTT;
-- grant CREATE EXTERNAL JOB to SCOTT;
-- grant create any directory to SCOTT;
-- -- from SCOTT
-- create or replace directory MYDIR as 'c:\mydir';
--
-- DBMS_SCHEDULER.create_job
-- (job_name => 'testjob',
-- job_type => 'EXECUTABLE',
-- job_action => 'c:\windows\system32\cmd.exe /c c:\testdir\test.bat',
-- enabled => false);

DBMS_SCHEDULER.run_job (job_name                 => 'testjob',
                        use_current_session      => TRUE
                        );
end;
/

test.bat
======
java -jar myjavaprog.jar >c:\testdir\test.out 2>&1

--CREATE TABLE scott.EXT_JAVA_OUT
--(LINE  VARCHAR2(4000 BYTE))
--ORGANIZATION EXTERNAL
--  (  TYPE ORACLE_LOADER
--     DEFAULT DIRECTORY MYDIR
--     ACCESS PARAMETERS
--       ( RECORDS DELIMITED BY 0x'0A' NOBADFILE NODISCARDFILE NOLOGFILE  DATE_CACHE 0
--      FIELDS
--         MISSING FIELD VALUES ARE NULL
--         REJECT ROWS WITH ALL NULL FIELDS
--         (LINE   CHAR (4000)  ))
--     LOCATION (MYDIR:'test.out')
--  )
--REJECT LIMIT UNLIMITED;

Once you have it from a stored proc of wrapper, make 'Form on a procedure' which turns itself, to call him. If it is long, you probably want a submit button:

onclick="javascript:this.disabled=true;this.value='Busy...';html_Submit_Progress(this);  "

Search this forum for Carl html_Submit_Progress.

Published by: maceyah on September 23, 2011 09:28

Tags: Database

Similar Questions

  • The appeal of Java DB stateful classes?

    Is it possible to call Java classes in the virtual machine JAVA DB? I often see static methods used with the only thread discussing this mention structures SQLData and STRUCT. I need a java class that would keep the State and have a lifespan of several calls to PL/SQL. You can use the singleton pattern in the comic book? I had the image of the documentation of classloader that the classpath would be unique per session so that is an option?

    I'm not sure I understand the question, but have you tried to create a class with static variables to contain references to your classes with State? According to your requirement, the static variable could be a hash table storing an arbitrary number of objects.

    The content of static variables persists for the duration of a java session in Oracle, you can use them in calls. For example

    create or replace and set the java source named object_store as
    public class bike
    {
    private String number_of_gears;
    public String getGears()
    {
    Return number_of_gears;
    };
    public void setGears (chain sprockets)
    {
    number_of_gears = gears;
    };
    };
    public class bike_shed
    {
    velo1 private static bike;
    public static void setBike (bike, bike)
    {
    velo1 = bike;
    };
    public static bike getBike()
    {
    Return to velo1;
    };
    };
    Public class Tester
    {
    public static void StoreBike (String NumberGears)
    {
    Bicycle bike = new Bike();
    bike.setGears (NumberGears);
    bike_shed.setBike (Bike);
    };
    public static GetBike() Sub
    {
    Bicycle bike = bike_shed.getBike ();
    System.out.println (Bike.getGears ());
    };
    };
    /

    create or replace procedure StoreBike (gears VARCHAR2) Java language
    name ' tester. StoreBike (java.lang.String)';
    /

    create or replace procedure GetBike as java language
    name ' tester. GetBike()';
    /

    exec dbms_java.set_output (100);
    Set serveroutput on;

    exec StoreBike (10);

    exec GetBike();

    Published by: James C on October 18, 2011 12:31

  • Appeal of Java in OSB.

    I'm sorry if this seems like a basic question, but I am new to OSB and middleware.

    I have a Java class that transforms a CSV to XML file I need to call of the OSB.

    OSB to pick up the CSV of a folder, pass the name of file in the java class, then to notify another process that you have created the xmls.
    Something like that.

    Any help would be appreciated.

    Sorry, I've been rude.

    Your best bet is to get the name of the file to the variable $inbound:

    <>
    name = "ProxyService$ FileTx$ fileReaderPS ' xmlns:con = 'http://www.bea.com/wli/sb/co. '
    ntext">


    file:///c:/temp
    request
    exactly - once


    c:\temp\ciao.txt

    UTF-8
    a: encoding >
    fake




    < anonymous >


    >

    Use this expression:

    Data($Inbound/CTX:transport/CTX:Request/TP:headers/file:filename)

    It should give you c:\temp\ciao.txt
    This is the processed file

  • The appeal of java by a button script

    Hello

    I have a form and I want to let the end user to confirm an action which was launched by pressing a button. The best way would be to call Java script, but the button is a button 'item' and not a 'region' button - I... e it is placed between the elements and not over the region, as save, cancel etc..

    In the case of "item" buttons, I have no "optional URL Redirect" on the ground where to place the javascript call.

    Tamas

    You can try this...

    Instead use the button

    Change the item that you want to associate a button.
    Go to the tab of the element
    Under message text enter element

     Click me
    

    Note: you must change the class = "t20Button", I use the 20 theme and that the appearance of the button is derived from t20Button.
    remove the hyphen before onclick...

    Kind regards
    Shijesh

  • Java class import error

    Hello

    I'm impossible to import the java class in the peoplecode. while I import in my peoplecode I got the error message
    as,

    Appeal of Java java.util.regex.Pattern.matcher: no matching overload. TEST (2 743). SAVE_PB. FieldChange PCPC:379 statement: 4

    While calling the Java method, no overhead was found with a parameter signature that corresponds to the supplied parameter types.*

    the following codes are that I used to import.

    Local JavaObject & type = GetJavaClass ("java.util.regex.Pattern");
    Local JavaObject & match = GetJavaClass ("java.util.regex.Matcher");

    someone suggest me a better solution to import the class into my peoplecode.

    Thanks for posting your complete code.

    Local JavaObject &jstring = CreateJavaObject("java.lang.String", TEST.INPUTSTRING.value);
    
    &matcher = &pattern.matcher(&jstring);
    

    About:

    Local JavaObject & match = GetJavaClass ("java.util.regex.Matcher");

    You don't need that because you don't need to import something you get by the way. In this case, you get & match of & model.

  • Call ORA - 29532 Java completed by eception Java exception...

    Hello


    ORA-29532
    Appeal of Java completed by eception Java exception: string
    Cause: An error or a Java exception has been reported and cannot be resolved by the Java code.


    I have compiled perfectly in Eclipse!
    but the oracle did not work.



    I created the java class
    ---------------------------------------------------------
    import java.awt.*. *;
    java.applet import. *;
    import java.lang. *;


    public class {LibJava

    Native public static int RetSum (int n1, int n2);
    {public static
    System.loadLibrary ("MyLib");
    }


    public static int sum (int n1, int n2) {}
    int RES;
    RES = RetSum (n1, n2);
    return (res);
    }

    }


    ---------------------------------------------------------
    I created the function

    FUNCTION F_JAVA_SUM (number of n1, n2 number)
    Return NUMBER
    AS

    Java LANGUAGE
    NAME 'Int LibJava.Sum (int, int) return;







    Thks.

    Edited by: pro_Mauricio_HtR 01/21/2011 14:46

    pro_Mauricio_HtR wrote:
    ...

    There is another method to call this dll?

    You should be able to use an external procedure to invoke the DLL.

    Justin

    (Either way, you can not mark your questions answered if you're going to post a follow-up question. Many people in the forum don't know the questions that have been marked as answered).

  • Called Java overloaded with stored procedures

    I have two stored procedures with the same name and the same number of parameters. They are overworked because the two procedures differ in the data type of their parameters. In addition, there are 2 2 parameters and the other has 3 in and 1 OUT parameter.

    But Java has problem describing as Java is unable to distinguish that they are two different procedures. How Java should treat calling them? I don't want to change their name.

    Thank you

    user5406804 wrote:
    Is not in Java, no way to achieve
    nom_de_variable-online value

    What you are referring is named notation, a way to specify an argument name with its value instead of associating the argument which the variable position value in the call. Given that the appeal should be processed through SQL and just be text to Java try to use named notation in the appeal of Java like you did in Oracle directly and see if it works. If it does not try to use the wrapper procedure I described.

  • Name of the dynamic pageFlowScope variable on a page of amx, possible?

    Hi all

    I have a problem that I can't seem to move at the moment. I have java classes that try to update some data, and if it is not successful it returns the ID of the control that contains the error. Then I take this control id and use it to highlight the field in error so that the user knows where it is. Usually, this works very well for any other than to a list view.

    For a grid/listView error control is returned in the form of something like "1.14" of the appeal of java, this is equivalent to the number of the line '1' and the id of the control "14". I can easily strip away the '. ' in java but I need a path in my AMX page to define a variable on the fly for example pageFlowScope #{pageFlowScope. {{} row.rowKey} 14} but I get EL analysis of errors try like this, the error is "ERROR_EL_PARSER_NESTED_EL_NOT_SUPPORTED". Basically, I'm trying to have conditional styles depending on whether E {pageFlowScope.114} is set to 1 or not. I can't imagine a better way to implement this in a listView?

    I can only suggest a medium crude to achieve.

    One way to see dynamic values in EL is to use a hash table and use the dynamic value as the key. I would record a HashMap per input element and then store the error with the line indicator not. You can even create your own implementation of HashMap and hoist the flag when running by overloading the get method.

    [For example #{pageFlowScope.elem14ErrorMap [row.rowKey}]

  • Operating system command from PL/SQL Windows

    Hi all

    I develop an app of proto. I have Oracle 11 GR 2 standard edition 1 on Windows 8.1.

    My requirement is OS of PL/SQL command execution. The PLSQLOSCOMMAND.zip meets all the requirements as file ZIP and LOB.

    http://www.Oracle.com/technetwork/database/Enterprise-Edition/calling-shell-commands-from-PLSQL-1-1-129519.PDF

    Oracle PL/SQL, OS command execution. SourceForge.net

    (1) first, I run the install.sql script against my user (STK_BIN). It is to have role DBA. No errors.

    2) connect as SYS and running the following commands:

    Start

    dbms_java.grant_permission ('STK_BIN', 'SYS:java.io.FilePermission', "< < all FILES > >", "read, write, execute, delete");

    commit;

    dbms_java.grant_permission ("STK_BIN", "SYS:java.lang.RuntimePermission", "readFileDescriptor", ");

    commit;

    dbms_java.grant_permission ("STK_BIN", "SYS:java.lang.RuntimePermission", "writeFileDescriptor", ");

    commit;

    end;

    (3) select * from dba_java_policy watch

    GRANTSTK_BINSYSjava.io.FilePermission< < all FILES > >read, write, execute, deleteACTIVE151
    GRANTSTK_BINSYSjava.lang.RuntimePermissionreadFileDescriptorACTIVE152
    GRANTSTK_BINSYSjava.lang.RuntimePermissionwriteFileDescriptorACTIVE153

    ((4) select * from table(file_pkg.get_file_list(file_pkg.get_file('\')));

    Shows the correct file and directory details

    (5) but when I run the command

    Select os_command.exec double '(mkdir STK_BIN_DIR');

    It gives me error

    ERROR on line 1:

    ORA-29532: Java completed by eception Java exception appeal:

    java.io.IOException: Exception when creating the process:

    java.io.IOException: the handle is invalid.

    ORA-06512: at "STK_BIN. OS_COMMAND', line 68

    What I did wrong. Why any windows OS running order giving the error?

    3DS wrote:

    (5) but when I run the command

    Select os_command.exec double '(mkdir STK_BIN_DIR');

    It gives me error

    ERROR on line 1:

    ORA-29532: Java completed by eception Java exception appeal:

    java.io.IOException: Exception when creating the process:

    java.io.IOException: the handle is invalid.

    ORA-06512: at "STK_BIN. OS_COMMAND', line 68

    I guess that the stored proc Java is designed to run external programs? In this case, there is no mkdir.exe program to load and run. Instead, he entered CLI to the cmd.exe program.

    Under the hood, probably the CreateProcess() kernel is called. Have a look to understand the statement of core works to create a process.

  • JDBC: thin gives error mystery

    Hi all

    I'm using Oracle 11 G and I have a java clause that is used to connect the other DB and extract the data. Here is my Echappementjdbc

    Public Shared Sub query (string usr, String pssw, String hostname, String, String DB, String InitialDate port) survey of exceptions
    {
    Class.forName ("oracle.jdbc.OracleDriver");
    String url = "jdbc:oracle:thin:@//" + name + ":" + port + "/" + DB;
    Jacot connection = DriverManager.getConnection (url, usr, pssw);
    try {}
    Statement stmt = connIW.createStatement ();

    Now I get

    ORA-29532:
    Appeal of Java completed by eception Java exception: java.sql.SQLException:
    ORA-01017: name of user and password invalid. connection refused

    But I can't able to connetc with Sql developer, using the same user name, password, HOST, port, and DB Service name .

    Could help me solve the problem.

    Kind regards

    San.

    We have fixed the problem. This
    is an Oracle Bug, please see the Oracle note for reference below.

    Connection to the external database
    Oracle Jvm using the Jdbc thin driver server-side throws Ora-01017 (Doc ID
    1303712.1)

    Applies to:

    Version - JDBC: 11.2.0.1 and later [Release: 11.2 and later]

    Information in this document applies to any platform.

    Symptoms

    A Java stored procedure using the JDBC/thin driver side server to connect to
    another database.

    When Java code is deployed on a pre - 11 g of the side database server
    JDBC/thin connection works very well.

    Once the Java code is deployed on a 11.2 the database-side JDBC/thin server
    failed to connect with ORA-01017: name of user and password invalid. connection refused

    If the Java code is executed on an external JAVA virtual machine connection works fine.

    Despite the error ORA-01017 it was determined that the user name and
    password are correct, and that it is not a matter of case sensitivity.

    Cause

    Corruption with the JIT
    compiled version of Java code.

    Oraclei¿½
    The database Java Developer's Guide

    11g Release 1 (11.1)

    Part number B31225-05

    "Overview of the JITStarting JVM Oracle with Oracle 11 g release 1 (11.1),
    There's a just-in-time (JIT) compiler for Oracle JVM environment. A JIT
    for Oracle JVM compiler allows much faster execution, because it manages the
    invalidation, recompilation and code without an external storage
    mechanism. Based on profiling data collected dynamically, this compiler
    seamlessly selects the Java methods to compile to native machine code and
    dynamically make them available for Java sessions running. In addition, the
    compiler can take advantage of the Oracle JAVA virtual machine class model to
    possibly persist methods Java compiled in the database of calls, sessions, or
    instances. This persistence avoids unnecessary recompilations overload
    through sessions or instances, when we know that semantically the Java
    code has not changed. "

    Solution

    Workaround solution:

    change the system
    java_jit_enabled = FALSE;

    This allows the JIT code to be bypassed, by simply interpreting the Java
    the code that is generated by bytecode, rather than using the JIT.

    There is no need to re - compile Java code. Just run the command above


    and repeat the Java stored procedure.

    To restore the functionality of JIT just do:

    change the system
    java_jit_enabled = TRUE;

    Solution:

    Delete all the lines in the java table $ mc$ and restart the database

    The java$ mc$ table stores the persistent version of the JIT code generated
    for performance reasons. remove this code apparently requires the JIT to
    regenerate the code.

  • Human task reminder

    Hello

    I am the event configuration human task with return of the appeal of java class. I want to finish a human task, the java class that will be triggered.

    I have implemented the interface oracle.bpel.services.workflow.task.IRoutingSlipCallback and specified the full java class name "com.bpm.event.CompleteEvent" in the case where the task human and also click on the checkbox.

    Add the implementation to the BPMEvents.jar file. and added under entry in commenv.cmd for the path of the weblogic server.

    set PATH=D:\OracleBPM11g\user_projects\domains\SSODomain\lib\BPMEvents.jar;%PATH%

    Everything by pursuing the human task, CompleteEvent class implementation are NOT getting triggered instead of this, I get under exception

    Exception:

    what I do: seems a strange quirk of the EJB specification.  The is:java.lang.NoClassDefFoundError exception: oracle/bpel/services/workflow/task/IRoutingSlipCallback

    No idea, how I can add the bpm - services.jar (contains the IRoutingSlipCallback interface) to weblogic classpath?

    Thank you

    As no body responded, I answer the question myself. Jar or class should be \Oracle_SOA1\soa\modules\oracle.soa.ext_11.1.1\ and we need to run the ANT build.xml

  • Max open cursor

    Hi all

    In my 9i database I get open_cursors = 4000, and in the last days some sessions reached this value for cursor open.
    I questioned the v$ open_cursor for one of the sid and I discovered more than 2000 slider are all about this selection:

    Here are just a few...

    SADDR ADDRESS HASH_VALUE, SQL_TEXT SQL_ID
    ---------------- -------------------- ---------- ------------- --------------------------------------------------
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ
    000000056B260B68 0000000559E57208 a7kknct5skbd7 1267281319 CHOOSE ID_ARCHIVIO_SEQ. NEXTVAL FROM DUAL AS SEQ


    as you can see it select is exactly the same, so why the cursor are not shared?

    TK!

    Luca

    user11181920 wrote:

    as you can see it select is exactly the same, so why the cursor are not shared?

    because your program does not close the cursor.
    Can you identify a program that issues that SQL?
    If you can, look at how the cursor is open, and is closed after use.

    I agree - it's a good candidate.
    I used to see this quite frequently in programming Java in particular with previous versions of Oracle. A Java class has been used for a slight stain but the cursor was not closed at the end of the appeal of Java. The java object should be discarded and eventually cleaned up memory, but the database (and session in memory) don't know that the memory of java had disappeared. The result was a single slider, which is held in the SGA (v$ sql), but several pointers to this slider which is held in memory of session (v$ open_cursor).

    (Note - I can use the Java terminology incorrectly in the descriptions above, but I hope that the concept is clear).
    (Note: it is possible to reproduce this in PL/SQL very easily, but pl/sql tends to clean itself up automatically)

    Concerning
    Jonathan Lewis

  • XMLType.extract cannot display French special characters in the select statement

    Hello
    E characters (acute e) get distorted when they are retrieved from the
    XMLType column of an ordinary table.

    How can we solve correctly get the characters e (acute e)?

    We tried setting 'setenv NLS_LANG French_France.WE8ISO8859P1' and
    "setenv NLS_LANG French_France.WE8DEC" before loading the table.

    Database version:
    SQL> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    The test sample case is as follows:
    --connect to any schema where you can store XMLType
    set long 2000;
    set pagesize 2000;
    set serveroutput on;
    --delete from test;
    drop table test;
    create table test (id number, xmldata XMLType);
    
    
    declare
    featureDescriptorXML  CLOB;
    xml_type XMLType;
    new_xml_type XMLType;
    myName varchar2(100);
    myName2 varchar2(100);
    myName3 varchar2(100);
    stmt varchar2(4000);
    begin
     featureDescriptorXML :=
     '<?xml version="1.0" encoding="UTF-8"?>' ||
     '<abc:TheFeature xmlns:' || 'de' || '="' || 'http://abc.klmno.org/fghde' || '" xmlns:abc="http://www.ghijklmn.net/abc"' ||
     ' xmlns:xyz="http://www.ghijklmn.net/xyz">' ||
     '<abc:Name>de:MyGénérique</abc:Name>' ||
     '</abc:TheFeature>';
     xml_type := xmltype(featureDescriptorXML);
     myName := xml_type.extract('/abc:TheFeature/abc:Name/text()', 'xmlns:abc="http://www.ghijklmn.net/abc"').getStringVal();
     dbms_output.put_line('abc:Name value stored in VARCHAR2 variable from XMLType variable is ' || myName);
     -- can show French chars
    
     insert into test(id, xmldata) values(20, xml_type);
    
     stmt := 'select t.xmldata.extract(''/abc:TheFeature/abc:Name/text()'', ''xmlns:abc="http://www.ghijklmn.net/abc"'').getStringVal() from test t';
     execute immediate stmt into myName2;
     dbms_output.put_line('abc:Name value stored in VARCHAR2 variable from XMLType column in 2nd version is ' || myName2);
     -- cannot show French chars
    
    
     stmt := 'select  t.xmldata from test t';
     execute immediate stmt into new_xml_type;
     myName3 := new_xml_type.extract('/abc:TheFeature/abc:Name/text()', 'xmlns:abc="http://www.ghijklmn.net/abc"').getStringVal();
     dbms_output.put_line('abc:Name value stored in VARCHAR2 variable from first XMLType column and then from XMLType variable in 3rd version is ' || myName3);
     -- cannot show French chars
    
    end;
    /
    
    select t.xmldata.extract('/abc:TheFeature/abc:Name/text()', 'xmlns:abc="http://www.ghijklmn.net/abc"').getStringVal()
    from test t;
    -- Cannot show French chars
    
    
    select t.xmldata.extract('/abc:TheFeature/abc:Name/text()', 'xmlns:abc="http://www.ghijklmn.net/abc"').getStringVal() "myname"
    from test t;
    -- Cannot show French chars
    
    
    select t.xmldata.getCLOBVal() from test t;
    -- Cannot show French chars
    
    
    select t.xmldata from test t;
    -- Can show French chars
    Output is the following with setenv NLS_LANG French_France.WE8ISO8859P1
    and NLS_DATABASE_PARAMETERS are the following:
    SQL> select * from nls_database_parameters;
    
    PARAMETER                      VALUE
    ------------------------------ ----------------------------------------
    NLS_LANGUAGE                   AMERICAN
    NLS_TERRITORY                  AMERICA
    NLS_CURRENCY                   $
    NLS_ISO_CURRENCY               AMERICA
    NLS_NUMERIC_CHARACTERS         .,
    NLS_CHARACTERSET               WE8DEC
    NLS_CALENDAR                   GREGORIAN
    NLS_DATE_FORMAT                DD-MON-RR
    NLS_DATE_LANGUAGE              AMERICAN
    NLS_SORT                       BINARY
    NLS_TIME_FORMAT                HH.MI.SSXFF AM
    
    PARAMETER                      VALUE
    ------------------------------ ----------------------------------------
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY              $
    NLS_COMP                       BINARY
    NLS_LENGTH_SEMANTICS           BYTE
    NLS_NCHAR_CONV_EXCP            FALSE
    NLS_NCHAR_CHARACTERSET         AL16UTF16
    NLS_RDBMS_VERSION              11.2.0.2.0
    
    20 ligne(s) sélectionnée(s).
    Table creé.
    
    abc:Name value stored in VARCHAR2 variable from XMLType variable is
    de:MyGénérique
    abc:Name value stored in VARCHAR2 variable from XMLType column in 2nd version is
    de:MyGénérique
    abc:Name value stored in VARCHAR2 variable from first XMLType column and then
    from XMLType variable in 3rd version is de:MyGénérique
    
    Procdure PL/SQL terminée avec succès.
    
    
    T.XMLDATA.EXTRACT('/ABC:THEFEATURE/ABC:NAME/TEXT()','XMLNS:ABC="HTTP://WWW.GHIJK
    --------------------------------------------------------------------------------
    de:MyGénérique
    
    
    myname
    --------------------------------------------------------------------------------
    de:MyGénérique
    
    
    T.XMLDATA.GETCLOBVAL()
    --------------------------------------------------------------------------------
    <?xml version="1.0" encoding="DEC-MCS"?>
    <abc:TheFeature xmlns:de="http://abc.klmno.org/fghde" xmlns:abc="http://www.ghij
    klmn.net/abc" xmlns:xyz="http://www.ghijklmn.net/xyz">
      <abc:Name>de:MyGénérique</abc:Name>
    </abc:TheFeature>
    
    
    
    XMLDATA
    --------------------------------------------------------------------------------
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <abc:TheFeature xmlns:de="http://abc.klmno.org/fghde" xmlns:abc="http://www.ghij
    klmn.net/abc" xmlns:xyz="http://www.ghijklmn.net/xyz">
      <abc:Name>de:MyGénérique</abc:Name>
    </abc:TheFeature>
    We also tried affecting NLS_CHARACTERSET AL32UTF8
    by CHARACTER SET of ALTER DATABASE.
    the database is closed and restarted.
    But that did not help.

    Thank you

    Ok. Wasn't sure. Thank you for that clarification.

    .. .but please make an attempt with XMLTABLE XMLQUERY, XMLCAST (or CAST) and other XML functions that support XQuery and not to use the engine of 'old '... I hope that these features will keep things as it should...

    .. .If not... create an SR with support of Oracle on this issue. Changes, if you base your SR on these 'old' operators XML/SQL and functions that are her will not be able to help, mainly due to the fact that your last version and stuff like EXTRACT / getStringVal() etc. are announced officially discouraged in this 11.2.0.2.0 version. As far as I know the t.xmldata.extract, the xml_type.extract and the other syntaxes, outlaw count of 10.1 (although I know, he appealed to java / OO people kind).

    Published by: Marco Gralike April 5, 2011 19:50

  • Appeal of determinations engine (10.3) with Java API

    Are there examples of code was over what to call the engine with the Java API for 10.3 OPA?

    Hi Robert,.

    What would a full example code "? Examples of code using the OPA developer should demonstrate each of the various tasks needed to use the engine of determinations.

    Kind regards
    Brad

  • Notifications of the Java tool

    Hi all

    I've attached a screenshot of an alert that keeps popping up.  I followed the link and installed the latest version of Java (2 x) by following the instructions without result.  What can I to eliminate these notifications?

    A

    If you have installed the plugin of Facebook video appeal and you no longer want to use it, you can remove it as follows.

    1 back up all data.

    2. open the library folder in your home folder by holding down the option key and selecting

    Go ▹ library

    in the Finder menu bar.

    3. place these items in the library folder to the Trash:

    LaunchAgents/com.facebook.videochat.name.plist

    Support/Facebook app

    Here the name represents the name of your Facebook.

    4 log off or restart the computer, and then empty the trash.

    B

    If you do not use this plugin, or any other software (for example, some Adobe products), which depends on Java, install the Java runtime distributed by Apple.

    C

    If you do not have the Facebook plugin and you don't want to install Java, please ask for further instructions.

Maybe you are looking for

  • After that switch on my PC works for a minute then stops, this happens 3 times then starts with the last good Configuration

    It started only four days ago, I spend on the PC runs for a minute then stops. This can happen in 3 or 4 times. can Ichoose last good known Configuration and running a CHKDSK and usually begins.

  • Comm error 283 CLJ 2840

    I get a comm error 283 trying to receive faxes. Anyone knows what is the cause and has something to do with the comm 232 error?

  • U2515H, the issue of the use of Port

    Hello I had a Dell U2515H, now the thing is that I wanted to update my graphics card bios, which is the gigabyte g1 games GTX 970, in order to update the video card they requires the use of two DVI - D DVI - I cable. The question I have is that I wou

  • Closed vs Hibernate

    Can someone explain the difference between standby extended and closed. In addition, what is recommended?  Thank you very much.

  • The Windows UAC compliance

    I use an application that is not compatible with UAC. Apart from the challenges that come with being not compatible UAC, is there a chance that Microsoft will say in the future that no - complaint UAC applications will not be allowed to run on future