Error calling JNI method

Hello Everyone,
I´m trying to call a method wich is inside a DDL by JNI. This works fine in a Java console application. However, this call doesn´t work when i put this operation in a web apllication and deploy in a weblogic server. I´ve already put the dll path in the PATH variable but it didn´t work. When I debug the application, the DLL can be loaded but i call the native method a error happens and a get the following message:
java.lang.UnsatisfiedLinkError: criptografa
     at com.tim.util.cripto.ACC_Cripto.criptografa(Native Method)
Why does it work when I use a java console application ?
Thanks for help
Rodrigo Lopes

I see yere points but what I see on linux is it makes it to the constructor of the Java object and somewhere afterwards it bails out, the Java app does work alone. It appears to have problems initializing the JFrame, could there be a problem with the Java inheritance when a JVM is invoked throurgh native invocation??
Here's some of the Java stuff
public class Framework extends WindowAdapter {
    public int numWindows = 0;
    private Point lastLocation = null;
    private int maxX = 500;
    private int maxY = 500;
    public Framework() {
        System.out.println("JAVA Framework cnst");//GETTING HERE
        makeNewWindow();
    public void makeNewWindow() {
        System.out.println("JAVA makeWindow"); //GETTING HERE
        JFrame frame = new MyFrame(this); //NOT GETTING HERE!!!!!!!!!
        numWindows++;
        System.out.println("Number of windows: " + numWindows);
        System.out.println("Frame location: " + lastLocation);
        frame.setVisible(true);
        System.out.println("Post Java set frame visible");
    public static void main(String[] args) {
    System.out.println("Main method in Framework");
        Framework framework = new Framework();//GETTING HERE
class MyFrame extends JFrame {
    protected Dimension defaultSize = new Dimension(200, 200);
    protected Framework framework = null;
    public MyFrame(Framework controller) {
        super("New Frame");
        System.out.println("MyFrame cnst ");//NOT GETTING HERE!!!!!!
        framework = controller;
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        addWindowListener(framework);
        JMenu menu = new JMenu("Window");
        menu.setMnemonic(KeyEvent.VK_W);
       setSize(defaultSize);
}

Similar Messages

  • Error call JNI method

    In call native method print in sign applet got following error:
    java.lang.UnsatisfiedLinkError: LabelPrinter.print Possible causes: If you are trying to use J/Direct (@dll.import), check your compiler version (for JVC, requires 4336 or greater.) If you are trying to use RNI, there are new requirements: see documentation.
    at LabelPrinter.print (LabelPrinter.java)
    at LabelPrinter.start (LabelPrinter.java:110)
    at com/ms/applet/AppletPanel.securedCall0 (AppletPanel.java)
    at com/ms/applet/AppletPanel.securedCall (AppletPanel.java)
    at com/ms/applet/AppletPanel.processSentEvent (AppletPanel.java)
    at com/ms/applet/AppletPanel.run (AppletPanel.java)
    at java/lang/Thread.run (Thread.java)
    I not using J/Direct or RNI.
    Any ideas?
    Thanks
    Carlo Cerqueira

    This could be a matter of incorrect case in the Method or library you are calling out to - or it could be that the DLL is not found - are you specifying the full path to it on the client system?

  • Error calling a method of the tree control in BDC

    I'm connecting two systems Iplan(project management tool) with SAP PS using SAP XI.
    I've written an BDC(RFC) to assign people for the activity in an project(cj20n) it works fine in the foreground. But it doesn't work in the background.It doesn't give me error also.I've sap all authorization.
    When I connect with XI its throwing me an error "Error calling a method of the tree control" message type A (using the same user to connect r3). I believe something we should do prior handling the tree control in a BDC. IF any body come across this situation please let me know. your help is appreciated.
    Regards
    Anand

    BDCs over enjoy transactions do not get along together.  The containers and controls is more of a gui thing, and in background sometimes the BDC has a hard time with them.  I would suggest using the non-enjoy tcode instead, CJ20.
    Regards,
    Rich Heilman

  • Job is failing with the following error- Error calling a method of the tree

    dear SDNers,
    my question is where do i need to look for error.
    Will this be an ABAP issue?
    Please guide
    DETAILS
    In SM37 when we see the job XYZ, we get the following details.
       Job                              Ln    Job CreatedB    Status          Start date     Start time      Duration(sec.)     Delay (sec.)
      XYZ                                                                    Canceled        16.11.2009    10:11:30                  9                         27
    When the job log is checked this , we get the below details.
    The job XYZ is failing with the following error.
    Date      Time     Class  No.   Message
    +----
    +----
    2009/11/16 05:03:01 | 00     516 | Job started
    2009/11/16 05:03:01 | 00     550 | Step 001 started (program RBDMON00, variant
    SBCI287, user ID ABCDEF)
    2009/11/16 05:03:03 | TREE_C 000 | Error calling a method of the tree control
    2009/11/16 05:03:03 | 00     518 | Job cancelled
    Equest your assistance in knowing where to find the error for this.
    I have no clue as to where and how i need to debug or where i should i be looking for error.
    In BD87, the selection screen paramters that are given are changed on date (from and to) and IDOC status 51,66,69 and 64 and the message type is "Öutbound interface of picked shipments"
    Please guide.
    Regards,
    SuryaD.
    Edited by: SuryaD on Nov 23, 2009 5:36 PM
    Edited by: SuryaD on Nov 23, 2009 11:14 PM

    > 1. There is a job name ABCDEF
    > 2. When this job is run then the status shows cancelled and the job error log shows tHe details that "error calling a method of the tree control"
    > 3.ThIs error also points fingers to /link to BD87 as seen in the job log " (program RBDMON00, variant \SBCI287, user ID KRISF)"
    >
    BD87 is an IDOC processing.
    > My question to you Sampath.
    >
    > in order to answer your question on whether it is ALv or SALV.. please tell me as to how will i know which progrm is associated with the job ABCDEF?
    >
    Go to sm37 - double click on the job that was failed - Click on Step (on application tool bar) to get the program name - double click on the program name - new popup will be opened - then copy the program and variant
    Go to se38 - enter the program - execute (F8) - choose the variant that is there in the background job - run in forground first
    if the run is good - then check the program - SE38 - Display the program then see
    I just saw the above message BD87... .if that is true, you dont have to do all these
    I dont think it is possible to schedule a job with BD87. Is this the first time or is any job completed without errors for this?

  • Error calling native methods

    HI
    I declared a static native method in a class and using the System.loadLibrary() method i load the dll.
    Now if i want to call the method from another class using instance of that class where i declare the native method, it shows an error
    java.lang.SpecifiedPathLink error. I have put the dll outside the package in the same directory.
    can anyone help me regarding this problem

    it shows this exception
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no PerfMonitor in jav
    a.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at C3.CPUMemoryUsage.<clinit>(CPUMemoryUsage.java:6)
    at C3.Node.main(Node.java:18)

  • Runtime error Calling Java Methods from C++

    I'm trying to add Java methods to an existing C++ program.
    I'm working in W2000 enviroment using Cygnus GCC compiler.
    Before adding these methods, I tested invoke example from Jni tutorial.
    All worked properly. But the problems arouse when I tried to run non-static methods.
    Here is the code I'm testing now:
    #include <stdio.h>
    #include <jni.h>
    #define PATH_SEPARATOR ';'
    #define USER_CLASSPATH "." /* where Prog.class is */
    int main(int argc, char *argv[]) {
    JNIEnv *env;
    JavaVM *jvm;
    JDK1_1InitArgs vm_args;
    jint res;
    jclass cls;
    jmethodID mid;
    jobject jobj;
    char classpath[1024];
    vm_args.version = 0x00010001;
    JNI_GetDefaultJavaVMInitArgs(&vm_args);
    sprintf(classpath, "%s%c%s",
    vm_args.classpath, PATH_SEPARATOR, USER_CLASSPATH);
    vm_args.classpath = classpath;
    res = JNI_CreateJavaVM(&jvm,(void **)&env,&vm_args);
    if (res < 0) {
    fprintf(stderr, "Can't create Java VM\n");
    exit(1);
    cls = env->FindClass("Prog");
    if (cls == 0) {
    fprintf(stderr, "Can't find consola class\n");
    exit(1);
    mid = env->GetStaticMethodID(cls, "Entrada", "()V");
    if (mid == 0) {
    fprintf(stderr, "Can't find consola.consola\n");
    exit(1);
    env->CallStaticVoidMethod(cls, mid);
    /*     jobj = env->NewObject(cls, mid);
    if (jobj == 0) {
    fprintf(stderr, "Can't find Prog.main\n");
    exit(4);
    jvm->DestroyJavaVM();
    And the java code Prog.java:
    public class Prog {
    public static void Entrada() {
    Consola Cons = new Consola();
    And Consola a user class tha shows a Java window and let's do something more.
    These code works fine and The Prog and Consola classes run properly.
    But when I try to change Entrada method to non-static, following error appears in a window.
    Microsoft Visual C++ Runtime library
    Runtime Error !
    Program: D:\javaini\JNI-INVOKE\invoke.exe
    abnormal program termination
    If I try
    jobj = env->NewObject(cls, mid);
    if (jobj == 0) {
    fprintf(stderr, "Can't find Prog.main\n");
    exit(4);
    instead of
    env->CallVoidMethod(cls, mid);
    I get the same error.
    Could anybody help me ?
    Am I doing anything wrong ?
    Thanks in advance. Ignasi Villagrasa.

    I found it.
    In JNI examples I saw
    mid = env->GetMethodID(cls, "<init>", "()V");
    to run constructor.
    And then NewObject function.
    So it's solved.
    But I find another problem now.
    If the class I'm calling is a graphic java class (In this case from swing), when the window is closed the application in C++ stops too.
    Should I create another thread to manage the window ?
    Couldn't I follow running lines after NewObject method ?
    Thanks in advance, Ignasi Villagrasa.

  • Error calling class methods CL_GUI_FRONTEND_SERVICES

    Hi all,
    I have a requirement in BAPI (integrating solman to portal) to download file from app. server to local directory. I used the below FM to get temp directory of presntation server.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GET_TEMP_DIRECTORY
       CHANGING
         TEMP_DIR             =  LV_TEMP_DIR
       EXCEPTIONS
         CNTL_ERROR           = 1
         ERROR_NO_GUI         = 2
         NOT_SUPPORTED_BY_GUI = 3
         others               = 4.
       CALL METHOD cl_gui_cfw=>flush.
    It works fine in R3, but when i called it from portal it shows Access not possible using 'NULL' object reference with a short dump .
    st22 shows
    Error in ABAP application program.
    The current ABAP program "CL_GUI_FRONTEND_SERVICES======CP" had to be
    terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    An exception occurred. This exception is dealt with in more detail belo
    . The exception, which is assigned to the class 'CX_SY_REF_IS_INITIAL',
    neither
    caught nor passed along using a RAISING clause, in the procedure
    "GET_TEMP_DIRECTORY" "(METHOD)"
    Since the caller of the procedure could not have expected this exceptio
    to occur, the running program was terminated.
    The reason for the exception is:
    Attempt to access a component using 'NULL' object reference (points
    to nothing).
    An object reference must point to an object (an instance of a class)
    before you can use it to access components (variable:
    "CL_GUI_FRONTEND_SERVICES=>HANDLE").
    Either the reference has not yet been set, or it has been reset to
    'NULL' by a CLEAR statement.
    When i put external break point and the dump comes during execution of CALL METHOD cl_gui_cfw=>flush.
    Is it not possible to use CL_GUI_FRONTEND_SERVICES in RFC ??.
    thanks and regards
    Jijo

    [CL_GUI_FRONTEND_SERVICES|https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=cl_gui_frontend_services+portal&adv=false&sortby=cm_rnd_rankvalue] needs a SAPGUI, so it is not possible to use it in RFC, BSP or other portal.
    Regards

  • While I call JNI method on SWT, crash occured

    There are C++ codes for serial port communication and mathematical computations. I call this C++ code with JNI on SWT. I sometimes get below error and exit the program. how can I solve this problem. My system is 64 bit Ubuntu.
    SIGSEGV (0xb) at pc=0x004d67a0, pid=8090, tid=2526133136
    # Java VM: Java HotSpot(TM) Server VM (1.5.0_12-b04 mixed mode)
    # Problematic frame:
    # C [libpthread.so.0+0x77a0]

    how can I solve this problem.Find the pointer bugs in your code and fix them.

  • Error in JNI method code

    can anybody tell me the errors in this code.
    JNIEXPORT jstring JNICALL Java_TestParams_replicate
    (JNIEnv * env, jobject obj, jstring s)
    const char s2, s2_copy, *s3;
    jboolean copy;
    jstring s4;
    copy = JNI_TRUE;
    s2 = (*env)->GetStringUTFChars (env, s, & copy);
    s2_copy = (*env)->GetStringUTFChars (env, s, & copy);
    printf ("Inside C: replicate String = %s\n", s2);
    s3 = strcat (s2, s2_copy);
    s4 = (*env)->NewStringUTF (env, s2);
    printf ("Inside C: replicate return value = %s\n", s3);
    return s4;
    when i am trying to compile the above code i am getting the warning like this
    test_params.c: In function ?Java_TestParams_replicate?:
    test_params.c:34: warning: passing argument 1 of ?strcat? discards qualifiers from pointer target type
    thanks
    str

    Well, first of all you should not cat or copy into memory specified as "const".
    Second - NEVER copy or cat data to memory (pointed by s2 in your case) if you have no info about buffer length. 99% your code will cause illegal memory access error.

  • JNI - core dump - internal error on linux after calling Java method

    I'm getting a core dump after calling athe main statric method using JNNI.
    On linux.
    I can get the class id correcttly but when I attempt to call the method it craches with an internal error , anyone know why it would crash instead of just not work.
    if(cls)
        main_methodID = env->GetStaticMethodID(cls, "main", "([Ljava/lang/String;)V");
           printf("Class Found Successfully\n");
      else
        printf ( "cls not found\n");
        return 0;
      if(main_methodID)
              jstring first_str = env->NewStringUTF("The First String");//create string
              jobjectArray args = (jobjectArray)env->NewObjectArray(1,env->FindClass("java/lang/String"), first_str);//new array with 2 elements
                   env->SetObjectArrayElement(args, 2, first_str);//insert the second string into index 1 of the array
              jstring second_str = env->NewStringUTF("The Second String");//create string
              env->SetObjectArrayElement(args, 1, second_str);//insert the second string into index 1 of the array
         env->CallStaticVoidMethod(cls, main_methodID, args);//pass the array to the Java main method
                                  The JAVA method is
      public static void main(String[] args) {
        System.out.println("Main method in Framework");
            Framework framework = new Framework();
                                 

    I see yere points but what I see on linux is it makes it to the constructor of the Java object and somewhere afterwards it bails out, the Java app does work alone. It appears to have problems initializing the JFrame, could there be a problem with the Java inheritance when a JVM is invoked throurgh native invocation??
    Here's some of the Java stuff
    public class Framework extends WindowAdapter {
        public int numWindows = 0;
        private Point lastLocation = null;
        private int maxX = 500;
        private int maxY = 500;
        public Framework() {
            System.out.println("JAVA Framework cnst");//GETTING HERE
            makeNewWindow();
        public void makeNewWindow() {
            System.out.println("JAVA makeWindow"); //GETTING HERE
            JFrame frame = new MyFrame(this); //NOT GETTING HERE!!!!!!!!!
            numWindows++;
            System.out.println("Number of windows: " + numWindows);
            System.out.println("Frame location: " + lastLocation);
            frame.setVisible(true);
            System.out.println("Post Java set frame visible");
        public static void main(String[] args) {
        System.out.println("Main method in Framework");
            Framework framework = new Framework();//GETTING HERE
    class MyFrame extends JFrame {
        protected Dimension defaultSize = new Dimension(200, 200);
        protected Framework framework = null;
        public MyFrame(Framework controller) {
            super("New Frame");
            System.out.println("MyFrame cnst ");//NOT GETTING HERE!!!!!!
            framework = controller;
            setDefaultCloseOperation(DISPOSE_ON_CLOSE);
            addWindowListener(framework);
            JMenu menu = new JMenu("Window");
            menu.setMnemonic(KeyEvent.VK_W);
           setSize(defaultSize);
    }

  • Getting HeapDump on out of memory error when executing method through JNI

    I have a C++ code that executes a method inside the jvm through the JNI.
    I have a memory leak in my java code that results an out of memory error, this exception is caught in my C++ code and as a result the heap dump is not created on the disk.
    I am running the jvm with
    -XX:+HeapDumpOnOutOfMemoryError
    -XX:HeapDumpPath=C:\x.hprof
    Any suggestions?
    Thanks

    I'll rephrase it then.
    I have a java class named PbsExecuter and one static method in it ExecuteCommand.
    I am calling this method through JNI (using CallStaticObjectMethod). sometimes this method causes the jvm to throw OutOfMemoryError and I would like to get a heap dump on the disk when this happens in order to locate my memory leak.
    I've started the jvm with JNI_CreateJavaVM and I've put two options inside the JavaVMInitArgs that is used to create the Jvm. -XX:+HeapDumpOnOutOfMemoryError and -XX:HeapDumpPath=C:\x.hprof
    which supposed to create a heap dump on the disk when OutOfMemoryError occurs.
    Normally if I would execute normal java code, when this exception would occur and I wouldn't catch it the Jvm would crash and the heap dump would be created on the disk.
    Since I need to handle errors in my C++ code I am use ExceptionOccured() and extracts the exception message from the exception it self and write it.
    For some reason when I execute this method through JNI it doesn't create the dump.

  • FATAL ERROR in native method: Non-array passed to JNI array operations

    After stepping up to JDK 1.4.2 we started getting a hotspot error, I added -Xcheck:jni and it yielded the above error which was not existent in JDK 1.4.1 and for the life of me I cannot find out whats wrong:
    Native method dec:
    private native byte[] cost(final byte[] byte_array,
    final double minCostPerMeter,
    final int costFuncSelection,
    final double maxCostThreshold);
    Method call:
    ByteArrayInputStream
    inputByteStream = new ByteArrayInputStream(
    cost(output_byte_stream.toByteArray(),
    minCostPerMeter,
    costFunctionSelection.length,
    maxCostThreshold));
    An array is being passed I have no idea why it is complaing about the method call.
    Any help would be appreciated.
    -R

    What happens if you remove all the code from the JNI method - so it just calls and then returns?
    If it still occurs then I would expect that you have a memory problem in a piece of code before this one. Such problems can have no impact when run in one environment but cause failures in another becomes some other legitimate piece of data moved.
    If it doesn't then I would expect that the problem is in the method itself and not the call.
    It could be some odd VM problem so trying a different version of 1.4.2 might help (but in of itself would not eliminate the possibility that you have a memory problem.)

  • UnsatisfiedLinkError while calling a JNI Method

    Hi everyone,
    I have been struggling with this problem for two weeks now. I have a third party SDK that provides JNI library and all i need to do is implement the SDK, load the JNI library they have provided, and call the JNI methods. I was successfully able to load the JNI library and call the JNI methods when i don't put the classes in the package. But when i put the classes in a package then the library gets loaded successfully but an unsatisfiedLinkError occurs when calling the JNI methods. Please help!!! Please remember that the JNI library is provided by the third party vendor and I don't need to write the C/C++ code or call javah to create a .h file and then a c/c++ file.
    This is the error i get:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: ss.tts.JNILayer.InitDFTTSEngineEx3(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[I[I)V
         at ss.tts.JNILayer.InitDFTTSEngineEx3(Native Method)
         at ss.tts.Speech.test(Speech.java:854)
         at ss.tts.SSMain.main(SSMain.java:13)
    The three classes are SSMain, Speech, and JNILayer. JNILayer has the jni methods, speech calls the jni method, and SSMain is main class.
    Thank you in advance.

    which ever class which contains the "InitDFTTSEngineEx3" method. should not be altered, even its package should not be altered.[same for other class which has the native method declared in them]
    because in native code jni method signatures will be based on the java class's fully qualified name.
    so when you change the package the FQN will change and no matching method for this
    ss.tts.JNILayer.InitDFTTSEngineEx3(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[I[I)V
    will be found in native code.
    i hope u understood.

  • Error while calling a method on Bean (EJB 3.0)

    I am getting an error while calling a method on EJB. I am using EJB3.0 and my bean is getting properly deployed(i am sure b'cos i can see the successfullly deployed message). Can any body help me
    Error is -->
    Error while destroying resource :An I/O error has occured while flushing the output - Exception: java.io.IOException: An established connection was aborted by the software in your host machine
    Stack Trace:
    java.io.IOException: An established connection was aborted by the software in your host machine
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
    at sun.nio.ch.IOUtil.write(IOUtil.java:75)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
    at com.sun.enterprise.server.ss.provider.ASOutputStream.write(ASOutputStream.java:138)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at org.postgresql.PG_Stream.flush(PG_Stream.java:352)
    at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:159)
    at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:70)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
    at org.postgresql.jdbc1.AbstractJdbc1Connection.rollback(AbstractJdbc1Connection.java:1031)
    at org.postgresql.jdbc2.optional.PooledConnectionImpl$ConnectionHandler.invoke(PooledConnectionImpl.java:223)
    at $Proxy34.close(Unknown Source)
    at com.sun.gjc.spi.ManagedConnection.destroy(ManagedConnection.java:274)
    at com.sun.enterprise.resource.LocalTxConnectorAllocator.destroyResource(LocalTxConnectorAllocator.java:103)
    at com.sun.enterprise.resource.AbstractResourcePool.destroyResource(AbstractResourcePool.java:603)
    at com.sun.enterprise.resource.AbstractResourcePool.resourceErrorOccurred(AbstractResourcePool.java:713)
    at com.sun.enterprise.resource.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:424)
    at com.sun.enterprise.resource.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:393)
    at com.sun.enterprise.resource.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:69)
    at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:618)
    at com.sun.gjc.spi.ConnectionHolder.close(ConnectionHolder.java:163)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:379)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:367)
    at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:402)
    at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.afterJTSTransaction(DatasourceAccessor.java:100)
    at oracle.toplink.essentials.threetier.ClientSession.afterTransaction(ClientSession.java:104)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.afterTransaction(UnitOfWorkImpl.java:1816)
    at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:161)
    at oracle.toplink.essentials.transaction.JTASynchronizationListener.afterCompletion(JTASynchronizationListener.java:87)
    at com.sun.ejb.containers.ContainerSynchronization.afterCompletion(ContainerSynchronization.java:174)
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:467)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    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:585)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    End of Stack Trace
    |#]
    RAR5035:Unexpected exception while destroying resource. To get exception stack, please change log level to FINE.
    EJB5018: An exception was thrown during an ejb invocation on [DepartmentSessionBean]
    javax.ejb.EJBException: Unable to complete container-managed transaction.; nested exception is: javax.transaction.SystemException
    javax.transaction.SystemException
    at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:452)
    at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:357)
    at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3653)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
    at $Proxy84.addDepartment(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Means theres an error in XML/ABAP conversion probably due a syntax error...
    Regards
    Juan

  • Operation not found error while calling AM methods from managed bean

    Hi,
    operation not found error while calling AM methods from managed bean.
    written a method with two parameters in AM.
    exposed the method in AM client interface
    in the page bindings added the method in method action ..left empty in the value fields of the parameters.
    calling the method from managed bean like below
    String userNameVal = (String)userName.getValue();
    String passwordVal = (String)password.getValue();
    OperationBinding operationBinding =
    ADFUtils.findOperation("verifyLogin");
    operationBinding.getParamsMap().put("userName",userNameVal);
    operationBinding.getParamsMap().put("password",passwordVal);
    operationBinding.execute();
    i am getting operation verifyLogin not found error.Please suggest me something to do.
    Thanks
    Satya

    Hi vlsn,
    Can you try with the below code
    // in your backing bean
    OperationBinding operation = bindings.getOperationBinding("verifyLogin");
    //Put your both parameters here
    operation.getParamsMap().put("parameter_name1", parameterValue1);
    operation.getParamsMap().put("parameter_name2", parameterValue2);
    operation.execute();
    if (operation.getResult() != null) {
    Boolean result = (Boolean) operation.getResult();
    and share the result.
    regards,
    Rajan

Maybe you are looking for