我遇到了这个错误,并且在已经编译的Java转换中遇到了问题。会出什么问题呢,丢了?
我的转换从表(String FechaInicial)中获取数据,并在输出(String CaleId)中生成表日历。
代码如下:
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();
}注(15-10月):
我已经收到了这个,但在这个上下文中没有意义,因为我已经将我的代码减少到:
CaleId = FechaInicial;
generateRow();我收到一位同事的回复,但没有任何结果:
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.发布于 2015-11-24 05:19:34
当保存到存储库的已编译java代码与正保存回存储库的代码不匹配时,就会发生这种情况。为了解决这个问题。
1)打开java转换-->转到Java代码-->设置-->从本地添加java类路径,并重新编译代码。
确保您看到下面这样的消息: Java代码编译成功。
保存代码后删除类路径。
发布于 2014-10-15 00:42:44
我的猜测是,这可能是由于客户端计算机和Integration Service服务器上安装的Java版本不兼容造成的。
http://blogs.hexaware.com/informatica-way/java-transformation/
Java客户端使用
编译Java代码并生成字节码。PowerCenter客户端将字节码存储在PowerCenter存储库中。集成服务使用JRE在运行时执行生成的字节代码。
https://stackoverflow.com/questions/26363401
复制相似问题