Topic
  • 14 replies
  • Latest Post - ‏2015-02-04T08:29:41Z by paul.brett
SystemAdmin
SystemAdmin
6184 Posts

Pinned topic jexit using 8.2.0.1

‏2008-05-19T17:56:41Z |
Hi All,

I am trying to use the jexit function in wtx 8.2.0.1 and not having any success. Has anyone been able to use jexit successfully.

I am using the sample class file that is supplied.

java class sample:

package com.ibm.websphere.dtx.test;
public class TestJExit {
/* Person person = new Person(); */
public TestJExit() {
}
public String toUpper(String test) {
return test.toUpperCase();
}
public String Concat(String test1, String test2) {
return test1 + test2;
}
public Integer toNumber(String test1) {
return new Integer(test1);
}
public Double toDouble(String test1) {
return new Double(test1);
}
public void toNothing() {
}
public int returnint() {
return 9;
}
public byte returnbyte() {
return 8;
}
/* public Person getPerson() {
return person;
} */
}

I have also added the java class directory to my system CLASSPATH.

my wtx rule is JEXIT ("com.ibm.websphere.dtx.test.TestJExit " , "toUpper" , "Websphere")

I am running on win xp, java version 1.6.0_05

Any help is appreciated.

Tom
Updated on 2013-01-30T21:49:11Z at 2013-01-30T21:49:11Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: jexit using 8.2.0.1

    ‏2008-05-20T11:44:09Z  
    Looks like there is a space at the end of the classname. Once I fixed it, I am able to run the map fine.
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: jexit using 8.2.0.1

    ‏2008-05-20T14:11:03Z  
    Looks like there is a space at the end of the classname. Once I fixed it, I am able to run the map fine.
    Hi

    Still having a problem with jexit. I had fixed the class by removing the space, compiled the class using
    dos command javac and created class file. I then went into wtx8.2.0.1 created a new map and added my rule
    jexit. Compiled map and ran it, all I get back is " function aborted map".

    I updated my rule
    =VALID(JEXIT ("com.ibm.websphere.dtx.test.TestJExit" , "toUpper" , "Websphere"), FAIL(LASTERRORCODE( )))

    Tom
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: jexit using 8.2.0.1

    ‏2008-06-04T16:26:48Z  
    Hi All,

    I am getting this error "java.lang.Exception: java.lang.ClassNotFoundException: com.ibm.websphere.dtx.test.TestJExit" when I try to run my map. I have added the
    class file to my system CLASSPATH=c:\TestJExit.class;c:\

    I am not familar with eclipse, so do I need to add some variable to
    the eclipse ide that points to my class file?

    Any help or additional instructions to set up my WTX eclipse environment will
    be much appreciated

    Thanx Tom
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: jexit using 8.2.0.1

    ‏2008-06-16T18:18:39Z  
    Hi All,

    I am getting this error "java.lang.Exception: java.lang.ClassNotFoundException: com.ibm.websphere.dtx.test.TestJExit" when I try to run my map. I have added the
    class file to my system CLASSPATH=c:\TestJExit.class;c:\

    I am not familar with eclipse, so do I need to add some variable to
    the eclipse ide that points to my class file?

    Any help or additional instructions to set up my WTX eclipse environment will
    be much appreciated

    Thanx Tom
    Hi,
    You need to add the location of the jar file that includes your java code to the file:
    <WTX_INSTALL_DIR>/dtx.ini file under

    External Jar Files
    jar1=your jar file full path

    Good luck
    Updated on 2008-06-16T18:18:39Z at 2008-06-16T18:18:39Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: jexit using 8.2.0.1

    ‏2008-06-16T19:00:19Z  
    Hi Liron,

    I am getting this error "java.lang.Exception: java.lang.ClassNotFoundException: com.ibm.websphere.dtx.test.TestJExit"

    I created a jar file and added the full path to my dtx.ini

    External Jar Files
    jar1=C:\Mercator82\Examples\jexit\TestJExit.jar

    have you been able to get it to work.

    Do I need to add something to my eclispe envir for DTX?,Path, other varibles I'm not familar
    with eclipse.

    Any thoughts.

    Thanks Tom
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: jexit using 8.2.0.1

    ‏2008-08-20T06:05:51Z  
    Hi Liron,

    I am getting this error "java.lang.Exception: java.lang.ClassNotFoundException: com.ibm.websphere.dtx.test.TestJExit"

    I created a jar file and added the full path to my dtx.ini

    External Jar Files
    jar1=C:\Mercator82\Examples\jexit\TestJExit.jar

    have you been able to get it to work.

    Do I need to add something to my eclispe envir for DTX?,Path, other varibles I'm not familar
    with eclipse.

    Any thoughts.

    Thanks Tom
    Hi,
    You just have to add the jar location to dtx.ini (as you did) and restart the Design Studio.
    well - you've probably done that by now...
    Did you manage to activate the Jexit?
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: jexit using 8.2.0.1

    ‏2008-10-29T19:26:19Z  
    HI All,

    Has anyone been successfully in using the JEXIT function. I am running WTX 8.2.0.3 and still
    can not get it to work. I'm still getting error "java.lang.Exception: java.lang.ClassNotFoundException: com.ibm.websphere.dtx.test.TestJExit"

    I am using the same sample that is defined in documentation.

    I have created the jar file and put the path and name in my dtx.ini jar=

    I am using the basic install on WTX with no modifications to the eclipse startup bat.

    Am I missing something in the startup bat file or do I need to add a path to eclipse????

    Any help would be very appreciated.

    Tom
  • Subh
    Subh
    6 Posts

    Re: jexit using 8.2.0.1

    ‏2008-10-31T08:51:40Z  
    HI All,

    Has anyone been successfully in using the JEXIT function. I am running WTX 8.2.0.3 and still
    can not get it to work. I'm still getting error "java.lang.Exception: java.lang.ClassNotFoundException: com.ibm.websphere.dtx.test.TestJExit"

    I am using the same sample that is defined in documentation.

    I have created the jar file and put the path and name in my dtx.ini jar=

    I am using the basic install on WTX with no modifications to the eclipse startup bat.

    Am I missing something in the startup bat file or do I need to add a path to eclipse????

    Any help would be very appreciated.

    Tom
    Please make sure you have removed the remarks ";" - semicolon in the dtx.ini file that comes by default.

    By default it looks like
    External Jar Files
    ;jar1=
    ;jar2=
    ;...

    change that to
    External Jar Files
    jar1=c:\temp\temp.jar
    ;jar2=
    ;...

    Hope this helps.

    Thanks,
    Subha
  • Muk1234
    Muk1234
    22 Posts

    Re: jexit using 8.2.0.1

    ‏2012-12-20T09:31:10Z  
    • Subh
    • ‏2008-10-31T08:51:40Z
    Please make sure you have removed the remarks ";" - semicolon in the dtx.ini file that comes by default.

    By default it looks like
    External Jar Files
    ;jar1=
    ;jar2=
    ;...

    change that to
    External Jar Files
    jar1=c:\temp\temp.jar
    ;jar2=
    ;...

    Hope this helps.

    Thanks,
    Subha
    Guys, I am facing same problem. Not able to use JEXIT even if i gave proper path of my jar file in the dtx.ini file. Tomw did u get the solution? Can anyone help me on this please. I am a newbie to WTX and we are using wtx 8.4. I am getting the same error FAIL function aborted the map and when i see the log, i can see only "Java exception occurred". I have used VALID(JEXIT("MYCLASSNAME","FUNCTIONNAME"),FAIL(LASTERRORMSG())) as the component rule. Any help would be appreciated. Thanks in advance
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: jexit using 8.2.0.1

    ‏2012-12-26T01:01:29Z  
    • Muk1234
    • ‏2012-12-20T09:31:10Z
    Guys, I am facing same problem. Not able to use JEXIT even if i gave proper path of my jar file in the dtx.ini file. Tomw did u get the solution? Can anyone help me on this please. I am a newbie to WTX and we are using wtx 8.4. I am getting the same error FAIL function aborted the map and when i see the log, i can see only "Java exception occurred". I have used VALID(JEXIT("MYCLASSNAME","FUNCTIONNAME"),FAIL(LASTERRORMSG())) as the component rule. Any help would be appreciated. Thanks in advance
    Attached is the sample with Rule =VALID(JEXIT("com.ibm.websphere.dtx.test.TestJExit", "toUpper", "WebSphere"), LASTERRORMSG())

    The only step, I did is, drop the Jar file (TestJExit.jar) in to WTX Design Studio install directory once I built from the Eclipse project
  • Purush_WTX
    Purush_WTX
    8 Posts

    Re: jexit using 8.2.0.1

    ‏2013-01-29T20:29:03Z  
    Attached is the sample with Rule =VALID(JEXIT("com.ibm.websphere.dtx.test.TestJExit", "toUpper", "WebSphere"), LASTERRORMSG())

    The only step, I did is, drop the Jar file (TestJExit.jar) in to WTX Design Studio install directory once I built from the Eclipse project
    @dtx_user : I have few questions for you guys. I am using JEXIT to do lookup from hashtable stored in cache.
    Now I want to know few things.

    1. I have a server running multiple launchers. So is it possible for different maps running on different launchers to access single hashtable. Basically I dont want to create same copy of hashtable in cache for each launchers on the server. Rather I am trying to use this as global variable on a single server and use same hashtable data across many maps running under different launchers.

    2. Do you know / heard any possible issues/challanges using chache for lookup.

    3. How expensive is the use of JEXIT in terms of map performance and resource utilization ? Pros and Cons of JEXIT. What does IBM recommend on use of JEXIT.
  • SystemAdmin
    SystemAdmin
    6184 Posts

    Re: jexit using 8.2.0.1

    ‏2013-01-30T21:49:11Z  
    @dtx_user : I have few questions for you guys. I am using JEXIT to do lookup from hashtable stored in cache.
    Now I want to know few things.

    1. I have a server running multiple launchers. So is it possible for different maps running on different launchers to access single hashtable. Basically I dont want to create same copy of hashtable in cache for each launchers on the server. Rather I am trying to use this as global variable on a single server and use same hashtable data across many maps running under different launchers.

    2. Do you know / heard any possible issues/challanges using chache for lookup.

    3. How expensive is the use of JEXIT in terms of map performance and resource utilization ? Pros and Cons of JEXIT. What does IBM recommend on use of JEXIT.
    A) JEXIT will create a JVM with in the same launcher process. Any map with in the same launcher process can access your lookup cache. Across different launcher process is a complete different use case (you need to use shared memory concept to accomplish it).

    B) Using static methods, Singleton pattern and synchronized concepts you can easily accomplish a thread safe lookup.

    C) I would suggest to put the last Q to IBM support team. I do not have any info to share.
  • ManojaM
    ManojaM
    1 Post

    Regarding JEXIT

    ‏2015-01-29T13:17:42Z  
    A) JEXIT will create a JVM with in the same launcher process. Any map with in the same launcher process can access your lookup cache. Across different launcher process is a complete different use case (you need to use shared memory concept to accomplish it).

    B) Using static methods, Singleton pattern and synchronized concepts you can easily accomplish a thread safe lookup.

    C) I would suggest to put the last Q to IBM support team. I do not have any info to share.

    I am using JEXIT to execute a .jar file.

    I didn't get ant build errors, after running the map in command server it is showing that map completed successfully.

    Elapsed time 0:00

    Input: 1 of 1           Objects: 1

    Output: 1 0f 1         Objects: 0

    can any one please explain me what it means...?

     

  • paul.brett
    paul.brett
    479 Posts

    Re: Regarding JEXIT

    ‏2015-02-04T08:29:41Z  
    • ManojaM
    • ‏2015-01-29T13:17:42Z

    I am using JEXIT to execute a .jar file.

    I didn't get ant build errors, after running the map in command server it is showing that map completed successfully.

    Elapsed time 0:00

    Input: 1 of 1           Objects: 1

    Output: 1 0f 1         Objects: 0

    can any one please explain me what it means...?

     

    You resurrected a thread from 2013, and although it is relevant, I recommend you open a new thread.

    To diagnose your issue, you could add :

    +LASTERRORCODE()+LASTERRORMSG()

    ...to your mapping rule containing the JEXIT().  Then add the output of this, to the new thread for review.

    Thank-you.

    Paul.

    Follow me on Twitter