Invocation API

I am working with the invocation api from the tutorial. I do not want to set the path to the jvm.dll before running the exe. How can I dynamically load the dll. When I start the exe, immediately it popsup a message box saying that jvm.dll not found. Can anyone please help me out as to how to load the dll dynamically. All help is appreciated.
Razi

Try this:
// runjava.cpp
#include <windows.h>
#include <jni.h>
#define DOTRELEASE  "1.4" /* Same for 1.3.1, 1.3.2 etc. */
#define JRE_KEY         "Software\\JavaSoft\\Java Runtime Environment"
// typedefs for calls to jvm.dll
typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
typedef jint (JNICALL *GetDefaultJavaVMInitArgs_t)(void *args);
// globals
JavaVMInitArgs vmArgs;
JavaVM* jvm;
JNIEnv* env;
bool running=false;
void LogError(const char * format,...)
    char    message[256];
    va_list args;
    va_start(args, format);
    vsprintf(message, format, args);
    va_end(args);
     printf("%s\n",message);          
void LogWin32Error(const char * pTitle)
    PCHAR pBuffer;
    LONG  lError = GetLastError ( );
    FormatMessage ( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
                    NULL,
                    lError,
                    MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
                    (char *)&pBuffer,
                    0,
                    NULL );
     LogError ("Win32 error: %s %s\n",pBuffer,pTitle);
    LocalFree ( pBuffer );
bool GetStringFromRegistry(HKEY key, const char *name, unsigned char *buf, int bufsize)
    DWORD type, size;
    if (RegQueryValueEx(key, name, 0, &type, 0, &size) == 0
     && type == REG_SZ
     && (size < (unsigned int)bufsize))
          if (RegQueryValueEx(key, name, 0, 0, buf, &size) == 0)
               return true;
    return false;
bool GetPublicJREHome(char *buf, int bufsize)
    HKEY key, subkey;
    char version[MAX_PATH];
    /* Find the current version of the JRE */
    if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, JRE_KEY,0,KEY_READ,&key)!=0)
          LogError("Error opening registry key '" JRE_KEY "'\n");
          return false;
    if(!GetStringFromRegistry(key,"CurrentVersion",(unsigned char *)version, sizeof(version)))
          LogError("Failed reading value of registry key:\n\t"JRE_KEY "\\CurrentVersion\n");
          RegCloseKey(key);
          return false;
    if(strcmp(version, DOTRELEASE)!= 0)
          LogError("Registry key '" JRE_KEY "\\CurrentVersion'\nhas value '%s', but '" DOTRELEASE "' is required.\n", version);
          RegCloseKey(key);
          return false;
    /* Find directory where the current version is installed. */
    if(RegOpenKeyEx(key,version,0,KEY_READ, &subkey)!= 0)
          LogError("Error opening registry key '"JRE_KEY "\\%s'\n", version);
          RegCloseKey(key);
          return false;
    if(!GetStringFromRegistry(subkey, "JavaHome", (unsigned char *)buf, bufsize))
          LogError("Failed reading value of registry key:\n\t"JRE_KEY "\\%s\\JavaHome\n", version);
          RegCloseKey(key);
          RegCloseKey(subkey);
          return false;
    RegCloseKey(key);
    RegCloseKey(subkey);
    return true;
jint JNICALL _vfprintf_(FILE *fp, const char *format, va_list args)
     LogError(format,args);
     return 0;
void JNICALL _exit_(jint code)
     LogError("VM exited");
     exit(code);
void JNICALL _abort_(void)
     LogError("VM aborted");
     abort();
