Java Program Call from PLSQL

First I have created two Java files
FileName1-TestPLSQL.java
package TestJava;
public class TestPLSQL {
  * @param args
  public static void main(String[] args) {
  // TODO Auto-generated method stub
  test2.world();
FilaName2-test2.java
package TestJava;
public class test2 {
   public static void world()
    System.out.println("Hello world");
Then i have loaded the class in Oracle using Loadjava-
loadjava -user TEST/TEST -v TestPLSQL.java
loadjava -user TEST/TEST -v test2.java
It successfully loaded without any error.
Then i have created one function-
create or replace
FUNCTION F_JAVA_PGM
/*Specify the return type as per the method in the java class*/
RETURN VARCHAR2
AS
/*Specify the external programs base language*/
LANGUAGE JAVA NAME 'TestJava.TestPLSQL(java.lang.String)
return java.lang.String';
While executing the below query -
SELECT F_JAVA_PGM FROM DUAL;
Its giving error-
ORA-29540: class TestJava does not exist
Can anybody help me on this?

INRi wrote:
While executing the below query -
SELECT F_JAVA_PGM FROM DUAL;
Its giving error-
ORA-29540: class TestJava does not exist
Can anybody help me on this?
The call specification is incorrect :
You must publish a method, not a class.
None of the methods return a value, why are you creating a function ?
So, in short, for the specific test case you've submitted here, use a procedure that interfaces the TestJava.TestPLSQL.main method with a String array parameter :
create or replace procedure P_JAVA_PGM
AS LANGUAGE JAVA
NAME 'TestJava.TestPLSQL.main(java.lang.String[])';
Tested OK after loading the sources directly via CREATE JAVA SOURCE :
create or replace and compile java source named file2 as
package TestJava;
public class test2 {
   public static void world()
    System.out.println("Hello world");
create or replace and compile java source named file1 as
package TestJava;
public class TestPLSQL {
  * @param args
  public static void main(String[] args) {
  // TODO Auto-generated method stub
  test2.world();
create or replace procedure P_JAVA_PGM
AS LANGUAGE JAVA
NAME 'TestJava.TestPLSQL.main(java.lang.String[])';
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exec p_java_pgm
PL/SQL procedure successfully completed.
Result can be seen in a trace file :
*** 2013-08-11 12:44:51.513
Hello world

Similar Messages

  • External c program call from plsql

    hi,
    my db version is:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    entry in my listener.ora file
    ===========================
    # listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (PROGRAM = extproc)
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_DESC =
    (GLOBAL_DBNAME = orcl)
    (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
    (SID_NAME = orcl)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = extproc0))
    ADR_BASE_LISTENER = /u01/app/oracle
    entry in tnsnames.ora file:
    ===============================
    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = extproc0))
    (CONNECT_DATA =
    (SERVICE_NAME = orcl.example.com)
    listener is running perfectly.
    created c program,
    compile the program by gcc -c <filename>
    ld -shared -o <filename.so> <filename.o>
    cp <filename.so> $ORACLE_HOME/bin
    create library & function from db. when I am invoking this function it is throwing error message:
    ORA-28546: connection initialization failed, probable Net8 admin error
    tnx in advance

    Here's a working example (11.2.0.3 using Oracle Linux 5.9):
    SQL> !cat test.c
    #include <ctype.h>
    int upcase(char *istr, char *ostr){
            int i = 0;
            while(istr){
    ostr[i] = toupper(istr[i]);
    i++;
    return 0;
    SQL>
    SQL> --// compile
    SQL> ! gcc -fPIC -c test.c
    SQL> --// result
    SQL> ! ls -l test*
    -rw-r--r-- 1 oracle oinstall 140 Jan 26 18:40 test.c
    -rw-r--r-- 1 oracle oinstall 1480 Jan 26 18:48 test.o
    SQL>
    SQL> --// create shared object
    SQL> ! ld -shared -o libtest.so test.o
    SQL>
    SQL> ! file libtest.so
    libtest.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped
    SQL>
    SQL> --// wrapper library and function
    SQL> create or replace library libtest as '/home/oracle/sql/libtest.so';
    2 /
    Library created.
    SQL>
    SQL> create or replace function upcase( instr in varchar2, outstr out varchar2 ) return binary_integer is
    2 external
    3 library libtest
    4 name "upcase"
    5 language C
    6 calling standard C
    7 parameters(
    8 instr string,
    9 outstr string
    10 )
    11 ;
    12 /
    Function created.
    SQL>
    SQL> declare
    2 str1 varchar2(20);
    3 str2 varchar2(20);
    4 rc binary_integer;
    5 begin
    6 str1 := 'hello world';
    7 rc := upcase( str1, str2 );
    8 dbms_output.put_line( 'rc='||rc||' instr='||str1||' outstr='||str2 );
    9 end;
    10 /
    rc=0 instr=hello world outstr=HELLO WORLD
    PL/SQL procedure successfully completed.
    SQL>
    The following 2 configuration settings are needed - in the +listener.ora+ (server) and the +tnsnames.ora+ (client).
    For the Listener - add the ADDRESS line for EXTPROC to the LISTENER config, and add the EXTPROC SID entry to the SID list.LISTENER=
    (DESCRIPTION=
    (ADDRESS_LIST=
    (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME= <insert oracle home here> )
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ANY")
    The client needs to have a TNS alias that defines how to contact EXTPROC. This is done in +tnsnames.ora+:EXTPROC_CONNECTION_DATA =
    (DESCRIPTION=
    (ADDRESS=(PROTOCOL=ipc)(KEY=extproc))
    (CONNECT_DATA=(SID=plsextproc))
    Are you using RAC? if so, I do not think IPC connections are allowed by default between an Oracle db  server process and the Grid listener process. In which case, you can create an IPC only listener in the Oracle o/s user.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Journal import fails when called from PLSQL

    Hi,
    When journal import is called from plsql code it is failing with error in 'gllacc() Function returning without value and no data found'.
    Same transaction is run succesfully from front end.
    I checked both gl_interface and gl_interface_control table but couldnt find the issue.
    Any info on this would be very helpful.
    Thanks
    Sandhya

    FOR l_rec IN (SELECT ledger_id,group_id from apps.gl_interface
    WHERE status='NEW'
    AND user_je_source_name='GIS_DATA_CONVERSION'
    GROUP BY ledger_id,group_id
    ORDER BY group_id
    LOOP
    apps.gl_journal_import_pkg.populate_interface_control (user_je_source_name => 'GIS_DATA_CONVERSION',
    GROUP_ID => l_rec.group_id,
    set_of_books_id => l_rec.ledger_id,
    interface_run_id =>vl_interface_id,
    table_name => 'GL_INTERFACE',
    processed_data_action=>'D'
    COMMIT;
    vl_request_id := apps.fnd_request.submit_request (application => 'SQLGL', -- application short name
    program => 'GLLEZLSRS', -- program short name
    description => NULL, -- program name
    start_time => NULL, -- start date
    sub_request => FALSE, -- sub-request
    argument1 => 2065, --Data access set id
    argument2 => 'GIS_DATA_CONVERSION', --Source
    argument3 => l_rec.ledger_id, -- set of books id
    argument4 => l_rec.group_id,
    argument5 => 'N', -- error to suspense flag
    argument6 => NULL, -- create summary flag
    argument7 => 'N' -- import desc flex flag
    COMMIT;
    IF ( vl_request_id = 0 ) THEN
    xxgis.gis_conv_util_pkg.debug_print_p(1,'FND_LOG','E001: Journal Import Submission Failed. ' || SQLERRM);
    retcode := 2;
    EXIT;
    ELSE
    xxgis.gis_conv_util_pkg.debug_print_p(1,'FND_LOG','P001: Submitted Journal Import Program for group id: ' || l_rec.group_id ||
    'and ledger :'||l_rec.ledger_id|| ', Request ID: ' || vl_request_id);
    END IF;
    END LOOP;

  • Debug java class called from CF?

    I'm experiencing different behaviour with a Java class called from a CF page to the same class called directly from Java code.
    Is it possible for me to step into the Java class and debug it in CF builder if I attach the correct Java source?
    Pressing F5 (step-in) on the line that the method is called just skips straight over.
    Regards,
    Andy

    P5music wrote:
    I would like to be able to make a java application that has a GUI that is a rich web page.That's what applets are for.
    In this case, this page exists on my system and I can open it with my browser.
    This page does many things that are typical of a web page like displaying information and presenting rich and graphical controls
    but some of this controls are connected to a java application, launched from the web page or viceversa.I don't get this "launched from the web page" business. Is that a requirement or are you describing an existing system? Or are you describing somebody else's system whose architecture you want to imitate? Or are you using the word "launched" simply to describe the action of starting an applet?
    It still isn't clear to me what you are trying to describe. But at any rate if you want a Java program to run in your browser, that's an applet. Note that applets can interact with Javascript code in the page they are embedded in. Or if you want to download a Java application which acts as a separate application, i.e. it still runs when the browser is closed, you can use Web Start for that.

  • Java function call from Trigger in Oracle

    Moderator edit:
    This post was branched from an eleven-year-old long dead thread
    Java function call from Trigger in Oracle
    @ user 861498,
    For the future, if a forum discussion is more than (let's say) a month old, NEVER resurrect it to append your new issue. Always start a new thread. Feel free to include a link to that old discussion if you think it might be relevant.
    Also, ALWAYS use code tags as is described in the forum FAQ that is linked at the upper corner of e\very page. Your formulae will be so very much more readable.
    {end of edit, what follows is their posting}
    I am attempting to do a similar function, however everything is loaded, written, compiled and resolved correct, however, nothing is happening. No errors or anything. Would I have a permission issue or something?
    My code is the following, (the last four lines of java code is meant to do activate a particular badge which will later be dynamic)
    Trigger:
    CREATE OR REPLACE PROCEDURE java_contact_t4 (member_id_in NUMBER)
    IS LANGUAGE JAVA
    NAME 'ThrowAnError.contactTrigger(java.lang.Integer)';
    Java:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ThrowAnError" AS
    // Required class libraries.
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import com.ekahau.common.sdk.*;
    import com.ekahau.engine.sdk.*;
    // Define class.
    public class ThrowAnError {
    // Connect and verify new insert would be a duplicate.
    public static void contactTrigger(Integer memberID) throws Exception {
    String badgeId;
    // Create a Java 5 and Oracle 11g connection.
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    // Create a prepared statement that accepts binding a number.
    PreparedStatement ps = conn.prepareStatement("SELECT \"Note\" " +
    "FROM Users " +
    "WHERE \"User\" = ? ");
    // Bind the local variable to the statement placeholder.
    ps.setInt(1, memberID);
    // Execute query and check if there is a second value.
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    badgeId = rs.getString("Note");
    // Clean up resources.
    rs.close();
    ps.close();
    conn.close();
    // davids badge is 105463705637
    EConnection mEngineConnection = new econnection("10.25.10.5",8550);
    mEngineConnection.setUserCredentials("choff", "badge00");
    mEngineConnection.call("/epe/cfg/tagcommandadd?tagid=105463705637&cmd=mmt%203");
    mEngineConnection.call("/epe/msg/tagsendmsg?tagid=105463705637&messagetype=instant&message=Hello%20World%20from%20Axium-Oracle");
    Edited by: rukbat on May 31, 2011 1:12 PM

    To followup on the posting:
    Okay, being a oracle noob, I didn't know I needed to tell anything to get the java error messages out to the console
    Having figured that out on my own, I minified my code to just run the one line of code:
    // Required class libraries.
      import java.sql.*;
      import oracle.jdbc.driver.*;
      import com.ekahau.common.sdk.*;
      import com.ekahau.engine.sdk.*;
      // Define class.
      public class ThrowAnError {
         public static void testEkahau(Integer memberID) throws Exception {
         try {
              EConnection mEngineConnection = new EConnection("10.25.10.5",8550);
         } catch (Throwable e) {
              System.out.println("got an error");
              e.printStackTrace();
    }So, after the following:
    SQL> {as sysdba on another command prompt} exec dbms_java.grant_permission('AXIUM',"SYS:java.util.PropertyPermission','javax.security.auth.usersubjectCredsOnly','write');
    and the following as the user
    SQL> set serveroutput on
    SQL> exec dbms_java.set_output(10000);
    I run the procedure and receive the following message.
    SQL> call java_contact_t4(801);
    got an error
    java.lang.NoClassDefFoundError
         at ThrowAnError.testEkahau(ThrowAnError:13)
    Call completed.
    NoClassDefFoundError tells me that it can't find the jar file to run my call to EConnection.
    Now, I've notice when I loaded the sdk jar file, it skipped some classes it contained:
    c:\Users\me\Documents>loadjava -r -f -v -r "axium/-----@axaxiumtrain" ekahau-engine-sdk.jar
    arguments: '-u' 'axium/***@axaxiumtrain' '-r' '-f' '-v' 'ekahau-engine-sdk.jar'
    creating : resource META-INF/MANIFEST.MF
    loading : resource META-INF/MANIFEST.MF
    creating : class com/ekahau/common/sdk/EConnection
    loading : class com/ekahau/common/sdk/EConnection
    creating : class com/ekahau/common/sdk/EErrorCodes
    loading : class com/ekahau/common/sdk/EErrorCodes
    skipping : resource META-INF/MANIFEST.MF
    resolving: class com/ekahau/common/sdk/EConnection
    skipping : class com/ekahau/common/sdk/EErrorCodes
    skipping : class com/ekahau/common/sdk/EException
    skipping : class com/ekahau/common/sdk/EMsg$EMSGIterator
    skipping : class com/ekahau/common/sdk/EMsg
    skipping : class com/ekahau/common/sdk/EMsgEncoder
    skipping : class com/ekahau/common/sdk/EMsgKeyValueParser
    skipping : class com/ekahau/common/sdk/EMsgProperty
    resolving: class com/ekahau/engine/sdk/impl/LocationImpl
    skipping : class com/ekahau/engine/sdk/status/IStatusListener
    skipping : class com/ekahau/engine/sdk/status/StatusChangeEntry
    Classes Loaded: 114
    Resources Loaded: 1
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0
    .... with no explanation.
    Can anyone tell me why it would skip resolving a class? Especially after I use the -r flag to have loadjava resolve it upon loading.
    How do i get it to resolve the entire jar file?
    Edited by: themadprogrammer on Aug 5, 2011 7:15 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:21 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:22 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:23 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:26 AM

  • Facing problem in JavaStoredProc being called from plsql pass JPublisher

    I'm facing problems in calling java stored procedure from a plsql procedure.
    1) I have a plsql types
    create or replace type wwpro_api_portlet_instance
    as object
    portlet_inst_guid varchar2(60),
    provider_id number(38),
    portlet_id number(38),
    ref_path varchar2(100)
    create or replace type wwpro_api_portlet_instances
    as table of wwpro_api_portlet_instance
    2)I create java classes from JPublisher for these types as attached with this mail.
    3) There is a sql procedure where I create a instance of wwpro_api_portlet_instances with values populated in it.
    and then pass it to another procedure which is a CallSPec for the java class.
    Call Spec
    procedure export_data_internal
    p_http_url in varchar2,
    p_timeout in number,
    p_service_id in varchar2,
    p_proxy_host in varchar2,
    p_proxy_port in number,
    p_proxy_username in varchar2,
    p_proxy_password in varchar2,
    p_portal_version in varchar2,
    p_encryption_key in varchar2,
    p_message_lang in varchar2,
    p_export_id in varchar2,
    p_provider_id in varchar2,
    p_debug_level in number,
    p_portlet_instances in wwpro_api_portlet_instances
    )as language java
    name 'oracle.webdb.provider.web.ExportImportClient.exportData(
    java.lang.String,
    int,
    java.lang.String,
    java.lang.String,
    int,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.Integer,
    oracle.webdb.provider.web.PortletInstanceArray
    Procedure calling Call Spec
    procedure export_data
    p_export_id in varchar2,
    p_provider_id in number,
    p_portlet_instances in wwpro_api_provider.portlet_instance_table
    ) is
    begin
    --calling Call Spec
    export_data_internal
    p_http_url => l_provider.http_url,
    p_timeout => l_provider.timeout,
    p_service_id => l_provider.service_id,
    p_proxy_host => l_provider.dbtier_proxy_hostname,
    p_proxy_port => l_provider.dbtier_proxy_portnumber,
    p_proxy_username => l_proxy_info.username,
    p_proxy_password => l_proxy_info.password,
    p_portal_version => wwctx_api.get_product_version(),
    p_encryption_key => wwpro_util.get_encryption_key(p_provider_id, TRUE),
    p_message_lang => l_provider.language,
    p_export_id => p_export_id,
    p_provider_id => p_provider_id,
    p_debug_level => wwpro_util.get_debug_level,
    p_portlet_instances => l_portlet_instances <== Populated as I'm sure about it.
    //this gets 'EXP :ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLExc
    eption: Closed Connection'
    end export_data;
    4)Inside the Java class 'oracle.webdb.provider.web.ExportImportClient'.
    public static void exportData
    String url,
    int timeout,
    String serviceId,
    String proxyHost,
    int proxyPort,
    String proxyUser,
    String proxyPass,
    String portalVersion,
    String sharedKey,
    String messageLocale,
    String exportId,
    String providerId,
    Integer portalDebugLevel,
    PortletInstanceArray instances
    )throws Exception
    oracle.webdb.provider.v2.adapter.soapV1.SOAPException
    try
    conn = DriverManager.getConnection("jdbc:default:connection:");
    stmt = conn.createStatement();
    stmt.execute ("INSERT INTO d VALUES ('into ExportImportClient.exportData ')");
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData url :: " + url +"')");
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData instances:: " + instances +"')");
    // Prints this ==> FROM ExportImportClient.exportData instances:: oracle.webdb.provider.web.PortletInstanceArray@78e2087c
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData debugLevel:: " + portalDebugLevel +"')");
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData instances:: " + instances.length() +"')");
    //This Operation is giving the problem as any operation performed on this is clsing the Connection and comming out.
    //This has worked once but did not work after that, I tried this in the 10g as well as 901
    conn.commit();
    }catch(SQLException sqe){
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData sqe error :: " + sqe.getMessage() +"')");
    conn.commit();
    throw sqe;
    catch(Exception e)
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData exception error :: " + e.getMessage() +"')");
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData exception error :: " + e.getClass() +"')");
    conn.commit();
    throw e;
    Any reason what may be happening ? I have done the loadJava of the Jpublisher classes once in the database. After that I never made any changes to
    them, I just modify and upload the oracle.webdb.provider.web.ExportImportClient class.
    What Shold I try to over come this ?
    Also
    thanks
    rahul

    I'm facing problems in calling java stored procedure from a plsql procedure.
    1) I have a plsql types
    create or replace type wwpro_api_portlet_instance
    as object
    portlet_inst_guid varchar2(60),
    provider_id number(38),
    portlet_id number(38),
    ref_path varchar2(100)
    create or replace type wwpro_api_portlet_instances
    as table of wwpro_api_portlet_instance
    2)I create java classes from JPublisher for these types as attached with this mail.
    3) There is a sql procedure where I create a instance of wwpro_api_portlet_instances with values populated in it.
    and then pass it to another procedure which is a CallSPec for the java class.
    Call Spec
    procedure export_data_internal
    p_http_url in varchar2,
    p_timeout in number,
    p_service_id in varchar2,
    p_proxy_host in varchar2,
    p_proxy_port in number,
    p_proxy_username in varchar2,
    p_proxy_password in varchar2,
    p_portal_version in varchar2,
    p_encryption_key in varchar2,
    p_message_lang in varchar2,
    p_export_id in varchar2,
    p_provider_id in varchar2,
    p_debug_level in number,
    p_portlet_instances in wwpro_api_portlet_instances
    )as language java
    name 'oracle.webdb.provider.web.ExportImportClient.exportData(
    java.lang.String,
    int,
    java.lang.String,
    java.lang.String,
    int,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.String,
    java.lang.Integer,
    oracle.webdb.provider.web.PortletInstanceArray
    Procedure calling Call Spec
    procedure export_data
    p_export_id in varchar2,
    p_provider_id in number,
    p_portlet_instances in wwpro_api_provider.portlet_instance_table
    ) is
    begin
    --calling Call Spec
    export_data_internal
    p_http_url => l_provider.http_url,
    p_timeout => l_provider.timeout,
    p_service_id => l_provider.service_id,
    p_proxy_host => l_provider.dbtier_proxy_hostname,
    p_proxy_port => l_provider.dbtier_proxy_portnumber,
    p_proxy_username => l_proxy_info.username,
    p_proxy_password => l_proxy_info.password,
    p_portal_version => wwctx_api.get_product_version(),
    p_encryption_key => wwpro_util.get_encryption_key(p_provider_id, TRUE),
    p_message_lang => l_provider.language,
    p_export_id => p_export_id,
    p_provider_id => p_provider_id,
    p_debug_level => wwpro_util.get_debug_level,
    p_portlet_instances => l_portlet_instances <== Populated as I'm sure about it.
    //this gets 'EXP :ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLExc
    eption: Closed Connection'
    end export_data;
    4)Inside the Java class 'oracle.webdb.provider.web.ExportImportClient'.
    public static void exportData
    String url,
    int timeout,
    String serviceId,
    String proxyHost,
    int proxyPort,
    String proxyUser,
    String proxyPass,
    String portalVersion,
    String sharedKey,
    String messageLocale,
    String exportId,
    String providerId,
    Integer portalDebugLevel,
    PortletInstanceArray instances
    )throws Exception
    oracle.webdb.provider.v2.adapter.soapV1.SOAPException
    try
    conn = DriverManager.getConnection("jdbc:default:connection:");
    stmt = conn.createStatement();
    stmt.execute ("INSERT INTO d VALUES ('into ExportImportClient.exportData ')");
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData url :: " + url +"')");
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData instances:: " + instances +"')");
    // Prints this ==> FROM ExportImportClient.exportData instances:: oracle.webdb.provider.web.PortletInstanceArray@78e2087c
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData debugLevel:: " + portalDebugLevel +"')");
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData instances:: " + instances.length() +"')");
    //This Operation is giving the problem as any operation performed on this is clsing the Connection and comming out.
    //This has worked once but did not work after that, I tried this in the 10g as well as 901
    conn.commit();
    }catch(SQLException sqe){
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData sqe error :: " + sqe.getMessage() +"')");
    conn.commit();
    throw sqe;
    catch(Exception e)
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData exception error :: " + e.getMessage() +"')");
    stmt.execute ("INSERT INTO d VALUES ('FROM ExportImportClient.exportData exception error :: " + e.getClass() +"')");
    conn.commit();
    throw e;
    Any reason what may be happening ? I have done the loadJava of the Jpublisher classes once in the database. After that I never made any changes to
    them, I just modify and upload the oracle.webdb.provider.web.ExportImportClient class.
    What Shold I try to over come this ?
    Also
    thanks
    rahul

  • Java Program Call

    Is it possible to call a Java Program from a ABAP Module Function?

    HI
    GOOD
    GO THROUGH THESE LINKS
    http://www.persistentsys.com/presentation/Java_SAP_Integration.pdf
    http://sap.ittoolbox.com/topics/t.asp?t=303&p=322&h1=303&h2=322
    THANKS
    MRUTYUN

  • DB Call from Oracle Business Rule +Java Method call from OBR

    Hi,
    1.We have a requirement in project where we need to make DB Call from Business rule.
    We are using ORACLE SOA11g.
    Is this possible.Any pointers on this will be helpfull.
    2.Can we call java method from Oracle Business Rule.If so pls suggest how it can be done.
    Thanks In Advance,
    Oracle SOA User

    You can implement java class to make database updates using JDBC. You can add Java class as fact in business rules and invoke methods as actions of the business rules.
    Hope this will help.
    Jayesh Patel
    http://jayesh-patel.blogspot.com/
    http://www.yagnasys.com/

  • Java functions call from C++ App

    Hi,
    I'm new to Java, One of our client have generic APIs for there business logic, those are written in JAVA, now we want to use some of these APIs in C++ application. Can any one suggest/address me the better way to do this?
    Thanks in advance.
    Thanks,
    --Ravi Kiran.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    To call Java functions from C++ you need a VM running in your process, and JNI is the interface you need to use in the C++ code.
    One of the interfaces in JNI lets you create a VM. You generally only want one VM, so if the application started out in Java, you have a VM already and you don't need to create one.
    Note that JNI is really a C <-> Java interface, and usually any C++ code called from Java is C++ 'extern "C"' functions. Java won't know anything about C++ objects. And you use JNI to get C++ to understand Java objects.
    Hope this was helpful.

  • Java program accessible from internet

    Hi,
    I would like to ask if the following scenario is possible.
    We have a java table in our Enterprise SAP portal and a java program that can query this table. We would like to know if we can make this query to be available from outside (internet), probably as a web service or as wsdl.
    We want an external application to provide the criteria and our query query and give back the results.
    Thanks in advanced

    Hello there,
    Please find some more details
    http://help.sap.com/saphelp_nw04/helpdata/en/45/029840cf43495195da923f32262911/frameset.htm
    Regards,
    Vivek

  • Api to call from plsql as clicking button "Configurator" from OM screen

    Hi,
    I need to call an API from Plsql Procedure which performs hte same action as clicking the configurator button in sales order screen.
    Can you please help me out in getting the api name and syntax.
    Thanks,
    Vijaya.

    If you are getting 404 page not found error, then there may a problem in deployment of servlet.
    Are you able to launch your servlet URL directly when requesting from the browser. Type your servlet URL in browser and check the response.
    If you want to have control when configurator finishes its action, you should specify the your servlet url in the return_url parameter in the initialize message used to launch configurator.
    HTH

  • Make a Java program call another program??

    Is there a way to make a Java program execute another program?

    Why dont we demonstrate:
    Program (Windows-based) Calculator.exe
    Code:
    try {
    Runtime.getRuntime().exec("c:/windows/calc.exe");
    } catch(IOException e) {}

  • Error in starting SAP GUI as part of an Java RFC call from a PC

    Hi,
    We are on the 4.6C version of SAP and have the latest basis kernel patches that allow an RFC connection to start the SAP GUI. The program that I am running externally is java using the 3.0.1 JCo. The OS of the PC I am using is Windows XP. The SAPGUI version is 7.10 patch level 11.
    The program seems to be working properly as the command prompt window goes grey as if there is another window being opened but then I get back this error message and I do not see the GUI.
    The message I am getting back is:
    Exception in thread "main" com.sap.conn.jco.JCoException:(136) JCO_ERROR_ILLEGAL_STATE:Launching SAP GUI failed, though it was requested(error message:Communication with SAPGUI timed out)
    at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.startSAPGui(MiddlewareJavaRfc.java:1853)
    at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1285)
    at com.sap.conn.jco.rt.ClientConnection.connect(ClientConnection.java:661)
    at com.sap.conn.jco.rt.PoolingFactory.init(PoolingFactory.java:103)
    at com.sap.conn.jco.rt.ConnectionManager.createFactory(ConnectionManager.java:171)
    at com.sap.conn.jco.rt.DefaultConnectionManager.createFactory(DefaultConnectionManager.java:44)
    at com.sap.conn.jco.rt.ConnectionManager.getFactory(ConnectionManager.java:160)
    at com.sap.conn.jco.rt.RfcDestination.initializ(RfcDestination.java:766)
    at com.sap.conn.jco.rt.RfcDestination.getSystemID(RfcDestination.java:794)
    at com.sap.conn.jco.rt.RepositoryManager.getRepository(RepositoryManager.java:32)
    at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:865)
    at GISToSAPWO_Test.get_wo_call(GISToSAPWo.java:91)
    at GISToSAPWO_Test.main(GISToSAPWO_Test.java:206)
    I have been all over trying to find the solution to this and have come up empty. Any help will be greatly appreciated. If this is the wrong forum for this please let me know and I will re-post.
    Thank you in advance for any information you can pass on about the issue,
    Mark

    Hi Greetson,
    Thank you in advance for your response. It is greatly appreciated.
    1) In a way yes. I am using the connection setting USE_SAPGUI = 1. This is suppose to start the GUI prior to starting the RFC's program run. If this is not correct please let me know.
    2) The code is part of the JCo and the RFC library from what I have read. If this is not correct please let me know.
    3) I am only testing from my PC at this moment. I have re-installed my SAP GUI and am now at patch level 13 on 7.10.
    4) The application passes in the connection information which includes username and password along with the parameters for the RFC call. I would like the SAP GUI to open without the user having to re-enter his/her username and password. I thought that once the RFC is called using the dialog users credentials that the GUI would then open using the connection. I have used the java pooled connection method and it still does not open the GUI.
    5) The purpose is to pass Equipment objects, Functional Location objects and Leak Id objects to an RFC to open a list screen from IW39, List Maintenance Order transaction, for display of each at one pass, as well as open Excel with data from classification for the Leak Id's.
    Hope this sheds some light on the problem I am having. Please let me know if more information is needed.
    Best regards,
    Mark

  • Custom Java class called from RTF template generates error

    We are running a report in BI Publisher and the report calls a custom developed Java class that is used to bind PDFs together and sent the result to another application.
    On the RTF template we have some XSLT that reads the input XML and sets a variable which is then passed to the Java class. We are however getting the following error when the report is called simultaneously 2 or more times:
    XML-22044: (Error) Extension function error: Error invoking 'JavaClassName': 'java.lang.Error: Cannot interweave overlay template with pdf input, combined number of pages is odd!
    I read this as the real cause of the error is the Java code but I'm not 100% sure. Also I don't understand what the error message means.
    Could someone help out please?
    Many thanks

    Since our this requirement is in Quotes module, its not using OAF. It is using plain JSPs and java classes.
    What i was thinking is, create the Option values as flex fields, and write a custom java class to fetch these data from the flex tables and use it in the JSP.
    The main problem we are facing now is,
    "...we wrote a simple java class, which establishes database connection, executes a simple insert & select query to our custom table. compiled & placed the class file under our new pkg structure under $JAVA_TOP eg. oracle.apps.xxx.quot.tmpl , bounced the apache."
    But when we tried to import this class in the jsp (which is being customized), the app just throwed Internal Server Error and we couldnt find any info in the Log file.
    Couldnt guess, why is this simple thing failing. Any idea ?

  • Java class call from form

    Hi
    I'm doing single sign on via cookie and I able to get the cookie value and for decrypting I loaded java classes on the back end, When I called via form the jvm is crashing with some frm-92101 error.
    First I want if anybody can help if I have to run any packages to execute java class from forms, I already created pl/sql wrapper class.
    When I execute the function on the backend and got the decrypted value via pl/sql wrapper package but from forms the web servver is crashing, Can any body help.
    Also where do I see the log file location.
    Thanks in advance for the pro's for helping me
    Thanks
    Murthy

    Dump from the application file.
    08/06/23 14:21:58 formsweb: Forms session <10> exception stack trace:
    java.io.IOException: FRM-93000: Unexpected internal error.
    Details : No HTTP headers received from runform
         at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
         at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    08/06/23 14:52:17 formsweb: Forms session <11> aborted: unable to communicate with runtime process.
    08/06/23 14:52:17 formsweb: Forms session <11> exception stack trace:
    java.io.IOException: FRM-93000: Unexpected internal error.
    Details : No HTTP headers received from runform
         at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
         at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    08/06/23 15:03:21 formsweb: Forms session <12> aborted: unable to communicate with runtime process.
    08/06/23 15:03:21 formsweb: Forms session <12> exception stack trace:
    java.io.IOException: FRM-93000: Unexpected internal error.
    Details : No HTTP headers received from runform
         at oracle.forms.servlet.ListenerServlet.forwardResponseFromRunform(Unknown Source)
         at oracle.forms.servlet.ListenerServlet.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    08/06/23 15:08:21 formsweb: lservlet: destroy
    08/06/23 15:08:21 formsweb: Stopped
    08/06/23 15:08:21 Stopped (Shutdown executed by jazn.com/admin from 127.0.0.1 (localhost))

Maybe you are looking for

  • Not able to display and search on CLOB attribute in default search screen

    Hi, My requirement: I have three VARCHAR attributes and 1 CLOB attribute. i need to search the values on these 4 attributes. Created View crieteria on these 4 attributes and created default ADF search screen. but not able to add the CLOB attribute as

  • Invoice/payment matching report

    Hi I am very new to AP,I would like to know if there is an exsiting report which will show the vendor invoice as well as our payment...thanks!

  • Uploading of Documents into Portal through KM

    Dear Experts. I am New using KM. I need display a page HTML using a link in the portal of Employee Self-Service. My idea is upload a page in the KM and get a URL and with this create a service(link) in the portal for call this URL. I never have used

  • Odd behavior when exporting to TXT

    Post Author: mattlscc CA Forum: Exporting http://pixelspotlight.com/problem.docIf you view the document I created above you will noticed that in the preview of my report everything looks as I want it to appear... but once I export the report to TXT f

  • UCCX Scripting question

    We have a requirement from our client running UCCX version 8.5 to route calls within a certain time period to the same agent that dealt with the last call from that specific calling number.  I recognise that this is probably a fairly complex scriptin