sam66
sam66

Reputation: 11

Java Transformation error (Message Code: JAVA PLUGIN_1762)

I have 2 csv source files. I am using union transformation to consolidate the sources and then using Java transformation to generate rows for below sample rows :

COLUMN1 COLUMN2 COLUMN3 COLUMN4    
abc     VK123   DKVGH   VP234,VP111  
bbb     VK345   DGHKD   VP999,VM33

Target should be :

COLUMN1 COLUMN2 COLUMN3 COLUMN4  
abc     VK123   DKVGH   VP234  
abc     VK123   DKVGH   VP111  
bbb     VK345   DGHKD   VP999  
bbb     VK345   DGHKD   VM33  

Code in JAVA transformation:

String str=COLUMN4;  
String[] temp;  
String delimiter = ",";  
temp = str.split(delimiter);  
for (int i =0; i< temp.length; i++){  
COLUMN4= temp[i];  
generateRow();  
}

Encountering the below errors after running workflow :

Message Code: JAVA PLUGIN_1762 Message: [ERROR] java.lang.NullPointerException

Message Code: JAVA PLUGIN_1762 Message: [ERROR] at com.informatica.powercenter.server.jtx.JTXPartitionDriverImplGen.execute(JTXPartitionDriverImplGen.java:195)

Please provide me some inputs in order to fix these issues

Upvotes: 0

Views: 4478

Answers (1)

Samik
Samik

Reputation: 3455

Your Java code looks fine. Check if the value of column4 is coming as null. Alternatively, you can include null checking in the Java code.

if (COLUMN4 != null)
  str=COLUMN4;
else
  str="";

Upvotes: 1

Related Questions