Simple native to java call.

I'm 100% new to JNI programming, and haven't the foggiest Idea how to call a method from my native C program to Java.
If anyone could whip something quick up, so I can get a clue, that would be great. Thanks
H011ywood

You must be joking.
Why don't you quickly whip up your enthusiasm to do something yourself?

Similar Messages

  • Java call terminated by uncaught Java exception: java.lang.NullPointerExcep

    i have written this program of adding file items using wwsbr_api.add_item but,
    1 declare
    2 l_new_item_master_id number;
    3 l_caid number := 53;
    4 l_folder_id number := 50279;
    5 begin
    6 select c.id, f.id
    7 into l_caid, l_folder_id
    8 from portal.wwsbr_all_content_areas c,
    9 portal.wwsbr_all_folders f
    10 where c.id = f.caid and c.name = 'S_T_PAGE'
    11 and f.name = 'S_PAGE';
    12 --portal.wwctx_api_private.set_context('PORTAL');
    13 l_new_item_master_id := portal.wwsbr_api.add_item(
    14 p_caid => l_caid,
    15 p_folder_id => l_folder_id,
    16 p_display_name => 'simple file item',
    17 p_type_id => portal.wwsbr_api.ITEM_TYPE_FILE,
    18 p_type_caid => portal.wwsbr_api.SHARED_OBJECTS,
    19 p_region_id => 4571,
    20 p_file_filename => 'D:\ora\training\html\frame.html'
    21 );
    22 -- process cache invalidation messages
    23 portal. wwpro_api_invalidation.execute_cache_invalidation;
    24* end;
    SQL> /
    this program is showing the following exception. kindly give the solution urgently..........
    declare
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
    ORA-06512: at "PORTAL.WWSBR_API", line 37
    ORA-06512: at "PORTAL.WWSBR_API", line 610
    ORA-06512: at line 13

    can any one of u please give me the reply to the above error,
    urgently.............

  • Java call rfc check in original:error while checking in and storing.

    hi,experts.
    java call rfc check in original:error while checking in and storing. BAPI in the RFC is "BAPI_DOCUMENT_CJANGE2",
    the RFC was fine in SE37 and calling by Visual Basic. and in java,when mConnection.setAbapDebug(true), and  runing by step and step, was fine too.
    if mConnection.setAbapDebug(false) in JAVA, up error in title was displayed.
    what cause this error?
    Best Regards.

    Hi Priya
    Please use Su53 after getting the error and find any authorization is missing for the user..
    S_GUI Full Authorization is required..
    Since by giving BASIS Authorization its rectificed, then it shud be mostly due to Auth issues only
    Regards
    Aby

  • "ORA-29532: Java call terminated by uncaught Java exception

    Dear Oracle:
    I am trying to establish an HTTPS connection from a Java stored
    procedure that is wrapped in a PL/SQL procedure and loaded into a
    Package. We are running on Oracle 8.1.7.
    My Java code compiles and runs fine when run stand-alone outside
    Oracle; I can establish the connection to a secure server and talk to
    the server. However when I load this Java class (using the loadjava
    utility) this class can no longer run and I get a the following
    exception:
    "ORA-29532: Java call terminated by uncaught Java exception:
    javax.net.ssl.SSLException: SSL handshake failed:
    X509CertChainIncompleteErr"
    I have tried loading the JSSE from Sun and I still get the same error.
    Searching in the Discussing Forums I found the following link (which
    describes a procedure that logs into the UPS secure server site and
    grabs some XML) http://osi.oracle.com/~mbpierma/SSL_Java_DB.html .
    This code works ok if we try to connect to UPS server. However this
    code doesn't work if we try to log in to a different server (such as
    ???). If I modify this code slightly and try to log to any other
    sever server I get the same error as the one above. Investigation
    lead us to understand that the certificate at the UPS web site is a
    self-signed certificate -- not one generated by a major 'recognized'
    authority such as Verisign or Thawte.
    Further research pointed me to the following URL
    http://www.znow.com/sales/oracle/network.816/a76932/appf_ora.htm#619367
    This URL has the documentation for JAVA SSL for 8.1.6 which I figure
    I could read and try to make it work in 8.1.7.
    I looked at your Secure Hello World example, however the code is
    missing the most critical parts of the whole example, it does not
    specify where the certificate or any of the security settings come
    from (see the attached JavaCertExample.txt file).
    So, my questions are the following:
    1) What should I do to avoid the error mentioned above?
    2) Do you have a sample piece of code that describes how to make a
    HTTPS connection using a Java stored procedure?
    3) Can I make the HTTPS connection using a URL class and not using
    sockets directly?
    4) Do I need to load the JSEE provided by Sun?
    5) Will the solution be different for Oracle 9i?
    // SecureHelloClient.java
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import javax.net.ssl.*;
    import javax.security.cert.X509Certificate;
    import oracle.security.ssl.OracleSSLCredential;
    import oracle.security.ssl.OracleSSLSocketFactory;
    import oracle.security.ssl.OracleSSLProtocolVersion;
    import oracle.security.ssl.OracleSSLSession;
    public class SecureHelloClient
    public static void main(String argv[])
    String hostName = "localhost";
    if(argv.length != 0)
    String hostName = argv[0];
    // Set the SSLSocketFactoryImpl class as follows:
    java.util.Properties prop = System.getProperties();
    prop.put("SSLSocketFactoryImplClass",
    "oracle.security.ssl.OracleSSLSocketFactoryImpl");
    try
    // Get the default socket factory
    OracleSSLSocketFactory sSocFactory
    = (OracleSSLSocketFactory)SSLSocketFactory.getDefault();
    sSocFactory.setSSLProtocolVersion(OracleSSLProtocolVersion.SSL_Version_3_0);
    OracleSSLCredential sslCredObj = new OracleSSLCredential();
    // Where did these values come from? caCert, userCert, trustedCert,
    // Set the certificate chain and private key if the
    // server requires client authentication
    sslCredObj.addCertChain(caCert)
    sslCredObj.addCertchain(userCert)
    sslCredObj.setPrivateKey(userPvtKey, userPassword)
    // Populate credential object
    sslCredObj.addTrustedCert(trustedCert);
    sSocFactory.setSSLCredentials(sslCredObj);
    // Create the socket using factory
    SSLSocket jsslSoc =
    (SSLSocket)sSocFactory.createSocket(hostName, 8443);
    String [] ciphers = jsslSoc.getSupportedCipherSuites() ;
    // Select the ciphers you want and put them.
    // Here we will put all availabel ciphers
    jsslSoc.setEnabledCipherSuites(ciphers);
    // We are creating socket in client mode
    jsslSoc.setUseClientMode(true);
    // Do SSL handshake
    jsslSoc.startHandshake();
    // Print negotiated cipher
    System.out.println("Negotiated Cipher Suite: "
    +jsslSoc.getSession().getCipherSuite());
    System.out.println("");
    X509Certificate[] peerCerts
    = ((javax.net.ssl.SSLSocket)jsslSoc).getSession().getPeerCertificateChain();
    if (peerCerts != null)
    System.out.println("Printing server information:");
    for(int i =0; i ? peerCerts.length; i++)
    System.out.println("Peer Certificate ["+i+"] Information:");
    System.out.println("- Subject: " + peerCerts.getSubjectDN().getName());
    System.out.println("- Issuer: " + peerCerts[i].getIssuerDN().getName());
    System.out.println("- Version: " + peerCerts[i].getVersion());
    System.out.println("- Start Time: " + peerCerts[i].getNotBefore().toString());
    System.out.println("- End Time: " + peerCerts[i].getNotAfter().toString());
    System.out.println("- Signature Algorithm: " + peerCerts[i].getSigAlgName());
    System.out.println("- Serial Number: " + peerCerts[i].getSerialNumber());
    else
    System.out.println("Failed to get peer certificates");
    // Now do data exchange with client
    OutputStream out = jsslSoc.getOutputStream();
    InputStream in = jsslSoc.getInputStream();
    String inputLine, outputLine;
    byte [] msg = new byte[1024];
    outputLine = "HELLO";
    out.write(outputLine.getBytes());
    int readLen = in.read(msg, 0, msg.length);
    if(readLen > 0)
    inputLine = new String(msg, 0, readLen);
    System.out.println("");
    System.out.println("Server Message:");
    System.out.println(inputLine );
    else
    System.out.println("Can't read data from client");
    // Close all sockets and streams
    out.close();
    in.close();
    jsslSoc.close();
    catch(SSLException e)
    System.out.println("SSL exception caught:");
    e.printStackTrace();
    catch(IOException e)
    System.out.println("IO exception caught:");
    e.printStackTrace();
    catch(Exception e)
    System.out.println("Exception caught:");
    e.printStackTrace();

    Hi,
    I have the same problem.
    Is some ORACLE guru that can help us ?
    We need to communicate with some servlet
    via POST method of https (SSL3)
    and with using private certificate on the client site.
    We need furthermore allow using of some proxy.
    Client site is realized as set of stored procedures within ORACLE 8.1.7
    In this time I am able to communicate with server without SSL and certificate
    using package utl_tcp
    (but with this solution without certificate is our customer not satisfied -:))
    ORACLE help us please !
    Pavel Pospisil
    [email protected]

  • Java call to RFC FM for replacing CRM pricing

    Hi Experts,
    I have a requirement to make a RFC call to retrieve the pricing from ECC in CRMD_ORDER transaction after hit enter key with product/qty entry (use Web UI/shop/IC as frontend). Is it possible to made a Java call to RFC FM in SAP CRM which in turn calls R/3 to execute pricing and display this price on web order page?  If yes, any documentation/samples and advise please.
    Thanks in advance, Jin

    Hi all,
    Following the AP7 Pricing Userexit Manual, I can change the price value in the exit (good doc, thanks).  my next steip is to get sales org, customer and product info to make RFC, but I don't know from which Interface I can retrieve these info, can anyone help me? any doc or sample code?
    Thanks, Jin

  • Oracle BI 11.1.1.7.1: Calling BI webservices from Plsql Procedure: ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoClassDefFoundError

    Hi,
         I have a requirement of calling BI webservices from Plsql stored procedure. I generated all my wsdl java classes and loaded them into the database. However, when I tried to call one of my java class using stored procedure, it is giving me"ORA-29532: Java call terminated by uncaught Java exception: java.lang.NoClassDefFoundError".
    *Cause:    A Java exception or error was signaled and could not be
               resolved by the Java code.
    *Action:   Modify Java code, if this behavior is not intended.
    But all my dependency classes are present in database as java class objects and are valid. Can some one help me out of this?

    Stiphane,
    You can look in USER_ERRORS to see if there's anything more specific reported by the compiler. But, it could also be the case that everything's OK (oddly enough). I loaded the JavaMail API in an 8.1.6 database and also got bytecode verifier errors, but it ran fine. Here are the errors I got when loading Sun's activation.jar, which ended up not being a problem:
    ORA-29552: verification warning: at offset 12 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
    verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):12 by a throw at offset 18 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
    verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):18 by a throw at offset 30 of <init> void (java.lang.String, java.lang.String) cannot access class$java$io$InputStream
    verifier is replacing bytecode at <init> void (java.lang.String, java.lang.String):30 by a throw
    Hope this helps,
    -Dan
    http://www.compuware.com/products/devpartner/db/oracle_debug.htm
    Debug PL/SQL and Java in the Oracle Database

  • Error: ORA-29532: Java call terminated by uncaught Java exception:

    Anyone have this similar problem of
    ORA-29532: Java call terminated by uncaught Java exception:
    javax.xml.rpc.soap.SOAPFaultException: Caught exception while handling request:
    deserialization error: XML reader error: unexpected character content:
    "A"
    The service is running fine in a browser and returns the date. When I run it using the PL/SQL it has the error mentioned above.
    I am running the following:
    CREATE OR REPLACE FUNCTION GetDate_wb( p_dummy IN VARCHAR2 )
    RETURN DATE
    AS
    l_service sys.UTL_DBWS.service;
    l_call sys.UTL_DBWS.call;
    l_result ANYDATA;
    l_wsdl_url VARCHAR2(1024);
    l_service_name VARCHAR2(200);
    l_operation_name VARCHAR2(200);
    l_input_params sys.UTL_DBWS.anydata_list;
    l_port sys.UTL_DBWS.qname := 8988;
    BEGIN
    l_wsdl_url := 'http://org-lblakisa1:8988/BPEL_OD-LoginWS-context-root/getDate1SoapHttpPort?WSDL';
    l_service_name := 'getDate1';
    l_operation_name := 'getDate';
    l_service := sys.UTL_DBWS.create_service (
    wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
    service_name => l_service_name);
    l_call := sys.UTL_DBWS.create_call (
    service_handle => l_service,
    port_name => NULL,
    operation_name => l_operation_name);
    l_input_params(1) := ANYDATA.ConvertVarchar2(p_dummy);
    l_result := sys.UTL_DBWS.invoke (
    call_handle => l_call,
    input_params => l_input_params);
    sys.UTL_DBWS.release_call (call_handle => l_call);
    sys.UTL_DBWS.release_service (service_handle => l_service);
    RETURN ANYDATA.AccessDate(l_result);
    END;
    /

    Problem is resolved... We had a version issue in that 10.1.3 web service is not compatible. 10.1.2 worked.

  • Webdynpro JAVA call ARFC

    Hi Friend
    I created the "ZBEN_DEMO_RFC" RFC in IDS.
    When Webdynpro Java call the "ZBEN_DEMO_RFC" get a error.
    How to get a ARFC?
    Regards
    Ben

    Hi Ben,
    I think problem is related to autherization, please chekc the userID/password and check SSO ticket for authorization while defining a metadata JCO Destination.
    You can trace error RFC_ERROR_SYSTEM_FAILURE exception, have a look at the dev_jrfc.trc files. These files are written by JRFC and can be found in the directories j2ee/cluster/server* of the J2EE Application Server Installation.
    Refre this WDJ - Adaptive RFC Troubleshooting Guide:-
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0019b1a-775f-2910-beb8-d81f27d0d8d0?quicklink=index&overridelayout=true
    http://wiki.sdn.sap.com/wiki/display/EP/8EstablishSingleSignOnbetweenPortal%28frontend%29andESS6.0%28backend%29
    Hope this may help you
    Deepak!!!
    Edited by: Deepak Arora on May 17, 2010 6:00 AM

  • Java call out in OSB 10g

    in java call out in OSB, is it possilble to pass java object or java collection (like list,arraylist) as argument to the java method and during configuration at OSB proxy service is it possible to fetch the value from java object from java call out .I have tried it and i am able pass string and xml object as argument and get string type only.please guide me.

    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/pojo.html
    "The input and return types for Java callouts are not restricted. However, any return types other than primitives, Strings, or XmlObjects can only be passed (unmodified) to other Java callouts. See Java Content in the body Variable for more information about storing and passing Java objects in the pipeline."

  • Java calls from ABAP code in XI

    Java and ABAP gurus,
    Is it possible to make java call from ABAP. Is a sample out there I can take a look at.
    Please help.
    Thanks.

    Hi,
    YES, Very well it  is Possible,
    This will help you
    /people/bv.pillai/blog/2006/09/28/calling-mdm-java-api-application-executable-from-abap
    /people/vijayasarathy.raghunathan/blog/2005/12/28/java-editor-inside-abap
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    JCo Outbound( calling Java Function from ABAP )
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    Call Java Class and Methods from ABAP
    Regards
    Agasthuri Doss

  • Is there one simple button or option called "delete or remove duplicates" ??

    is there one simple button or option called "delete or remove duplicates" ??

    to clarify..in winamp you simply click remove duplicates and all duplicate songs are removed. In Itunes it appears you have to click on each individuale song. (yes you can hold the control key and hit delete one time , but when yo uhave hundreds or thousands of songs this is very time consuming
    Surely there must be a faster simpler way??????
    Message was edited by: IanLeg
    NO THIS DIDS NOT SOLVE ANYTHING i'M ADDING TO MY ORIGINAL QUESTION. I DID NOT SAY IT SOLVED IT
    THE ITUNES APPLE CRAP IS REDICULOUS

  • Java Call out - Error

    Hi,
    I'm trying to call a Java Class method from BPEL and the Java Class is packaged into a JAR and copied the same into SCA-INF/lib folder of the SOA composite application.
    My Java Class is:
    package uk.co.utilities;
    public class Utils {
    public Utils() {
    public String sayHello(String Value) throws Exception{
    String result = "";
    try{
    result = "Hello !!!" + Value;
    }catch(Exception e){
    e.printStackTrace();
    return result;
    The BPEL snippet code for the Java Call out is:
    <bpelx:exec import="uk.co.utilities"/>
    <bpelx:exec name="javaInvoke" version="1.5" language="java">
    <![CDATA[Utils testUtils = new Utils();     
    String testResult = testUtils.sayHello("User");
    setVariableData("TempResult",testResult);]]>
    </bpelx:exec>
    I have tried to build the project,but getting the following error:
    Error(21,36): Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "bpelJavaMethod" of composite "default/prjJAVAMethod!1.0"
    The class path setting is incorrect.
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    It seems that the BPEL couldn't find the JAR method,but i have copied the JAR into SCA-INF/lib folder and added it to the " libraries and classpath " of the project.
    Please do help me.
    Thanks,
    Sri.

    Hi Sri,
    Can you check this out, will be helpful for you to find out where is the issue.
    http://yatanveersingh.blogspot.com/2011/08/how-to-call-java-method-inside-bpel.html
    -Yatan

  • OSB java call out with array parameters

    Hi all,
    I have a java call out with array parameters, follow the firm of java method:
    logBody2(String category, XmlObject headerXml, String[] level, XmlObject[] xml)
    The java call out have String[] and XmlObject[] arrays in intput, my question is how I can pass these arrays of values at java call out?
    Thk
    L.

    For array, comma-separated values should be passed. For e.g. -
    If input parameter is of type String[] then passed values should be comma-separated strings like - 'Anuj','Dwivedi'
    If input parameter is of type XmlObject[] then passed values should be comma-separated XmlObject like - <anuj/>,<dwivedi/>
    Regards,
    Anuj

  • ISchedulerTask and SAP JAVA call

    Hi All,
    Has anyone made a JAVA call to a SAP RFC from the SchedulerTasks?
    The SAP JAVA Connector code requires the IPortalComponentRequest for it to work.  However in the ISchedulerTask run() method, I believe that it can not be obtained.
    I am interested to hear from other people with similar experiences or comments.
    Cheers,
    Vic

    I have used ScheduleTasks to grab the data via BAPIs from BW. These requires you to write a portal service that executes the bapi and then the SchedulerTask calls the portal service.
    Scheduler Task->Portal Service->RFC or BAPI
    You still have one issue which is IPortalComponentRequest. Portal service doesn't have access to it but you can get around it by setting up a SAP system for usermapping and then mapping that userid to a generic userid. Example code:
    private IConnection getConnection(
                   String alias)
                   throws Exception {
    IUser user =
    UMFactory.getUserFactory().getUserByLogonID("Administrator");     
    IConnectorGatewayService cgService = (IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
    ConnectionProperties prop = new ConnectionProperties(user.getLocale(), user);
    return cgService.getConnection(alias, prop);

  • Any one use java call oracle ERP stored procdure

    Hi,
    Any one use java call oracle ERP stored procdure?
    Example I want ues java call below stored, it can work , but in Oracle ERP have error : "APP-MRP-22130: Cannot connect to database
    Cause: The current routine cannot connect to the database.
    Action: Contact your system administrator or customer support representative.
    CREATE OR REPLACE procedure XXBOM_ITEM_IMPORT
    is
    x number;
    begin
    fnd_global.apps_initialize
    (1070, /*i_user_id*/
    20634, /*i_responsibility_id*/
    401 /*i_application_id*/
    /* import item */
    x := fnd_request.submit_request(
    application => 'INV',
    program => 'INCOIN',
    argument1 => 141,
    argument2 => 1,
    argument3 => 1,
    argument4 => 1,
    argument5 => 1
    end;

    Note 164701.1 in metalink may be relevant.

Maybe you are looking for

  • How to display the values from the table in the screen

    Hi, I have created a screen where i will enter the values for the field treshold amount and desc and if i press update button  .it will update the new values by overriting the existing values . Now i have got requirement i need to create a button sho

  • Data insertion in the file?

    I have a text file with some content. I have some text to be inserted at some line number. I tried using RandomAccessFile class to do it. However it's overwriting the pre-existing content. Is it possible to avoid overwriting of the pre-existing conte

  • Facebook albums not showing all photos in iPhoto

    I'm trying to export all of the photos (several hundred) from Facebook to iPhoto. Facebook is having difficulty creating an archive, and rather than wait for them to fix whatever that problem is I'm trying to import them directly using the Facebook c

  • To split the records of the internal table and send in Packets to XI

    Hi All, I am executing the program in SAP. Program will send the material numbers to Oracle through XI and in turn we will get the corresponding data back to SAP. and this all data is written into the file. if records are more than 700 then XI will n

  • Text Tab Missing in Sales order Header

    Hi, I have issue i can not able to see Text tab at header level in Sales document. But it is there at item level. How can i solve this problem? Because of this my billing document is giving error. Thanks V