void LoadJVM(char * dir)
     HINSTANCE handle;
     JavaVMOption options[5];
     char JREHome[MAX_PATH];
     char JVMPath[MAX_PATH];                                        
     char classpathOption[MAX_PATH];
     char librarypathOption[MAX_PATH];
     if(!GetPublicJREHome(JREHome, MAX_PATH))
          LogError("Could not locate JRE");
          abort();
     strcpy(JVMPath,JREHome);
     strcat(JVMPath,"\\bin\\client\\jvm.dll");
    if ((handle=LoadLibrary(JVMPath))==0)
          LogError("Error loading: %s", JVMPath);
          abort();
    CreateJavaVM_t pfnCreateJavaVM=(CreateJavaVM_t)GetProcAddress(handle,"JNI_CreateJavaVM");
    if (pfnCreateJavaVM==0)
          LogError("Error: can't find JNI interfaces in: %s",JVMPath);
          abort();
     strcpy(classpathOption,"-Djava.class.path=");
     strcat(classpathOption,dir);
     strcat(classpathOption,";");
     strcat(classpathOption,JREHome);
     strcat(classpathOption,"\\lib");
     strcat(classpathOption,";");
     strcat(classpathOption,JREHome);
     strcat(classpathOption,"\\lib\\comm.jar");
     strcpy(librarypathOption,"-Djava.library.path=");
     strcat(librarypathOption,JREHome);
     strcat(librarypathOption,"\\lib");
     OutputDebugString("classpath option=");
     OutputDebugString(classpathOption);
     OutputDebugString("\n");
     OutputDebugString("librarypath option=");
     OutputDebugString(librarypathOption);
     OutputDebugString("\n");
     options[0].optionString=classpathOption;     
     options[1].optionString=librarypathOption;     
     options[2].optionString="vfprintf";
     options[2].extraInfo=_vfprintf_;
     options[3].optionString="exit";
     options[3].extraInfo=_exit_;
     options[4].optionString="abort";
     options[4].extraInfo=_abort_;
    vmArgs.version  = JNI_VERSION_1_2;
    vmArgs.nOptions = 5;
    vmArgs.options  = options;
    vmArgs.ignoreUnrecognized = false;
     //if(JNI_CreateJavaVM(&jvm, (void**)&env, &vmArgs)<0)
    if(pfnCreateJavaVM(&jvm,(void**)&env, &vmArgs)!=0)
          LogError("Could not create VM");
          abort();
void main(int argc, char *argv[])
    char path[MAX_PATH];
    char drive[MAX_PATH];
    char file[MAX_PATH];
    char dir[MAX_PATH];
    char ext[MAX_PATH];
     jclass  cls;
     jmethodID mid;
     jobjectArray args;
     if(argc>=2)
          _splitpath(path,drive,dir,file,ext);
          LoadJVM(dir);
          if(env==NULL)
               LogError("Could not load VM");
               abort();
          if(GetModuleFileName(NULL,path,MAX_PATH)==0)
               LogWin32Error("Getting module filename");
               abort();
          cls=env->FindClass(argv[1]);
          if(cls==NULL)
               LogError("Could not find class %s (or its superclass)",argv[1]);
               exit(-1);
          mid=env->GetStaticMethodID(cls,"main","([Ljava/lang/String;)V");
          if(mid==NULL)
               LogError("Could not find method 'main'");
               exit(-1);
          args=env->NewObjectArray(argc-2,env->FindClass("java/lang/String"),NULL);
          if(args==NULL)
               LogError("Could not create args array");
          for(int arg=0;arg<argc-2;arg++)
               env->SetObjectArrayElement(args,arg,env->NewStringUTF(argv[arg+2]));
          env->CallStaticVoidMethod(cls,mid,args);
          jvm->DestroyJavaVM();
     else
          printf("Usage: runjava classname\n");
          exit(-1);
//*****************************************************************************

