Native Call (Java Call C program)

Hi all,
I am facing problem on compile the .so file for native call.
In step by step tutorial, after I compile as :
cc -G -I/opt/java1.3/include -I/opt/java1.3/include/hp-ux \HelloWorldImp.c -o libhello.so
Fllowing error occur :
/usr/ccs/bin/ld: Unsatisfied symbols:
main (code)
I am using HP-UX, any hints ?

I solved the problem.
Compile method in HP is not equal to Solaris.
and thus throw that error if I follow the step by step tutorial in Sun's page.
Details refer to :
http://www.hp.com/products1/unix/java/infolibrary/prog_guide/java1_3/JNI_java2.html

Similar Messages

  • 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?

  • Error while calling java program from ABAP

    Hi Experts,
    We are trying for RFC inbound scenario.
    We followed the below blog
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    We are working with SAP JCO 3.0.2
    We are getting the error : 'STFC_CONNECTION' could not be found in the server repository.
    After I run the Java server program if I execute the RFC destination directly from SM 59 it is showing successful messages.
    If I stop the java program then this RFC is failing. Based on this we concluded that RFC to Java connection is working fine.
    But as mentioned in blog if we call the RFC Destination from ABAP program it is giving the below error,
    'STFC_CONNECTION' could not be found in the server repository.
    If we test the RFC destination using RFC_TRUSTED_CHECK standard FM we are getting the below error.
    'RFCPING' could not be found in the server repository.
    We create the RFC destination of Type : TCP/IP as exactly mention in the blog.
    Please help us in resolving this issue.
    Thanks
    Prince

    Pabi,
    Using the RFC connection,we can establish a link between Java and SAP.
    Afterwards,hope we can call Java program from ABAP.
    Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
    DATA: REQUTEXT LIKE SY-LISEL,
          RESPTEXT LIKE SY-LISEL,
          ECHOTEXT LIKE SY-LISEL.
    DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
    DATA: RFC_MESS(128).
    REQUTEXT = 'HELLO WORLD'.
    RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
    CALL FUNCTION 'STFC_CONNECTION'
       DESTINATION RFCDEST
       EXPORTING
         REQUTEXT = REQUTEXT
       IMPORTING
         RESPTEXT = RESPTEXT
         ECHOTEXT = ECHOTEXT
       EXCEPTIONS
         SYSTEM_FAILURE        = 1 MESSAGE RFC_MESS
         COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
    IF SY-SUBRC NE 0.
        WRITE: / 'Call STFC_CONNECTION         SY-SUBRC = ', SY-SUBRC.
        WRITE: / RFC_MESS.
    ENDIF.
    Regards,
    Sree

  • How to call  java program from ABAP

    Hi Experts,
         My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
      Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
    DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
    parameter TYPE string VALUE 'D:java MyFirstProgram'.
    CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
    application = command
    parameter = parameter
    OPERATION = 'OPEN'
    EXCEPTIONS
    cntl_error = 1
    error_no_gui = 2
    bad_parameter = 3
    file_not_found = 4
    path_not_found = 5
    file_extension_unknown = 6
    error_execute_failed = 7
    OTHERS = 8.
    Thanks.

    This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
    Implement an RFC server in 7.0:
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
    Implement an RFC server in 7.1 or higher:
    http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm

  • Calling Java program from ABAP

    Hi All,
    my ABAP program downloads one file to one folder. Then one Java program is running to Encrypt the file.
    Now , they want to call the JAVA program in ABAP, so that they can encrypt the file before downloading.
    Is it possible to call a Java program from ABAP ? If Yes, please give me the detailed procedure.
    Thanks
    pabi

    Pabi,
    Using the RFC connection,we can establish a link between Java and SAP.
    Afterwards,hope we can call Java program from ABAP.
    Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
    DATA: REQUTEXT LIKE SY-LISEL,
          RESPTEXT LIKE SY-LISEL,
          ECHOTEXT LIKE SY-LISEL.
    DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
    DATA: RFC_MESS(128).
    REQUTEXT = 'HELLO WORLD'.
    RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
    CALL FUNCTION 'STFC_CONNECTION'
       DESTINATION RFCDEST
       EXPORTING
         REQUTEXT = REQUTEXT
       IMPORTING
         RESPTEXT = RESPTEXT
         ECHOTEXT = ECHOTEXT
       EXCEPTIONS
         SYSTEM_FAILURE        = 1 MESSAGE RFC_MESS
         COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
    IF SY-SUBRC NE 0.
        WRITE: / 'Call STFC_CONNECTION         SY-SUBRC = ', SY-SUBRC.
        WRITE: / RFC_MESS.
    ENDIF.
    Regards,
    Sree

  • Calling java program in bipublisher

    Hi,
    Like we have datamodel types in BIPublisher as SQL Query, Webservice, Answers, File etc,, Can we call java program through bipublisher.
    The requirement is:
    A java program will generate BARCODE image based on the customer number given.
    We need to create a template in bipublisher which shows the customer name and that barcode image and other details.
    We have calling javaprograms in ibots in analytics, is there any such thing in bipublisher.
    Thanks.

    You can call PL/SQL programs from OWB either by defining transformations or as expressions. From PL/SQL you can call a java stored procedures in the database as follows:
    1. Define the java stored procedure. For example, let's suppose that you store the following Java class in the database:
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class Adjuster {
    public static void raiseSalary (int empNo, float percent)
    throws SQLException {
    Connection conn = new OracleDriver().defaultConnection();
    String sql = "UPDATE emp SET sal = sal * ? WHERE empno = ?";
    try {
    PreparedStatement pstmt = conn.prepareStatement(sql);
    pstmt.setFloat(1, (1 + percent / 100));
    pstmt.setInt(2, empNo);
    pstmt.executeUpdate();
    pstmt.close();
    } catch (SQLException e) {System.err.println(e.getMessage());}
    2. The class Adjuster has one method, which raises the salary of an employee by a given percentage. Because raiseSalary is a void method, you publish it as a procedure using this call spec:
    CREATE PROCEDURE raise_salary (empno NUMBER, pct NUMBER)
    AS LANGUAGE JAVA
    NAME 'Adjuster.raiseSalary(int, float)';
    3. Call procedure raise_salary from an anonymous PL/SQL block, as follows:Long postings are being truncated to ~1 kB at this time.

  • Call Java Program from ABAP Program

    Dear all,
    In our scenario, we need to let ABAP call services provided by a standalone Java program. From online help I found some overview introduction and I'd make the called program a registered program in a RFC with type "T" (TCP/IP Connection). Can anybody give some concrete documentation? A step-by-step guide would be greatly appreciated.
    Best Regards
    Jerome

    check this thread
    Re: Calling Java API from ABAP using JCo

  • How to call java program by HTML page

    Hi guys,
    I'm new java programer and want to build an HTML page to access to ORACLE database on NT server by JDBC, Can anyone give me a sample?
    I already know how to access database by JDBC, but I don't know how to call java program by HTML page.
    If you have small sample,pls send to me. [email protected], thanks in advance
    Jian

    This code goes with the tutorial from this web page
    http://java.sun.com/docs/books/tutorial/jdbc/basics/applet.html
    good luck.
    * This is a demonstration JDBC applet.
    * It displays some simple standard output from the Coffee database.
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.util.Vector;
    import java.sql.*;
    public class OutputApplet extends Applet implements Runnable {
    private Thread worker;
    private Vector queryResults;
    private String message = "Initializing";
    public synchronized void start() {
         // Every time "start" is called we create a worker thread to
         // re-evaluate the database query.
         if (worker == null) {     
         message = "Connecting to database";
    worker = new Thread(this);
         worker.start();
    * The "run" method is called from the worker thread. Notice that
    * because this method is doing potentially slow databases accesses
    * we avoid making it a synchronized method.
    public void run() {
         String url = "jdbc:mySubprotocol:myDataSource";
         String query = "select COF_NAME, PRICE from COFFEES";
         try {
         Class.forName("myDriver.ClassName");
         } catch(Exception ex) {
         setError("Can't find Database driver class: " + ex);
         return;
         try {
         Vector results = new Vector();
         Connection con = DriverManager.getConnection(url,
                                  "myLogin", "myPassword");
         Statement stmt = con.createStatement();
         ResultSet rs = stmt.executeQuery(query);
         while (rs.next()) {
              String s = rs.getString("COF_NAME");
              float f = rs.getFloat("PRICE");
              String text = s + " " + f;
              results.addElement(text);
         stmt.close();
         con.close();
         setResults(results);
         } catch(SQLException ex) {
         setError("SQLException: " + ex);
    * The "paint" method is called by AWT when it wants us to
    * display our current state on the screen.
    public synchronized void paint(Graphics g) {
         // If there are no results available, display the current message.
         if (queryResults == null) {
         g.drawString(message, 5, 50);
         return;
         // Display the results.
         g.drawString("Prices of coffee per pound: ", 5, 10);
         int y = 30;
         java.util.Enumeration enum = queryResults.elements();
         while (enum.hasMoreElements()) {
         String text = (String)enum.nextElement();
         g.drawString(text, 5, y);
         y = y + 15;
    * This private method is used to record an error message for
    * later display.
    private synchronized void setError(String mess) {
         queryResults = null;     
         message = mess;     
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();
    * This private method is used to record the results of a query, for
    * later display.
    private synchronized void setResults(Vector results) {
         queryResults = results;
         worker = null;
         // And ask AWT to repaint this applet.
         repaint();

  • How i can call java program in VB2005 ?

    Hi members...
    Please...please...please...
    If any one now how i can call java program in VB.net program and open it ,please i want now the way to do it by details and by examples and step step to do it ,,..
    thanks ...

    If your server does not return to the command prompt, write a java programm which starts your server and returns to the command prompt.
    An example for an application like this:
    import java.io.IOException;
    public class StartApp
    public static void main(String[] args)
    if (args.length > 0)
    StringBuffer cmd = new StringBuffer();
    for (int index = 0; index < args.length; index++)
    cmd.append(args[index] + " ");
    try
    Runtime.getRuntime().exec(cmd.toString());
    catch (IOException ioe)
    System.out.println("Error: command not found: " + cmd.toString());
    else
    System.out.println("Error: missing arguments");
    An example for starting your server with that programm:
    /usr/bin/java -jar ./StartApp.jar /usr/bin/java -jar ./myServer.jar
    It works. Have fun.

  • Is there any way to call java program whenever i login to R3 System.?

    Hi Experts
    Is there any way to call java program whenever i login to R3 System.
    Means Whenever the user login to R3 system i should trigger one java program.. Is there any way
    Please help me
    Thanks & Regards
    Ravi Shankar B

    If you want to access to the Windows Taskbar, you should call some Win32 APIs and JNI. Refer to Win32 references.

  • Calling Java programs from Oracle Stored Procedure

    Is it possible to call Java programs from Oracle stored procs? If possible Can this be used to exchange data from other applications? Is there a better method/feature in oracle for doing data exchange with other apps?

    If what you mean by Oracle stored procedures is pl/sql then yes.
    You can create a "wrapper" this way:
    CREATE OR REPLACE FUNCTION xmlXform
    in_mapUrl IN VARCHAR2,
    in_inputUrl IN VARCHAR2
    RETURN VARCHAR2
    AS
    LANGUAGE JAVA NAME
    'com.yourcompany.xml2any.xform(java.lang.String,java.lang.String)
    RETURN java.lang.String';
    Then load the java as:
    loadjava -user youruser/youruserpasswd -resolve -verbose lib/xmlparserv2.jar classes/com/yourcompany/xform.class classes/com/yourcompany/xml2any.class
    The java, given the correct permissions, can do anything java can do including communicate with outside applications.
    Is this the "best" way... depends on what you are trying to accomplish.

  • Calling Java methods from C program

    After a year or so using these excellent forums to answer my queries, without ever having to post a question, I've finally had to ask for help with this one. I've already looked through the JNI tutorial, and these forums, extensively, but I'm still not quite sure of how best to solve my problem.
    I need to call Java methods from a C program. I've already used JNI to call a simple C program from Java, and that's fine, but I just can't determine exactly what I need to do for the reverse to work.
    What is the definitive solution for calling Java from C? Is it to use the invocation APIs to create a JVM, and then access it through the various GetMethod, FindClass methods? Or can I 'reverse engineer' the process I followed to get Java to call C?? The tutorial is a bit confusing, as the example it gives uses Callback stuff, but I guess that's only useful when you want to go Java-C-Java??
    Advice appreciated,
    Rich

    Forgive my blatant bumping, but anyone, please?

  • Calling java from XSLT

    Hi All,
    I am trying to call java method from XSLT file. It works fine on stand alone when I use Simple Transformation java program for transformation, but the same code is throwing exception in weblogic application server.
    Please help me on this issue.
    Exception:
    ERROR: The first argument to the non-static Java function 'getRev' is not a valid object reference.
    FATAL ERROR: 'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:828)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:617)
         at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2737)
    at weblogic.transaction.internal.ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2657)
    at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:285)
    at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:233)
    at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:621)
    at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:60)
    at weblogic.ejb.container.internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java:441)
    at com.agile.pc.cmserver.change.ChangeSessionBean_3rbfzs_EOImpl.processWorkflowExtensions(ChangeSessionBean_3rbfzs_EOImpl.java:10838)
    at com.agile.pc.cmserver.base.CMRouteSessionBean.changeStatus(CMRouteSessionBean.java:960)
    at com.agile.pc.cmserver.base.CMRouteSessionBean.changeStatus(CMRouteSessionBean.java:898)
    at com.agile.pc.cmserver.base.CMRouteSessionBean.changeStatus(CMRouteSessionBean.java:888)
    at com.agile.pc.cmserver.change.ChangeSessionBean_3rbfzs_EOImpl.changeStatus(ChangeSessionBean_3rbfzs_EOImpl.java:12050)
    at com.agile.ipa.pc.CMRoute.changeStatus(CMRoute.java:705)
    at com.agile.ui.pcm.common.RouteHandler.changeStatus(RouteHandler.java:1747)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.agile.ui.web.action.ActionServlet.invokeMethod(ActionServlet.java:1067)
    at com.agile.ui.web.action.ActionServlet.handleRequest(ActionServlet.java:672)
    at com.agile.ui.web.action.ActionServlet.doPost(ActionServlet.java:309)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at com.agile.ui.pcm.common.filter.RemoteFSRequestFilter.doFilter(RemoteFSRequestFilter.java:148)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at com.agile.ui.web.filter.LoggingFilter.doFilter(LoggingFilter.java:108)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at com.agile.ui.pcm.common.filter.WebClientLog.doFilter(WebClientLog.java:78)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at com.jspbook.GZIPFilter.doFilter(GZIPFilter.java:21)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at com.agile.ui.pcm.common.filter.SSOTicketFilter.doFilter(SSOTicketFilter.java:89)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    XSLT sample code:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:pl="com.oracle.test.Sample" version="2.0">
         <xsl:template match="/">
              <xsl:variable name="rev" select="'02'" />
              <xsl:variable name="msg" select="pl:getRev($rev)" />
              <xsl:element name="result">
                   <xsl:value-of select="$msg" />
              </xsl:element>
         </xsl:template>
    </xsl:stylesheet>
    Sample.java :
    package com.oracle.test;
    import java.io.*;
    public class Sample {
         public static String getRev(String rev) {
              // some logic i am going include here
              if (rev.equals("01")) {
                   return "valid one";
              return "";
    Thanks All,

    ERROR: The first argument to the non-static Java function 'getRev' is not a valid object reference.Because it results in this error rather than anything else, you have to verify (apart from typos) the actual files finally deployed to run that your method getRev is declared "static", and that the argument $rev is setup with select="'02'" and not select="02". (What you posted looks fine, just make sure it remains the same in those essential aspect.)

  • About use exec to call java.exe!

    when i use the exec to call java.exe to run a class,
    a dos command window will be showed! The window appear until the java program completed~
    i always use "javac filename.java"
    ,"java filename"
    or "cmd.exe \c java filename"
    any method can run the class file but the dos command windows wont show?
    and also any method in cmd can do the same thing as Linux background process "&". Because when running a class, the cmd is locked until the java program completed.
    Thx~

    Use javaw if you dont want the dos prompt window.
    Use start if you dont want to block the current dos window. e.g.
    Start java my.class
    Start will start another native thread to run java.exe
    hope it helps.

  • Calling Java from OMB Plus

    I have a number of OMB Scripts which import/export etc.. Within this script I capture the password from the user so that I can connect to the repository. I found a new class in the latest java which will mask this password and I want to use this within my TCL Script. From what I've read you should be able to call Java Classes from a TCL Script however it gives me a java.lang.reflect.InvocationTargetException
    error. Any help you would be appreciated. (Error at bottom of post)
    Thanks
    Sean
    I've included the Call and the class below.
    Within my tcl script
    package require java
    set t [ java::new finance.ombpass ]
    set owbreppass [$t run]
    JAVA ombpass.Java
    (The Class file ombpass.class in contained in the folder "finance" located under
    oracle\product\owb\10204\owb\bin\admin\)
    The TCL Source is being called after performing a cd to that directory.
    package finance;
    import java.io.Console;
    public class ombpass{
              public String run() {
                   Console cons = System.console();
                   char [] pswd = cons.readPassword("Password: ");
                   String s = new String(pswd);
                   System.out.println(s);
         return s;
    ERROR THROWN...
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at Launcher.main(Launcher.java:167)
    Caused by: java.lang.UnsupportedClassVersionError: finance/ombpass (Unsupported major.minor version 50.0)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at tcl.lang.TclClassLoader.loadClass(TclClassLoader.java:148)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at tcl.lang.JavaInvoke.getClassByName(JavaInvoke.java:712)
    at tcl.lang.FuncSig.get(FuncSig.java:216)
    at tcl.lang.JavaInvoke.newInstance(JavaInvoke.java:67)
    at tcl.lang.JavaNewCmd.cmdProc(JavaNewCmd.java:105)
    at tcl.lang.Parser.evalObjv(Parser.java:818)
    at tcl.lang.Parser.eval2(Parser.java:1221)
    at tcl.lang.Parser.evalTokens(Parser.java:1001)
    at tcl.lang.Parser.eval2(Parser.java:1208)
    at tcl.lang.Procedure.cmdProc(Procedure.java:161)
    at tcl.lang.Parser.evalObjv(Parser.java:818)
    at tcl.lang.Parser.eval2(Parser.java:1221)
    at tcl.lang.Interp.eval(Interp.java:2189)
    at tcl.lang.Interp.eval(Interp.java:2273)
    at tcl.lang.SwitchCmd.cmdProc(SwitchCmd.java:141)
    at tcl.lang.Parser.evalObjv(Parser.java:818)
    at tcl.lang.Parser.eval2(Parser.java:1221)
    at tcl.lang.Procedure.cmdProc(Procedure.java:161)
    at tcl.lang.Parser.evalObjv(Parser.java:818)
    at tcl.lang.Parser.eval2(Parser.java:1221)
    at tcl.lang.Interp.eval(Interp.java:2189)
    at tcl.lang.Interp.evalFile(Interp.java:2368)
    at tcl.lang.SourceCmd.cmdProc(SourceCmd.java:75)
    at tcl.lang.Parser.evalObjv(Parser.java:818)
    at tcl.lang.Parser.eval2(Parser.java:1221)
    at tcl.lang.Interp.eval(Interp.java:2189)
    at tcl.lang.Interp.eval(Interp.java:2273)
    at tcl.lang.Interp.recordAndEval(Interp.java:2328)
    at tcl.lang.TclConsoleThread$2.processEvent(TclShell.java:424)
    at tcl.lang.Notifier.serviceEvent(Notifier.java:444)
    at tcl.lang.Notifier.doOneEvent(Notifier.java:585)
    at tcl.lang.TclShell.run(TclShell.java:170)
    at tcl.lang.TclShell.run(TclShell.java:68)
    at oracle.owb.scripting.OMBShell.main(OMBShell.java:38)
    ... 5 more
    java.lang.reflect.InvocationTargetException

    Besides "package require java", you also need to "java import" your class into TCL. For example, this is how I implemented my OMB-SQL package:
    package require java
    # PVCS Version Information
    #/* $Workfile:   omb_sql_library.tcl  $ $Revision:   2.3  $ */
    #/* $Author:   michael.broughton  $
    #/* $Date:   16 Dec 2008 10:10:36  $ */
    proc oracleConnect { serverName databaseName portNumber username password } {
       # import required classes
       java::import java.sql.Connection
       java::import java.sql.DriverManager
       java::import java.sql.ResultSet
       java::import java.sql.SQLWarning
       java::import java.sql.Statement
       java::import java.sql.CallableStatement
       java::import java.sql.ResultSetMetaData
       java::import java.sql.DatabaseMetaData
       java::import java.sql.Types
       java::import oracle.jdbc.OracleDatabaseMetaData
       # load database driver .
       java::call Class forName oracle.jdbc.OracleDriver
       # set the connection url.
       append url jdbc:oracle:thin
       append url :
       append url $username
       append url /
       append url $password
       append url "@"
       append url $serverName
       append url :
       append url $portNumber
       append url :
       append url $databaseName
       set oraConnection [ java::call DriverManager getConnection $url ]
       set oraDatabaseMetaData [ $oraConnection getMetaData ]
       set oraDatabaseVersion [ $oraDatabaseMetaData getDatabaseProductVersion ]
       puts "Connected to: $url"
       puts "$oraDatabaseVersion"
       return $oraConnection
    proc oracleDisconnect { oraConnect } {
      $oraConnect close
    proc oraJDBCType { oraType } {
      #translation of JDBC types as defined in XOPEN interface
      set rv "NUMBER"
      switch $oraType {
         "0" {set rv "NULL"}
         "1" {set rv "CHAR"}
         "2" {set rv "NUMBER"}
         "3" {set rv "DECIMAL"}
         "4" {set rv "INTEGER"}
         "5" {set rv "SMALLINT"}
         "6" {set rv "FLOAT"}
         "7" {set rv "REAL"}
         "8" {set rv "DOUBLE"}
         "12" {set rv "VARCHAR"}
         "16" {set rv "BOOLEAN"}
         "91" {set rv "DATE"}
         "92" {set rv "TIME"}
         "93" {set rv "TIMESTAMP"}
         default {set rv "OBJECT"}
      return $rv
    proc oracleQuery { oraConnect oraQuery } {
       set oraStatement [ $oraConnect createStatement ]
       set oraResults [ $oraStatement executeQuery $oraQuery ]
       # The following metadata dump is not required, but will be a helpfull sort of thing
       # if ever want to really build an abstraction layer
       #set oraResultsMetaData [ $oraResults getMetaData ]
       #set columnCount        [ $oraResultsMetaData getColumnCount ]
       #set i 1
       #puts "ResultSet Metadata:"
       #while { $i <= $columnCount} {
       #   set fname [ $oraResultsMetaData getColumnName $i]
       #   set ftype [oraJDBCType [ $oraResultsMetaData getColumnType $i]]
       #   puts "Output Field $i Name: $fname Type: $ftype"
       #   incr i
       # end of metadata dump
       return $oraResults
    proc run_exec_template { oraConnect rtOwner locName taskType taskName {custParms ""} {sysParms ""} } {
        #   rt_owner      := e.g. MY_RUNTIME      - Name of the Runtime Repository Owner
        #   location_name :- e.g. MY_WAREHOUSE    - Physical Name of the Location to which this task was deployed
        #                                           (i.e. a DB Location or a Process Location or the Platform Schema)
        #                                           Note: Always use "PlaformSchema" for SQL_LOADER and SAP types.
        #   task_type     :- PLSQLMAP             - OWB PL/SQL Mapping
        #                 |  SQLLOADERCONTROLFILE - OWB SQL*Loader Mapping
        #                 |  PROCESSFLOW          - OWB ProcessFlow
        #                 |  ABAPFILE             - OWB SAP Mapping
        #                 |  DATAAUDITOR          - OWB DataAuditor Mapping
        #                 |  SCHEDULEDJOB         - OWB Scheduled Job
        #   task_name     :- e.g. MY_MAPPING      - Physical Name of the Deployed Object. This can be optionally qualified
        #                                           by the name of a deployed parent, such as the Processflow Package name
        #                                           of a Processflow. A module name cannot be used here because it is not
        #                                           a deployable object.
        #   system_params :- { , | (name = value [, name = value]...)}
        #                    e.g. ","
        #                    or   MY_PARAM=1,YOUR_PARAM=true
        #   custom_params :- { , | (name = value [, name = value]...)}
        #                    e.g. ","
        #                    or   MY_PARAM=1,YOUR_PARAM=true
        # RETURNS
        #   1 if task reports SUCCESS, 2 if WARNING, 3 if ERROR
        set oraStmt [ $oraConnect createStatement ]
        set tmpRslt [ $oraStmt execute "alter session set current_schema=$rtOwner" ]
        set tmpRslt [ $oraStmt execute "set role owb_o_$rtOwner" ]
        set tmpRslt [ $oraStmt execute "set role owb_d_$rtOwner" ]
        set callString "declare x number; begin x := wb_rt_api_exec.run_task('$rtOwner','$locName','$taskType','$taskName','$custParms','$sysParms'); end;"
        set oraCall [ $oraConnect prepareCall $callString ]
        #$oraCall registerOutParameter  { 1 java.lang.Integer int} {4 java:lang:Integer int}
        #$oraCall setString 2 $rtOwner
        #$oraCall setString 3 $locName
        #$oraCall setString 4 $taskType
        #$oraCall setString 5 $taskName
        #$oraCall setString 6 $sysParms
        #$oraCall setString 7 $custParms
        $oraCall execute
        #set retVal [$oraCall getInt 1]
        #set back to the default schema
        set oraDatabaseMetaData [ $oraConnect getMetaData ]
        set oraUser [$oraDatabaseMetaData getUserName]
        set tmpRslt [ oraStmt execute "alter session set current_schema=$oraUser" ]
    # SAMPLE CODE to run a quick query and dump the results. #
    #set oraConn [ oracleConnect myserver orcl 1555 scott tiger ]
    #set oraRs [ oracleQuery $oraConn "select name, count(*) numlines from user_source group by name" ]
    #for each row in the result set
    #while {[$oraRs next]} {
      #grab the field values
    #  set procName [$oraRs getString name]
    #  set procCount [$oraRs getInt numlines]
    #  puts "Program unit $procName comprises $procCount lines"
    #$oraRs close
    #oracleDisconnect $oraConnI do not know if you will need to play with classpaths or anything to get a successfull import as I never tried to do anything with custom classes. Oracle also has a demo example of integrating java with OMB+ to create modal dialogs which might provide additional guidance. It is available here: http://www.oracle.com/technology/sample_code/products/warehouse/files/owb_params.html
    Good luck with it!

Maybe you are looking for

  • Color sample reading funniness?

    I am using CS4 and have been using PS since version 1.0. There is one thing about the way CS4 handles color samples that is different than previous version. If I have 3 different adjustment layers and check my color samples, the numbers will change d

  • How do i cancel the auto renewal of netflix subscription

    how do i cancel the auto renewal for netflix?

  • Bizarre fix to "Spinning Wheel of Death"

    I have a Black Macbook which I got in May of 2008. Since about September of 2010 I started getting the dreaded spinning wheel of death which caused my machine to crash. At first it was rare but before I decided to reinstall everything it was happenin

  • Can I get a panoramic camera on my iphone4?

    Can I get a panoramic camera for my iphone 4?

  • Getting IPrint to work on Netware 6.5 sp8

    I need to get IPrint with Windows 7 support to work on Netware 6.5 sp8. I have IManager 2.7.2 and NDPS\Iprint 4.0.7 I have XP support on Iprint install, but no Windows 7 tabs to load drivers. From what I have been reading I need IManager 2.7.3 FTF4.