cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.String cannot be cast to de.hybris.platform.core.PK

0 Kudos

Hello People,

What i am trying is when uploading a csv file via hot folder, calling a translator which returns a string value. Now translator returns value and impex gets creted which try to insert data in table. When impex runs it gives following error.

java.lang.String cannot be cast to de.hybris.platform.core.PK

Table in which i am trying to insert is a relationship table and columns are SOURCEPK and TARGETPK from 2 different table.

is there any way i can change type to PK while returning from translator ?

Thanks !

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

To return a PK from a String, you can use

 PK.parse("123456789");
0 Kudos

Thanks Buddy! It is working superb.

Answers (0)