Similar Messages

  • JNI, invocation API

    Hi,
    I would like to start with JNI.
    I read the JNI-Tutorial and
    didn't find the file: jni.h.
    Where can I get it?
    I would like to write an invocation API.
    A VC-program should call a java-function.
    Does anybody know,
    where to find the demo-code (c and java)
    of a 'hello world'-program?
    Thanks
    Ully

    Thanks bschauwe,
    I tested so many things,
    that I installed somethings else,
    but not the sdk!

  • JNI FindClass Error: Using the Invocation API  from visual C++

    I am using JNI invocation api in microsoft visual c++ to invoke java. When I use the FindClass method, I get a return value of 0. I have verified that the class "a" exists and believe have set the java class path appropriately. A valid jvm and jenv are created. The program fails at the FindClass call and returns 0.
    std::string classPath = "c:\\work\\java;C:\\j2sdk1.4.2_08;C:\\j2sdk1.4.2_08\\bin;C:\\j2sdk1.4.2_08\\lib";
         vmArgs.classpath = classpath;
         jint res = JNI_CreateJavaVM(&jvm, (void**)(&jenv), &vmArgs);
         if (res < 0)
              cout << "Error!! Cannot create jvm" << endl;
    jclass jFixEngineClass1 = jenv->FindClass("a");
         if (jFixEngineClass1 == 0)
              cout << "Error could not find a class" << endl;
         else
              cout << "a class found" << endl;
    thanks in advance,
    hcg

    Jschell,
    Thanks for your help.
    I found the error. I was using JDK1_1InitArgs for my vm_args. Since, I am using JDK 1.4, the classpath I was setting was not getting picked up. I changed the vm_args type as in the code below and it worked.
    JavaVMInitArgs vmArgs;
         JavaVMOption options[1];
         char classPathDef[1024];classPathDef[0] = '\0';
         sprintf(classPathDef, "%s", "-Djava.class.path=");
         sprintf(classpath, "%s%s", classPathDef, NYSE_FIX::userClassPath.c_str());
         options[0].optionString = classpath;
         cout << "Option string is:" << options[0].optionString << endl;
    vmArgs.version = 0x00010004;
    vmArgs.options = options;
    vmArgs.nOptions = 1;
    vmArgs.ignoreUnrecognized = JNI_TRUE;
         jint ret = JNI_GetDefaultJavaVMInitArgs(&vmArgs);

  • Invocation API or Java Client Libraries

    Hi All,
    I want to invoke my short/long lived processes through my java code.
    Now, There are two ways to achieve this as i know .
    1. Invocation API (which I am using currently now)
    2. java client libraries
    Now my question is whether one can use java client libraries to invoke workbench processes through java code?
    If yes, is it better than Invocation API ?
    Thanks
    Abhiram

    Abhiram,
    You can invoke any service defined to LC (there are several exceptions for good reasons) whether they are out-of-the-box services or applications you have built yourself.
    In my opinion, your preference for invocation should be based upon the best fit for your existing Java classes. That's the beauty of the LC APIs. They give you some flexibility. The invocation APIs are nice for dealing with documents (PDF and native file formats). However, if your Java class(es) use Web Services then use the SOAP endpoint to call the LC process, for example. If performance is an issue and the Java class(es) run on the same host as LC, then use EJB.
    Steve

  • Invocation API to launch an application

    Hi!
    Is it really possible to "start " a java VM from an application written in java?
    The page: http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/invocation.html describes some c++ code that shall do the job I guess....?....but I can't say that I understand everything of it....
    There isn't a simple step by step tutorial out there which describes how it shall be done?
    And what is the "Java application launcher" which the writers of JRE Install Notes 1.4.2 (http://java.sun.com/j2se/1.4.2/jre/install-windows.html) refer to at the bottom of the text?
    Final question: which jre shall I download and install - Windows Offline Installation, Multi-language?.....
    the tutorial http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/invocation.html talks about different JVM - jdk 1.1, Netscape ......
    Could someone please enlight me in this topic?
    Thanks

    First of all, I think the "launcher" mentioned in JRE doc is just a terminology and not a concrete entity. I suppose when you change the setting in Netscape or IE so that it can invokes the Java VM automatically each time there's Java code, that's the equivalent of a "launcher". That's why they say if you want to bypass this "launching" mechanism, you can use Invocation API to do it yourself (or invoke it from something other than Netscape or IE, say, your own self-written software).
    Normally when you're running a Java program, you're inside a JVM, and there's no need to "start" another VM, right? But, just for discussion purpose, if you really want to start another JVM in another "working" space, then yes, I think you can use the Invocation API to do just that. It's a bit awkward, since you'll have to use JNI to call out from Java to C++, then inside the C++ code, invoke JNI_CreateJavaVM() to create a new JVM and work in there. Then call jvm->DestroyJavaVM when you're done. Note that all JVM run from jvm.dll, so they may decide to recycle the very JVM that you were starting from (thus defeating our purpose). But in my opinion it most likely will not (be recycled) and will be a brandnew JVM.
    If you're not sure then try to use the JNI tutorial first. The invocation API is just a part of JNI. Once you're comfortable with calling Java -> C++, then things'll become much clearer.

  • VC8 clients and native invocation API

    Hi,
    Could someone from Sun tell me whether JNI invocation API for the 1.5.0_07 Windows JVM supports .NET clients compiled with Visual C++ 8?
    I have an ASP.NET application that calls into the JVM through the JNI invocation API. I know that there were problems with VC7 clients calling into the 1.3 and 1.4 JVM's (they only surfaced under high concurrency), but I was told that the 1.5 JVM would better support .NET clients.
    Thanks...

    See
    http://www.simtel.net/product.php[id]95126[SiteID]simtel.net

  • JNI, invocation-API, JNI_CreateJavaVM

    Hi,
    I want to compile 'invoke.c' from the internet and
    get a compiler-error. Does anybody know, what to do?
    Thanks Ully
    c-code:
    #include "jni.h"
    jint res;
    JavaVM *jvm;
    JNIEnv *env;
    JDK1_1InitArgs vm_args;
    res=JNI_CreateJavaVM( &jvm, &env, &vm_args );
    compiler VC++ 6.0:
    error C2664: 'JNI_CreateJavaVM':
    cannot convert parameter 2 from 'struct JNIEnv_ ** ' to 'void ** '

    Hi,
    I want to compile 'invoke.c' from the internet and
    get a compiler-error. Does anybody know, what to do?
    Thanks Ully
    c-code:
    #include "jni.h"
    jint res;
    JavaVM *jvm;
    JNIEnv *env;
    JDK1_1InitArgs vm_args;
    res=JNI_CreateJavaVM( &jvm, &env, &vm_args );
    compiler VC++ 6.0:
    error C2664: 'JNI_CreateJavaVM':
    cannot convert parameter 2 from 'struct JNIEnv_ ** '
    to 'void ** 'Alas, you have to cast &env to (void **). The correct call looks like this:
    res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args);
    -Aaron

  • Why my Invocation API failed?

    I want to call Java in my C program,but I failed in my beginning.this is my simple code:
    #include "jni.h"
    #include "stdio.h"
    int main() {
    JavaVMOption options[2];
    JavaVMInitArgs vm_args;
    JavaVM *jvm;
    JNIEnv *env;
    long status;
    options[0].optionString = "-Djava.class.path=.";
    options[1].optionString = "-verbose:jni";
    memset(&vm_args, 0, sizeof(vm_args));
    vm_args.version = JNI_VERSION_1_4;
    vm_args.nOptions = 2;
    vm_args.options = options;
    status = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
    if (status == JNI_ERR) {
    printf("Can't create Java VM\n");
    else {
    printf("SUCCESS\n");
    return 0;
    the code pass the compiling,but when run,it always display:
    Can't create Java VM
    why?
    My JDK is in JBuilder9,and have jvm.dll file,one in E:\JBuilder9\jdk1.4\jre\bin\client,another in
    E:\JBuilder9\jdk1.4\jre\bin\server.and one is 1.1M,another is 2.7M.which one is right?

    Hallo,
    This topic has been discussed several times in this forum. Try searching the forum for JNI_CreateJavaVM[i]. The following code worked for me:
       JavaVMInitArgs vm_argsNew;
       vm_argsNew.version = JNI_VERSION_1_2;
       JavaVMOption options[3];
       options[0].optionString = "-verbose:gc";
       sprintf (classpath, "-Djava.class.path=%s", USER_CLASSPATH);
       options[1].optionString = classpath;
       options[2].optionString = "-Djava.compiler=NONE";
       vm_argsNew.options = options;
       vm_argsNew.nOptions = 3;
       vm_argsNew.ignoreUnrecognized = JNI_TRUE;
       /* Create the Java VM */
       void ** ppEnvVoid = reinterpret_cast <void **> (&a_pJNIenv);
       jint rc = JNI_CreateJavaVM(&a_pjvm, ppEnvVoid, &vm_argsNew);
        if (rc < 0)
           printf ("CreateJavaVm Failed\n");
           return RC_ERROR;
        }Unfortunately, the return codes from JNI_CreateJavaVM are not very informative! You need to keep playing until it works. I suspect that the [i]ignoreUnrecognized option could be important!

  • Java BPEL invocation API - NormalizedMessage.getPayloadString issue

    Hello,
    I'm trying to invoke a two-way (synchronous) BPEL process from with a J2EE application like so:
            NormalizedMessage requestMessage = new NormalizedMessage();
            requestMessage.addPart("payload", requestXml);
            Locator lctr = new Locator(domainId, password);
            IDeliveryService dService = (IDeliveryService) lctr.lookupService(IDeliveryService.SERVICE_NAME);
            NormalizedMessage responseMessage = dService.request(bpelId, operationId, requestMessage);I would like to receive the response as unparsed XML. I thought that would be possible using the following:
            String responsePayload = responseMessage.getPayloadString();but that returns null. responseMessage.getPayload() returns a Map from which I can successfully obtain the payload XMLElement, so the BPEL process is definitely working.
    Any ideas why getPayloadString is not working as I expect it to? Thanks.

    Perhaps try the BPEL forum here on OTN?
    -steve-

  • Invocation API: JFrame opens and closes immediatly when invoced.

    Hello,
    I'm sitting with an existing software, to which I would like to create a Java GUI to present calculation results in a nice way (simple editing, saving in different formats, etc.). The core is Fortran 77 and 90.
    Right now I'm trying to figure out how JNI works, and I have been able to make some C code show a Jframe. However, the JFrame disappears immediately if I don't make the runningThread.sleep() for some time, and I can't seem to find any GUI sample code. If I run it in NetBeans it stays open until I click the X.
    In the end I would like the GUI to be started from Fortran 90 when a user gives the plot command in the application console.
    In addition to the above problem, I would like a push in the right direction. What should I think about with this approach? Any common traps?
    This is how the test looks:
    Java code generated by NetBeans, where I just want to display a JFrame.
    public class JFrame extends javax.swing.JFrame {
        public JFrame() {
            initComponents();
        @SuppressWarnings("unchecked")
        private void initComponents() {
            setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
            setTitle("JFrameInvoced");
            setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
            pack();
        @SuppressWarnings("static-access")
        public static void main(String args[]) throws InterruptedException {
            JFrame frameTest = new JFrame();
            frameTest.setVisible(true);
            Thread runningNow = Thread.currentThread();
            runningNow.sleep(1000);
    }C code from internet.
    #include <stdio.h>
    #include <jni.h>
    JNIEnv* create_vm() {
         JavaVM* jvm;
         JNIEnv* env;
         JavaVMInitArgs args;
         JavaVMOption options[1];
         int ret;
         /* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */
         args.version = JNI_VERSION_1_4;
         args.nOptions = 1;
         options[0].optionString = "-Djava.class.path=D:\\Source\\Invocation_test";
         args.options = options;
         args.ignoreUnrecognized = JNI_FALSE;
         ret = JNI_CreateJavaVM(&jvm, (void **)&env, &args);
         return env;
    void invoke_class(JNIEnv* env) {
         jclass helloWorldClass;
         jmethodID mainMethod;
         jobjectArray applicationArgs;
         jstring applicationArg0;
         //helloWorldClass = (*env)->FindClass(env, "InvocationHelloWorld");
         helloWorldClass = (*env)->FindClass(env, "JFrame");
         mainMethod = (*env)->GetStaticMethodID(env, helloWorldClass, "main", "([Ljava/lang/String;)V");
         applicationArgs = (*env)->NewObjectArray(env, 1, (*env)->FindClass(env, "java/lang/String"), NULL);
         applicationArg0 = (*env)->NewStringUTF(env, "From-C-program");
         (*env)->SetObjectArrayElement(env, applicationArgs, 0, applicationArg0);
         (*env)->CallStaticVoidMethod(env, helloWorldClass, mainMethod, applicationArgs);
    int main(int argc, char **argv) {
         JNIEnv* env = create_vm();
         invoke_class( env );
    }

    sammen wrote:
    Can multithreading be a possible solution to this?Multithreading is certainly involved when you create a GUI using SWING, as SWING automatically creates a thread where all drawing and event handling is performed. Calculations and other longer tasks are performed outside that thread. This is done to avoid blocking the GUI during calculations.
    But first focus on the interface between the C program, where the calculations are performed, and the Java program, where the GUI should be located. Possible questions you should ask yourself are:
    - What data must be sent from the C part to the GUI?
    - What actions do I want to trigger from the C part, e.g. "create a plot"?
    - What actions do I want to trigger from the GUI to the C part, e.g. "redo calculations"?
    Then you could design the interface between those two. The multithreading performed by SWING has to be considered especially for the third question, as event handlers like "actionPerformed" are called from the SWING thread and should return quickly, just triggering the action, but not performing it. But those things are better discussed in the SWING forum.
    Martin

  • Error in invocating the service

    I have a problem in writing a Java program and calling the service using invocation API. The service is a very simple one, which has one input parameter (String) and one output parameter (XML). When I ran the Java program, I got the following error:
    ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
    at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatche r.java:102)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    at adobe.lc.sdk.UploadForm.invokeMyService(UploadForm.java:75)
    at adobe.lc.sdk.UploadForm.main(UploadForm.java:55)
    Caused by: rO0ABXNyAB1vcmcuYXBhY2hlLnNvYXAuU09BUEV4Y2VwdGlvbh5POjjsHQpiAgACTAAJZmF1bHRDb2RldAASTGphd mEvbGFuZy9TdHJpbmc7TAAPdGFyZ2V0RXhjZXB0aW9udAAVTGphdmEvbGFuZy9UaHJvd2FibGU7eHIAE2phdmEubGF uZy5FeGNlcHRpb27Q/R8+GjscxAIAAHhyABNqYXZhLmxhbmcuVGhyb3dhYmxl1cY1Jzl3uMsDAANMAAVjYXVzZXEAf gACTAANZGV0YWlsTWVzc2FnZXEAfgABWwAKc3RhY2tUcmFjZXQAHltMamF2YS9sYW5nL1N0YWNrVHJhY2VFbGVtZW5 0O3hwcQB+AAZ0AEdBRE1DMDAxMUU6IFRoZSBTT0FQIHJlbW90ZSBwcm9jZWR1cmUgY2FsbCAoUlBDKSBjYW5ub3QgY mUgdW5tYXJzaGFsbGVkLnVyAB5bTGphdmEubGFuZy5TdGFja1RyYWNlRWxlbWVudDsCRio8PP0iOQIAAHhwAAAABnN yABtqYXZhLmxhbmcuU3RhY2tUcmFjZUVsZW1lbnRhCcWaJjbdhQIABEkACmxpbmVOdW1iZXJMAA5kZWNsYXJpbmdDb GFzc3EAfgABTAAIZmlsZU5hbWVxAH4AAUwACm1ldGhvZE5hbWVxAH4AAXhwAAAAsnQALmNvbS5pYm0ud3MubWFuYWd lbWVudC5jb25uZWN0b3Iuc29hcC5TT0FQVXRpbHN0AA5TT0FQVXRpbHMuamF2YXQAD2V4dHJhY3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W5wdXRTdHJlYW0uamF2YToxNDg1KQoJYXQgamF2Y S5pby5PYmplY3RJbnB1dFN0cmVhbS5yZWFkT3JkaW5hcnlPYmplY3QoT2JqZWN0SW5wdXRTdHJlYW0uamF2YToxNzE 4KQoJYXQgamF2YS5pby5PYmplY3RJbnB1dFN0cmVhbS5yZWFkT2JqZWN0MChPYmplY3RJbnB1dFN0cmVhbS5qYXZhO jEzMjQpCglhdCBqYXZhLmlvLk9iamVjdElucHV0U3RyZWFtLnJlYWRPYmplY3QoT2JqZWN0SW5wdXRTdHJlYW0uamF 2YTozNjIpCglh

    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:10 87)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch( Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapAxisDispatcher.doSend(SoapAxisDispatche r.java:100)
    ... 4 more
    The source code is:
    public class UploadForm
    public static void main(String[] args)
    try
    Properties connectionProps = new Properties();
    connectionProps.setProperty("DSC_DEFAULT_SOAP_ENDPOINT", "http://myserver:40005");
    connectionProps.setProperty("DSC_TRANSPORT_PROTOCOL", ServiceClientFactoryProperties.DSC_SOAP_PROTOCOL);
    connectionProps.setProperty("DSC_SERVER_TYPE", ServiceClientFactoryProperties.DSC_WEBSPHERE_SERVER_TYPE);
    connectionProps.setProperty("DSC_CREDENTIAL_USERNAME", "administrator");
    connectionProps.setProperty("DSC_CREDENTIAL_PASSWORD", "password");
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);
    invokeMyService ( myFactory );
    catch (Exception e)
    e.printStackTrace();
    private static void invokeMyService ( ServiceClientFactory myFactory ) throws Exception
    ServiceClient serviceClient = myFactory.getServiceClient();
    HashMap parameters = new HashMap ( );
    parameters.put ( "confirmationNumber", "000000000012" );
    InvocationRequest request = myFactory.createInvocationRequest( "QueryForm", "invoke", parameters, true );
    InvocationResponse response = serviceClient.invoke( request );
    Document xmlDocument = (Document) response.getOutputParameter ( "xmlDocument" );
    The question is, I don't know if this is a client problem or on the server side. If it's the process problem, how can I tell if my process is working?

  • Compiling Invocation Programs ? Where to find javai.lib ??

    Hello,
    I'm having J2SE 1.4, VC++ 4.0. I'm trying to compile the invocation programs given in the Java Tutorial but I'm unable to compile since I've not found javai.lib in my J2SE folder. Can anyone help me on how to compile. Where to find javai.lib ??
    Thanks
    Wah Java!

    The javai.lib/dll have been replaced by jvm.lib/dll
    since Java2 SDK 1.2. The javai.lib is in the "lib"
    directory of your JDK installation. Note that the
    invocation API has also changed, and you will probably
    need to update the method calls. See the JNI spec at
    http://java.sun.com/j2se/1.4/docs/guide/jni/spec/jniTOC
    doc.html.As you've said, I compiled the program and linked with jvm.lib but VC++ said that jvm.lib is incorrect file (or you can say corrupt file). Can you please help me how to compile with JVM.lib
    Thanks in advance,
    Ashish Shukla
    Wah Java!

  • Start a process at a specific time of day

    Is there any kind of a time mechanism that will allow a process to be started at a specific time each day?

    There is not a scheduling mechanism native to LC/ADEP. A valid approach would be to use a cron job or WMI (Windows Management Instrumentation) to start a batch file that calls a Java class that uses the LC Java API to invoke the short-lived process.
    See http://help.adobe.com/en_US/enterpriseplatform/10.0/programLC/help/index.html
    Invoking Document Services Using APIs > Invoking Document Services Using the Java API > Quick Start: Invoking a short-lived process using the Invocation API
    Steve

  • Error while loading shared libraries: libjvm.so: cannot open shared object

    Hello,
    I'm trying to compile/link a simple c code that uses the jni invocation API, but when trying to execute it I get this error. My platform is Linux 64 bit. I read in Sun website that jre is not available yet for Linux 64 bit. Is this error related to this? If not, could somebody steer me in the right direction? I'm new to the JNI world BTW.
    Thanks!
    Message was edited by:
    Yanet

    Did you run f90gem.sh? The shell script sets the LD_LIBRARY_PATH etc before running the actual f90genm executable.
    so set the ORACLE_HOME to the Home containing iAS first, then run the shell script.

  • Need help on ODI error table

    Hi all,
    I need to know following things
    1) I have created open few tools and if business validation fails it throws OpenToolExecutionException with some error code now I want to check in which SNP_ table it goes and how cud I track my error info.
    2)
    In other way where these error messages are stored when any scenario execution fails.
    snp_sess_task_log and SNP_STEP_LOG and SNP_SESS_STEP all are having
    one entry I_TXT_TASK_MESS in which table these messages are present
    3)
    Please let me know the names of scenario execution error tracking tables so that I can used them for notification purpose when any scenario fails.
    3)
    I want to know how operator showing this error code as I have inserted
    oracle.odi.sdk.opentools.OpenToolExecutionException: 5000
         at com.nucleus.acom.odi.opentool.tool.OdiProductTransferOpenTool.callOracleSP(OdiProductTransferOpenTool.java:240)
         at com.nucleus.acom.odi.opentool.tool.OdiProductTransferOpenTool.execute(OdiProductTransferOpenTool.java:124)
         at com.sunopsis.dwg.function.SnpsOpenToolFunction.actionExecute(SnpsOpenToolFunction.java)
         at com.sunopsis.dwg.function.SnpsOpenToolFunction.execute(SnpsOpenToolFunction.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execIntegratedFunction(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlS.treatTaskTrt(SnpSessTaskSqlS.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandScenario.treatCommand(DwgCommandScenario.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.h.y(h.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Thread.java:595)

    Hi Santos,
    Is it possible to use the same in OpenTool as I am invoking these steps one by one using invocation API.
    So in that case I wrote a java class as a controller and few Open Tool .
    * Condition is like we are executing steps one by one from that controller class .
    if the previous step caused exception then I use to stop all the other steps those are the successor of the same.
    * Open tool may throw some OpenToolExecutionException which depends on some businees validation and also some common java exception .
    how to use this API odiRef.getPrevStepLog() in my java code and where.
    could you please send me code for that one
    regards,
    palash Chatterjee

Maybe you are looking for

  • Duplicate Instances in cube_instances with same root_id , parent_Id

    Environment - We are having a 2 node cluster installation of SOA SUITE 10.1.3.4, MLR- We have a file poller (say ESB_poller) and for each record in the file we call a BPEL Process (say BPEL_parent) which call another BPEL process (say BPEL_child). BP

  • C++ 2012 package (11.0.50727) & error message during installation printer software

    Hello to you all, I've recently bought a new laptop for my daughter (a HP Pavilion Touch Smart 11). When I try to install the software needed for installation for the printer (HP J6410) I get the following error. C:\Users\<username>\AppData\Local-\Te

  • Bug in scrollbar event triggering?

    In LabVIEW 8.6, I am trying to fire an event when I finish moving the scrollbar of an array indicator.  I use the "mouse up" event to avoid having the event structure fire constantly the entire time I am moving the scrollbar.  However, there seems to

  • Report on PR with item text

    Hi I need a list report of PR in which item text(written in long text) of PR (which is genreted through PS) should come In which report can i get this? Regards Kalpesh

  • Time / NTP and TZ

    I have a couple of servers that thanks to a quirky SAP installation cannot be allowed to change their time zone on their own. They have to run on GMT and have the system clock manually changed to and from BST (GMT + 1). Is there a way of applying a 1