6 Replies Latest reply on Aug 31, 2021 8:20 AM by inuser519261

    Use non-standard Java libraries in Java Transfomer

    inuser519261 New Member

      Hi,

      I am trying to find out how to use non-standard Java libraries in an IICS Java Transformer. Working with standard Java libraries works fine.

       

      To give more context, as proof of concept I have downloaded the latest JavaMail (1.6.2) jar and placed it as discussed here on our Windows Server to use the Java library in production. Set Java Classpath on Secure Agent for Linux

      D:\Program Files\Informatica Cloud Secure Agent\apps\Data_Integration_Server\ext\deploy_to_main\bin\rdtm\javalib\javax.mail-1.6.2.jar

       

      Then, in the code section of the Java Transformer I add this line in the `Import Packages` section:

       

      import javax.mail.*;

       

      When I click Compile I immediately get an error :

       

      Import Packages, Line 1: "package javax.mail does not exist"

       

      I tried to add the jar on the Java Transformer design-time Java Classpath under Advanced / Design Time Classpath:`

      "D:\Program Files\Informatica Cloud Secure Agent\ext\ctjars"

      (and I've also tried to set the path to the jar file directly: "D:\Program Files\Informatica Cloud Secure Agent\apps\Data_Integration_Server\ext\deploy_to_main\bin\rdtm\javalib\javax.mail-1.6.2.jar")

       

      However, when I did so and compile it takes 30 seconds or so and then I get this error:

       

      Exception occurred during compilation: An error occurred while compiling on the Secure Agent: An unexpected error occurred: invalid target release: Cloud

       

      So, I must do something wrong. But it's not clear to me what.

       

      Can anybody explain step-by-step how to use non-standard Java libraries in a Java Transformer, please?

       

      #Update

      I added the JVMClasspath, and the CLASSPATH env variable as well (one should be enough already) but I still get the before mentioned error.

      "D:\Program Files\Informatica Cloud Secure Agent\ext\ctjars" (which contains javax.mail-1.6.2.jar)


      There should be a canonical answer or KB that describes but there isn't. Actually, if you search the internet for the error above you get only one result linking to this post!

       

      Message was edited by: F Grimps