Implicit call to java method

Hi,
I have a class composed by some methods, I want to find a way on for implicitly call a method in start and end of every method of my class without coding it.
example
this is my class :
public class MyClass {
public void a(){
public void b(){
call :
MyClass class = new MyClass();
class.a();
i want that when i do like below the execution will be like :
implicitCall();
a();
implicitCall();
is that possible?
Do you have any idea, on how to do that.
Thanks in advance

gimbal2 wrote:
maheshguruswamy wrote:
user12080096 wrote:
What about spring AOP Interceptor?Spring AOP will work for you.How do you know that? Are you him? I'll bet it will just confuse.The OP already knows about Spring AOP, so why do you think it will confuse him? Are you him? Using wildcard expressions, package names etc etc, there is definitely a way to do what the OP is trying to do with Spring AOP. Section 6.2.3.4 of http://static.springsource.org/spring/docs/2.5.x/reference/aop.html has the information. Much easier to do than byte code instrumentation and much cleaner than implicitly calling start/end methods.

Similar Messages

  • How to call a C function calling a Java Method from another C function ?

    Hi everyone,
    I'm just starting to learn JNI and my problem is that I don't know if it is possible to call a C function calling a Java Method (or doing anything else with JNI) from another C function.
    In fact, after receiving datas in a socket made by a C function, I would like to create a class instance (and I don't know how to do it too ; ) ) and init this instance with the strings I received in the socket.
    Is all that possible ?
    Thank you very much for your help !

    Hard to understand the question, but by most interpretations the answer is going to be yes.
    You do of course understand that JNI is the "API" that sits between Java and C and that every call between the two must go through that. You can't call it directly.

  • How to call the java method in java script function in a portal application

    Hi Friends,
    I am developing one application where i need to fetch the data from KM content and displaying it on the screen in regular interval. I wrote one method in JSPdynpage for fetching data from KM content now I need to call that java method in java script function.
    java method(IComponentRequest request)
    //Coode for fetching the KM content
    function()
    <b>//Need to call the java method</b>
    setTimeout(function, 5000);//setting the time interval for this function
    <<htmlb display code>>
    If anybody can help me in calling the java method in java script function that will be very helpful for me.
    Thanks in advance,
    Sandeep Bonam

    Hi,
    Pls see if the following links could help.
    http://www.rgagnon.com/javadetails/java-0170.html
    http://www-128.ibm.com/developerworks/library/wa-resc/?dwzone=web
    Regards

  • How to call a java method in a Stored procedure

    Hi.,
    I was trying to call a method in a stored procedure
    This was my procedure
    CREATE OR REPLACE PROCEDURE proc_copy_file(sr_file VARCHAR2,dt_file VARCHAR2)
    AS LANGUAGE JAVA
    NAME 'FileCopy.copyfile(String,String)'; // calling a java method
    /   this was my java method
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "FileCopy" as
    import java.io.File;
      import java.io.IOException;
      import java.io.FileReader;
      import java.io.FileWriter;
      import javax.imageio.stream.FileImageInputStream;
      import javax.imageio.stream.FileImageOutputStream;
      import java.security.AccessControlException;
      public class FileCopy {
          // Define variable(s).
              private static int c;
              private static File file1,file2;
              private static FileReader inTextFile;
              private static FileWriter outTextFile;
              private static FileImageInputStream inImageFile;
              private static FileImageOutputStream outImageFile;
              // Define copyText() method.
              public static void copyfile(String fromFile,String toFile) throws AccessControlException
                // Create files from canonical file names.
                file1 = new File(fromFile);
                file2 = new File(toFile);
                // Copy file(s).
                try
                  // Define and initialize FileReader(s).
                  inTextFile  = new FileReader(file1);
                  outTextFile = new FileWriter(file2);
                  // Read character-by-character.
                  while ((c = inTextFile.read()) != -1) {
                    outTextFile.write(c); }
                  // Close Stream(s).
                  inTextFile.close();
                  outTextFile.close(); }
                catch (IOException e) {
                  System.out.println ("-------"); }
             // return 1;
          public static void main(String[] args){
                          switch(args.length){
                                  case 0: System.out.println("File has not mentioned.");
                                                  System.exit(0);
                                  case 1: System.out.println("Destination file has not mentioned.");
                                                  System.exit(0);
                                  case 2: copyfile(args[0],args[1]);
                                                  System.exit(0);
                                  default : System.out.println("Multiple files are not allow.");
                                                    System.exit(0);
    };while i am executing this method i m getting error as
    ORA-29531: NO METHOD COPYFILE IN CLASS FILECOPY
    ORA-06512: AT "RMVER721.PROC_COPY_FILE", LINE 1could anyone help me

    Looks like it is a matter of not quite the same namespace for String object.
    I can get it to work by the java source containing:
              public static void copyfile(java.lang.String fromFile,java.lang.String toFile) throws AccessControlExceptionAnd the PL/SQL source:
    NAME 'FileCopy.copyfile(java.lang.String,java.lang.String)'; // calling a java methodSeems like when you just use "String", then the namespace resolving in the java source is not the same as the namespace resolving in the PL/SQL?
    Addendum:
    You do not need to put java.lang.String in the java source, String will do (java.lang is by default "imported"?)
    But in the PL/SQL source java.lang namespace prefix is needed - java.lang is not "imported" here.
    Edited by: Kim Berg Hansen on Nov 23, 2011 1:07 PM

  • Rhino calling overloaded Java methods with Array parameters

    Has anyone had any problems writing JavaScript code that calls overloaded Java methods?
    I have two Java defined methods that differ in the arguments, one takes a string the other takes an array of strings. The problem is calling Java methods within the JavaScript always calls the method with the String argument...
    /* Java Code Here */
    public void function(String s) { /* Function A */ }
    public void function(String[] sa) { /* Function B */ }
    /* JavaScript  Code Here */
    param = java.lang.reflect.Array.newInstance(java.lang.String, 2);
    param[0] = "test";
    param[1] = "test2";
    stringParam = "test3";
    /* Both function calls below end up calling the Function A from above */
    function(param);
    function(stringParam);PS...in case you're not familiar with Rhino,
    It is a mozilla package that embeds a JavaScript interpreter within a Java application...
    http://www.mozilla.org/rhino/

    haha...I can't even find my other thread :(
    Sorry about the double post...I'll go look for my other thread now

  • Problem calling a Java Method from C++

    hi everyone,
    i'm using JNI and i'm trying to call a Java method from C++, this is the code:
    SocketC.java
    public class SocketC
    private native void conectaServidor();
    private void recibeBuffer()
    System.out.println("HELLO!!!");
    public static void main(String args[])
    SocketC SC = new SocketC();
    SC.conectaServidor();
    static {
    System.loadLibrary("Server_TCP");
    Server_TCP.cpp
    char* recibirSock()
         int _flag = 1;
         while(_flag != 0)
              memset(buffer,0,sizeof(buffer));//Et la, celle pour recevoir
              recv(sock,buffer,sizeof(buffer),0);
              printf(" Mensaje del cliente: %s\n",buffer);
              _flag = strcmp(buffer,"salir");
         }//fin while
         return buffer;
    void enviarSock()
         int _flag = 1;
         getchar();
         while(_flag != 0)
              memset(buffer,0,sizeof(buffer));//procedimiento para enviar
              printf("\n Escriba: ");
              gets(buffer);
         //     err=scanf("%s",buffer);
              send(sock,buffer,sizeof(buffer),0);
              _flag = strcmp(buffer,"salir");
         }//fin while
    }//fin enviarSock
    DWORD servicio(LPVOID lpvoid)//
         char *buf;
         printf("\n Cliente aceptado!!!!!\n");
         buf=recibirSock();
         return 0;
    JNIEXPORT void JNICALL Java_SocketC_conectaServidor(JNIEnv *env, jobject obj)
    //void main()
    /*this is the problem i'm calling the method recibeBuffer*/
         jclass cls = env->GetObjectClass(obj);
         jmethodID mmid = env->GetMethodID(cls, "recibeBuffer", "(V)V");
         if (mmid == 0)
              return;
         env->CallVoidMethod(obj, mmid); //llama a Java
         WSAStartup(MAKEWORD(2,0),&wsa);//MAKEWORD dit qu'on utilise la version 2 de winsock
         printf("TCP conexion Sockets\n\n");
         //estimez vous heureux que je foute pas de copyright ;)
         system("TITLE TCP Conexion Sockets (Version server)");
         //fo avouer que c'est plus joli
         int port;
         printf("Port : ");//On demande juste le port, pas besoin d'ip on est sur un server
         scanf("%i",&port);
         sinserv.sin_family=AF_INET;     //Je ne connais pas d'autres familles
         sinserv.sin_addr.s_addr=INADDR_ANY;//Pas besoin d'ip pour le server
         sinserv.sin_port=htons(port);
         server=socket(AF_INET,SOCK_STREAM,0);//On construit le server
         //SOCK_STREAM pour le TCP
         bind(server,(SOCKADDR*)&sinserv,sizeof(sinserv));
         //On lie les parametres du socket avec le socket lui meme
         listen(server,SOMAXCONN);//On se met � �couter avec server, 0 pour n'accepter qu'une seule connection
         printf(" Servidor conectado.");
         while(1)
              sinsize=sizeof(sin);
              if((sock=accept(server,(SOCKADDR*)&sin,&sinsize))!=INVALID_SOCKET)
              {//accept : acepta cualquier conexion
                   if (hReadThread = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)
                   servicio, 0, 0, &dwThreadID))
                        printf("\nHOLA!");
                        GetExitCodeThread(hReadThread,&dwExitCode);
                        CloseHandle (hReadThread);
                   else
                        // Could not create the read thread.
                        printf("No se pudo crear");
                        exit(0);
    when i'm running the proyect i get this error:
    C:\POT Files\UCAB\tesis\esmart\french>java SocketC
    Exception in thread "main" java.lang.NoSuchMethodError: recibeBuffer
    at SocketC.conectaServidor(Native Method)
    at SocketC.main(SocketC.java:16)
    i don't know why this is happening i got declare the method recibeBuffer in my SocketC.java class, but doesn;t work can anyone help me?
    PD: sorry for my bad english i'm from Venezuela

    Next time please paste your code between &#91;code&#93; tags with the code button just above the edit message area.
    To answer your question, you wrote the wrong method signature. It should be:jmethodID mmid = env->GetMethodID(cls, "recibeBuffer", "()V");Regards

  • How to call a Java method in a C consoleapplication?

    I have to call a void method of a javaclass using a c consoleapplication. No argument are passed to it.
    I can't make an object of that class..
    This is my implementation in c (using JNI):
    void update(void)
         classn = "<name>";
         cls = (*env) ->FindClass(env, classn );
         if (cls == 0)
    printf(" Can't find class %s\n", classn );
         mid =
    (*env)->GetMethodID(env, cls, "<methodname>", "()V");
         (*env)->CallVoidMethod(obj, env ,m id);
    This goes wrong...
    The problem is that I have no jobject (obj) of the class, because I don't want one...I don't need one. How can I call that void method without an object and only using the classname..??

    You have to make the java method a static method, and use CallStaticVoidMethod.
    "static" means that the method belongs to the class, and not an object of that class.

  • Is there a tutorial on - how to call static java methods

    I have defined external JAVA resource using a .jar file and have successfully catalogged the same. Now I need to pass variables to a static method in a class and also get the return variable mapped into a BPM variable.
    Can someone share sample Java Invokation code, how to call methods in a class, how to instantiate a singleton or reference an existing instance of singleton class.
    Any sample code or sample projects will be useful.
    Also can I se ethe java system.out.println output in BPM Logviewer
    Arvind

    Hi Arvind,
    Sure you've done this, but the first step is to catalog the Jar file. Before an Oracle BPM project can use the Java component, the appropriate Java JAR files must be added to the project.
    Add the Jar File(s) to the External Resources:
    1. Right-click the External Resources item in the Project Navigator tab
    2. From the pop-up menu, select New External Resource.
    3. Name this new Java resource "MyNewJavaComponents" and ensure its type is Java Class Library.
    4. Add the Java jar file(s)
    Catalog and Expose the Java Components:
    5. Add a new module in the Catalog called "IntegrationComponents".
    6. Generate a Java integration component by right-clicking the IntegrationComponents module and select "Catalogue Component" -> "Java".
    7. Using the Java configuration you just created called MyNewJavaComponents, click the Next button to automatically introspect the Java libraries.
    8. Select the class where your method(s) are located and click the Next -> Finish buttons to have Oracle BPM generate the integration component for you.
    9. If you expand the newly exposed Java component, you can see a method has been created for each public method (attributes would also be automatically created if this class had any public attributes). If you've included the appropriate BeanInfo class in the JAR, you'll note that the method parameters are appropriately named.
    How to Invoke Public Java methods Exposed in the Catalog:
    10. Open the method editor for an automatic activity in the process (or any BPM Object method with its "Server Side" property set to "Yes").
    11. Drag one of the Java methods you just exposed inside your IntegrationComponents module into the automatic activity's method. Once you drag it in, here's what you might see if you're using the Java syntax in Oracle BPM's method editor:
    (PdfGenerator).generate(outputFilename : "", contents : {  }, logoImageURL : null, signatureImageURL : null);
    Assuming you have "outputFilename", "sampleContent", "logoURL" and "signatureURL" variables already created in your process, change the method you just dragged in to:
    IntegrationComponents.Pdfservice.PdfGenerator.generate(outputFilename : outputFilename, contents : sampleContent,
    logoImageURL : logoURL, signatureImageURL : signatureURL);
    Hope this helps,
    Dan

  • Cant Call Stored Java Method Oracle 8I

    I have some java code which I have compiled under the package schedsrv which I have loaded in the server with the loadjava facility
    I created the procedure link using
    create procedure as java using
    schedsrv.ClassName.Procedure(java.lang.String, etc
    I call the function and the server says no method name exists
    for schedsrv/Classname where is the problem
    I loaded the java from a .JAR and the classes were in a subdirectory called schedsrv and are in the .jar

    This is the wrapper
    create or replace procedure CreateScheduleEmp(EMP IN NUMBER, DID IN DATE, ENDD IN DATE) authid definer as language java name 'CreateScheds.processEmployee(java.lang.String,java.SQL.Date,java.SQL.Date)';
    Called by
    Execute CreateScjeduleEmp(1547,'00-JAN-00','07-JAN-00');
    this is the class.
    public class CreateScheds {
    public CreateScheds() {}
    public static void processEmployee(String emp, Date did, Date end) {
    try {
    CreateSchedules shed = new CreateSchedules();
    shed.processEmployee( emp, did, end );
    catch ( SQLException e ) {
    System.err.println(e.getMessage());
    it the class it creates and calls has an abstract base and is extended and completed in CreateSchedule which was written using
    SQLJ.
    The error I am getting says it can't find the
    processEmployee method.
    I tried it in a package which failed as well.
    This is the class it calls
    import java.lang.*;
    import java.util.*;
    import java.sql.SQLException;
    import oracle.sqlj.runtime.Oracle;
    import java.sql.Date;
    // Note that java.SQL.Date (and not java.UTIL.Date) is being used.
    #sql iterator DaySchedItr( String day_off, String start_time, String end_time, String int_type );
    public class CreateSchedules extends EmployeeProcessor {
    public CreateSchedules() {}
    /** Get an agreement for the employee id.
    @param emp is an employee_id code
    @return the agreement id or null if not found.
    @exception SQLException
    protected String getAgreement( String emp ) throws SQLException {
    String agree;
    #sql { SELECT AGREEMENT_ID INTO :agree FROM SCHED.EMPLAGREE WHERE EMPLOYEE_ID=:emp ORDER BY FROM_DATE DESC };
    return agree;
    /** Get a collection of empldaysched records
    @exception SQLException
    protected DaySchedItr getDaySched( String agree ) throws SQLException {
    DaySchedItr itr;
    #sql itr = { SELECT DAY_OFF, START_TIME, END_TIME, INT_TYPE FROM SCHED.DAYSCHED WHERE AGREEMENT_ID=:agree ORDER BY DAY_OFF };
    return itr;
    /** Insert a single EmplDaysched record
    @exception SQLException
    protected void insertEmplDaySched( String emp, Date did, DaySchedItr itr ) throws SQLException {
    String start_time, end_time, int_type;
    start_time = itr.start_time();
    end_time = itr.end_time();
    int_type = itr.int_type();
    int off = Integer.parseInt(itr.day_off(),10);
    off--;
    #sql { INSERT INTO SCHED.EMPLDAYSCHED(EMPLOYEE_ID, DATE_ID, START_TIME,
    END_TIME, INT_TYPE, STATUS)
    VALUES( :emp, :did+:off, :start_time, :end_time, :int_type, 1 )
    /**public abstract void processEmployee( String emp, Date did, Date end ) throws SQLException;
    @param String empl. The employee number employee_id
    @param Date The First Date in a series of dates
    @param end: The End Date in a series of dates
    @return void
    @exception SQLException
    If the employee is not assigned an agreement nothing happens.
    public void processEmployee( String emp, Date did, Date end ) throws SQLException {
    String agree;
    DaySchedItr itr;
    agree = getAgreement(emp);
    if ( agree == null )
    return;
    itr = getDaySched( agree );
    while ( itr.next() )
    insertEmplDaySched( emp, did, itr );
    itr.close();
    #sql { COMMIT };
    class TheTester3 extends Object {
    public static void main(String args[]) throws SQLException {
    String emp;
    Date did, end;
    Oracle.connect(CreateSchedules.class, "connect.properties");
    CreateSchedules shed = new CreateSchedules();
    emp = "2547";
    did = new Date(100,0,1);
    end = new Date(100,0,7);
    shed.processEmployee( emp, did, end );
    //shed.processEmployees( "999987654321", did, end );
    //shed.processAllEmployees( "test", did, end );
    This is the base class
    import java.lang.*;
    import java.util.*;
    import java.sql.SQLException;
    import oracle.sqlj.runtime.Oracle;
    import java.sql.Date;
    // Note that java.SQL.Date (and not java.UTIL.Date) is being used.
    #sql iterator EmplItr ( String employee_id );
    #sql iterator GrpItr ( String walloc_string );
    /** A base class to process employees
    Supports three methodologies for selecting employees
    1. Process a single employee for a date range
    2. Process all employees having a common walloc string selection
    3. Process all employees in an authority group. An authority group
    may handle multiple walloc string selections.
    public abstract class EmployeeProcessor {
    /** Single method that each derived class must implement
    public abstract void processEmployee( String emp, Date did, Date end ) throws SQLException;
    @param String empl. The employee number employee_id
    @param Date The First Date in a series of dates
    @param end: The End Date in a series of dates
    @return void
    @exception SQLException
    public abstract void processEmployee( String emp, Date did, Date end ) throws SQLException;
    /** Method to extract all employees with a given Group Authority ID
    public void processEmployees( String walloc, Date did, Date end ) throws SQLException {
    @param String Walloc. The first part of a walloc string only the length of this string is significant
    @param Date The First Date in a series of dates
    @param end: The End Date in a series of dates
    @return void
    @exception SQLException
    public void processEmployees( String walloc, Date did, Date end ) throws SQLException {
    int len = walloc.length();
    EmplItr itre;
    #sql itre = { SELECT EMPLOYEE_ID FROM SCHED.EMPLPROF WHERE SUBSTR(WALLOC_STR,1,:len)=:walloc };
    while ( itre.next() ) {
    processEmployee( itre.employee_id(), did, end );
    itre.close();
    /** Method to extract all employees with a given Group Authority code
    public void processAllEmployees( String grp, Date did, Date end ) throws SQLException {
    @param String Group. The Group Authority code
    @param Date The First Date in a series of dates
    @param end: The End Date in a series of dates
    @return void
    @exception SQLException
    public void processAllEmployees( String grp, Date did, Date end ) throws SQLException {
    GrpItr itrg;
    String walloc;
    #sql itrg = { select WALLOC_STRING from sched.USER_GROUPS where authority=:grp };
    while ( itrg.next() ) {
    walloc = itrg.walloc_string();
    walloc = walloc.trim();
    processEmployees( walloc, did, end );
    itrg.close();
    null

  • Order of arguments while calling a Java method from C

    Hi
    are there any rules to order the transferred arguments ?
    I wanted to transfer a native window event from C to Java and if the called
    java method is declared like this: (int, long, int) (IJI)V
    public static void nativeMouseButtonDownCallback(int wParam, long lParam, int which)
    the value of 'which' is not correct (always the same independent from what I set it to in the C function)
    If I declare the java method like this: (int, int, long) (IIJ)V
    public static void nativeMouseButtonDownCallback(int which, int wParam, long lParam)
    everything is fine.
    Any information appreciated !
    Bye Mark

    Thanks for your reply !
    Initially I also thought that the set of the value could be wrong and so
    I used a printf statement in C to monitor the transferred value.
    And still: the value I put in was different from what I got in java.
    After this I put in simple numbers like 1,2,3 and in java I still got
    the same wrong value.(guess max signed int 21474836..)
    I really replaced the dll and class files and restarted the IDE.
    The problem got solved by changing the order of the long an int.
    Bye Mark

  • How to call a java method so I can pass a file into the method

    I want to pass a file into a java method method from the main method. Can anyone give me some help as to how I pass the file into the method - do I pass the file name ? are there any special points I need to put in the methods signature etc ?
    FileReader file = new FileReader("Scores");
    BufferedReader infile = new BufferedReader(file);
    Where am I supposed to put the above text - in the main method or the one I want to pass the file into to?
    Thanks

    It's a matter of personal preference really. I would encapsulate all of the file-parsing logic in a separate class that implements an interface so that if in the future you want to start taking the integers from another source, e.g. a db, you wouldn't need to drastically alter your main application code. Probably something like this, (with an assumption that the numbers are delimited by a comma and a realisation that my file-handling routine sucks):
    public class MyApp{
    public static void main(String[] args){
    IntegerGather g = new FileIntegerGatherer();
    Integer[] result = g.getIntegers(args[0]);
    public interface IntegerGatherer{
    public Integer[] getIntegers(String location);
    import java.io.*;
    public class FileIntegerGatherer implements IntegerGatherer{
    public Integer[] getIntegers(String location){
    FileInputStream fs=null;
    try{
    File f = new File(location);
    fs = new FileInputStream(f);
    byte[] in = new byte[1024];
    StringBuffer sb = new StringBuffer();
    while((fs.read(in))!=-1){
    sb.append(new String(in));
    StringTokenizer st = new StringTokenizer(sb.toString(),",");
    Integer[] result = new Integer[st.countTokens()];
    int count = 0;
    while(st.hasMoreTokens()){
    result[count]=Integer.valueOf(st.nextToken());
    count++;
    catch(IOException e){
    //something sensible here
    finally{
    if(fs!=null){
    try{
    fs.close();
    catch(IOException f){
    return result;
    Once compiled you could invoke it as java MyApp c:\myInts.txt
    Sorry if there are typos in there, I don't have an ide open ;->

  • Calling the Java Method in PL/SQL Java Stored procedure errors out

    Hi,
    I could not find a suitable thread to post my PL/SQL question so iam posting it here.........
    I have written a java class by name XYZ which has a method ABC for which there are 9 arguements being passed and its a VOID method.
    This java class has been loaded into ORACLE using DBMS_JAVA.LOADJAVA pkg, Now this class is being called in the oracle as a JAVA Stored procedure...... When ever im trying to call the procedure it throws the following error
    ORA-29531: no method
    *Cause:    An attempt was made to execute a non-existent method in a
    Java class.
    *Action:   Adjust the call or create the specified method.
    The code snippet as follows
    JAVA CODE:
    Class xyz
    public static void Abc (String hostName,
    int port,
    String serviceURL,
    String soapAction,
    int timeOut,
    String wsUser,
    String wsPasWd,
    String keyStore,
    String keyStorePasWd)
    //method implementation
    JAVA STORED PROCEDURE:
    create OR REPLACE procedure ABC_JAVA_SP_CALL
    (p_hostname in varchar2, p_port in number, p_serviceurl in varchar2, p_soapaction in varchar2, p_timeout in number, p_wsuser in varchar2, p_wspasswd in varchar2, p_ks_path in varchar2, p_ks_passwd in varchar2)
    as
    language java
    name 'xyz.Abc(java.lang.String, int, java.lang.String, java.lang.String, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String)';
    When i try to call
    declare
    p_hostname varchar2(100);
    p_port number;
    p_serviceurl varchar2(100);
    p_soapaction varchar2(100);
    p_timeout number;
    p_wsuser varchar2(100);
    p_wspasswd varchar2(100);
    p_ks_path varchar2(100);
    p_ks_passwd varchar2(100);
    begin
    //SP which returns the values for the required parameters.
    comppkg.getvcsinfo(
    p_hostname,
    p_port ,
    p_serviceurl,
    p_soapaction,
    p_timeout,
    p_wsuser,
    p_wspasswd,
    p_ks_path,
    p_ks_passwd
    Layer7_icengc_ws_tes(p_hostname,
    p_port ,
    p_serviceurl,
    p_soapaction,
    p_timeout,
    p_wsuser,
    p_wspasswd,
    p_ks_path,
    p_ks_passwd);
    end;
    This thing ends up with
    29531. 00000 - "no method %s in class %s"
    *Cause:    An attempt was made to execute a non-existent method in a
    Java class.
    *Action:   Adjust the call or create the specified method.
    Im not understanding what wrong am i doing
    pls help
    Edited by: madhusudan on Feb 12, 2013 8:07 PM

    Hello,
    there is the forum {forum:id=65} for questions about using Java within Oracle.
    Regards
    Marcus
    Edited by: Marwim on 13.02.2013 07:56
    I could not find a suitable thread to post my PL/SQL question so iam posting it here.........You got the hint to the correct forum alread in another thread {message:id=10837976}
    And if you think this is not related to Java but PL/SQL, then you should ask in {forum:id=75}

  • How to call a java method asynchronously

    Hello All,
    I am using a managed bean for calling a method to send email after records are commited, the email is sent through pl sql procedure in oracle database.
    But this procedure takes some time to send the email , due to which the next page navigation becomes slow. I do not want to wait for this procedure to be completed, I want to call this method asynchrounosly. Please advice me .
    Thanks in advance.

    I would not recommend using threads for all possible use cases, but there are some long running use cases which can't run in synchronous mode without putting the user to sleep...
    We have some cases, e.g. generating monthly reports, which take up to 5 hours to compile. I don't like to put all the work into the db because I'll have some legacy systems to work with, so I have to use java anyway.
    There are some lessons to learn, but I did not find a show stopper for my job scheduling (using threads).
    Timo

  • How to call a Java method n map the output of that method to a table in ODI

    Hi,
    I'm new to ODI. I've written an interface which joins two tables( in source ) to a file (in target). Now i have to apply a method(java call) on each element of a column in the target. Now my questions are :
    1. All that i know is to use Procedure using either Jython or Java BeanShell. Can you give some sample commands to achieve such functionality?
    2. Where should i actually apply this procedure? Is it possible to apply this procedure within the Interface during mapping (so that i can directly map the result to the output file)?
    Thanks in advance :)

    VikasKiran wrote:
    1. All that i know is to use Procedure using either Jython or Java BeanShell. Can you give some sample commands to achieve such functionality?Hi Vikash,
    Suppose the java code is like below
    import java.io.*;
    public class FileWrite
    public void writeFile()
    FileOutputStream fos;
    DataOutputStream dos;
    try {
    File file= new File("C:\\MyFile.txt");
    fos = new FileOutputStream(file);
    dos=new DataOutputStream(fos);
    dos.writeInt(2333);
    dos.writeChars("Hello World");
    } catch (IOException e) {
    e.printStackTrace();
    Next we compile the .java class from the command line and create the jar file.
    Then copy and paste the .jar archive to the ODI drivers folder. Next we restart the ODI agent.
    Now call methods in this class from either Jython
    import FileWrite
    fw=FileWrite()
    fw.writeFile()
    or from the Java BeanShell
    import FileWrite;
    FileWrite fw = new FileWrite();
    fw.writeFile();
    2. Where should i actually apply this procedure? Is it possible to apply this procedure within the Interface during mapping (so that i can directly map the result to the output file)?If your method is inside your jar file returning one value then store into one variable.Then use this variable in your interface or procedure wherever you want.
    As GURU told we cannot use procedure inside interface mapping.
    Thanks

  • Is it possible to call a java method from servlet

    Hi All,
    I am trying to import a java class to my servlet and call a method of that class, is this possible. I am getting an error while importing the class.
    I am using tomcat, have put my class files in th path
    \WEB-INF\classes\com\kiran
    My java goes like this
    package com.kiran;
    import java.sql.*;
    import javax.sql.*;
    public class DbCon
    { Connection con=null;
    public Connection getCon()
    -----return con;
    catch(Exception e){ return con; }
    and my aim is to call getCon() from my servlet. which is as follows
    package com.kiran;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import com.kiran.DbCon;
    public class check extends HttpServlet
    DbCon db;
    i am not able to compile my servlet, err is --> cannot find symbol DbCon..
    How can i import the class, do i require any entries in web.xml ?
    expecting your advice..
    Thanks in advance
    Best Regards,
    Kiran

    Ok, first off, if you are testing in tomcat (and as you said you are placing the class files in the path), you already compiled this classes, right? Otherwise I don't see how you placed your classes in /WEB-INF/classes/. Note that you will need two class files (based on your code. If not, then I'm missing part of the question. Typically, your IDE will help you with this problem a lot. The only thing that seems confusing is the catch (Exception e) statement which needs to be as part of a method (I assume this is a typo on your part).
    If your problem is at runtime, don't forget to configure your web.xml to see your servlet.

Maybe you are looking for

  • Hi I have trouble returning a completed PDF form to sender - it looses my filled in info - how do I solve this?

    Hi I have trouble returning a completed PDF form to sender - it looses my filled in info - how do I solve this?

  • Problem with AIC-9405w

    Good day IBM server xSeries 306m have serial attachet scsi controller - SAS Adaptec AIC-9405w. On ibm disks there is drivers for suse and redhat. And it seems what plain kernel 2.6.16 did not support this. Question is: any of Arch kernels (mm, beyond

  • Why is captivate...

    Hello anyone, i have recently ran into a problem importing power point files into Captivate. The problem occurs when Captivate's importing option for power point is selected. Captivate acts as if it is starting to download with a small wheel/blue pie

  • ITunes crashing when attempting to play video

    hi guys! lately, i've been having a major problem with my iTunes. it seems like it crashes everytime i touch the "videos" section (either playing video, editing info of video, etc.), eventually freezing the whole osx and forcing me to shut down my co

  • ABNORMAL PROGRAM TERMINATION error

    I get an error every time I try to install an add-on on a specific client (only one!). The error message is: "VISUAL C++ Runtime Library“ “Runtime Error Program C:\Program Files\SAP\SAP Business One\SAP Business One.exe” “abnormal program termination