Topic
2 replies Latest Post - ‏2011-11-15T13:58:32Z by jchaves
Tirthaguha
Tirthaguha
1 Post
ACCEPTED ANSWER

Pinned topic How to call ODME application (.odmapp) from stateless session bean.

‏2011-11-14T07:33:23Z |
We are facing a technical issue in our Project. The problem Statement is :

How to call ODME application (.odmapp) from stateless session bean.

For stand-alone java code it is working as follows
IloOdmProject sampleodm = new IloOdmProject("C:/EPOS/workspace/mulprod.odmapp");
while calling the same from ejb, its giving the following error :

java.lang.IllegalAccessError: com/ibm/icu/text/UFormat.setLocale(Lcom/ibm/icu/util/ULocale;Lcom/ibm/icu/util/ULocale;)V
at com.ibm.icu.text.DurationFormat.<init>(DurationFormat.java:49)
at com.ibm.icu.impl.duration.BasicDurationFormat.<init>(BasicDurationFormat.java:72)
Updated on 2011-11-15T13:58:32Z at 2011-11-15T13:58:32Z by jchaves
  • jchaves
    jchaves
    4 Posts
    ACCEPTED ANSWER

    Re: How to call ODME application (.odmapp) from stateless session bean.

    ‏2011-11-14T15:23:11Z  in response to Tirthaguha
    What is the overall configuration (servers, JRE, ODME version, etc.)?

    I had the same problem while building POJOS for interacting with the ODME 3.5 API in WAS 7.0.1.

    It turned out to be differences in JREs between the Eclipse environment (used to build\compile the Java classes) and the JRE used by WAS. Make sure to:
    1. Point the development tool that you are using to compile the Beans to the same JRE that WAS using or vice-versa. That also include the JRE reference in the Build Path including ANY libraries used.

    2. Make sure that you are not mixing 32-bit code to run on a 64-bit JRE. A very common issue for Windows XP users deploying code to a 64-bit environment (including 64-bit ODME).

    Once I synchronized all JREs, everything worked as expected.
  • jchaves
    jchaves
    4 Posts
    ACCEPTED ANSWER

    Re: How to call ODME application (.odmapp) from stateless session bean.

    ‏2011-11-15T13:58:32Z  in response to Tirthaguha
    Update to the solution. Also check the order in which WAS is loading the classes. WAS has its own class loading process which can create conflicts with the required libraries.
    This caused several problems including “ClassDefNotFound” and “ClassNotFound” exceptions in our projects, specially with “icu4j.jar”. The best way to avoid conflicts is to set the class loader order (Applications > Websphere enterprise applications > CustomAppName > Class loading and update detection.) in the WAS Console to “Classes loaded with local class loader first (parent last) effectively telling WAS to load your custom classes first. This can also be set on the application.xml file.

    Note: This option is not available when launching WAS and deploying the JAR from the Rational Software Architect IDE. This force me to deploy the app in the traditional way (build the JAR and deploying it through the WAS Admin Console).