Reputation: 4397
I got stuck with this error and in the a Java Transformation that has already compiled. What could be wrong, missing?
My transformation gets a data from a table (String FechaInicial) and generates a table calendar in the output (String CaleId).
Code follows:
Calendar calInici = Calendar.getInstance();
calInici.set(Calendar.YEAR, Integer.parseInt(FechaInicial.substring(0,4)));
calInici.set(Calendar.MONTH, Integer.parseInt(FechaInicial.substring(5,7)));
calInici.set(Calendar.DAY_OF_MONTH, Integer.parseInt(FechaInicial.substring(8,10)));
Calendar calFi = Calendar.getInstance();
calFi.set(Calendar.WEEK_OF_YEAR, 1);
calFi.set(Calendar.DAY_OF_WEEK, 1);
calFi.add(Calendar.MONTH, 1);
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
for ( Calendar c = calInici; c.compareTo ( calFi ) <= 0; c.add(Calendar.DAY_OF_WEEK, 1 ) )
{
CaleId = df.format(c.getTime());
generateRow();
}
Note (15-Oct):
I have received this but does not make sense in this context because I have reduces my code to:
CaleId = FechaInicial;
generateRow();
I have received this reply from a colleague without any result:
Problem Description
Java Transformation fails with error TM_6279: The session instance encountered the following run-time validation error: Byte code in the repository is invalid. Java transformation is invalid.
The issue starts to happen after changing the repository codepage from Latin1 to UTF8. After that, a Java transformation that used to work, failed showing a wrong byte code error message.
By recompiling the code or validating the map, the same error occurs. Also, when reviewing the Java Code transformation involved, the following is showed in the Java Code tab:
--
FieldName = "test^©";
generateRow();
--
The field value showed is wrong and it should not be like that. This field value has special characters used by Portuguese Brazilian Language, but also happens with Japanese, Chinese, or any language that uses special characters.
Cause
This issue occurs due to embedding of string of specific character set in the Java code after converting a single byte to multi byte. PowerCenter store the byte code in the repository and the client machine (Designer client machine) code page is used during compilation of the Java code.
Other transformations would work fine in UTF8 and Latin or Asian Languages. However, Java Transformations wouldn't work fine when using UTF-8.
Solution
This is a known issue and CR 193867 has been raised to be addressed in future releases. However, an EBF is available on top of Informatica 9.0.1 HotFix 2. Contact Informatica Global Customer Support for the EBF.
The fix consists in a DLL enhancement that should be applied at Server and Client side, to allow the Java transformations to work with UTF8 Code Page + special characters.
It is important to recompile all the involved Java Transformation codes, from all the impacted mappings after EBF installation.
Upvotes: 1
Views: 2691
Reputation: 11
This occurs when compiled java code which is saved to repository does not match with what is being saved back to repository. In order to fix this.
1) Open java transformation --> go to Java Code --> settings --> Add the java class path from your local and re-compile the code.
Make sure you see the message like below Java code compilation successful.
Remove the class path after code is saved.
Upvotes: 1
Reputation: 17383
My guess is that it may be caused by incompatible versions of Java installed on the on client machine and the Integration Service server.
http://blogs.hexaware.com/informatica-way/java-transformation/
Informatica PowerCenter client uses JDK to compile Java code and generates byte code. PowerCenter client stores the byte code in the PowerCenter repository. The Integration Service uses JRE to execute the generated byte code at run time.
Upvotes: 0