cancel
Showing results for 
Search instead for 
Did you mean: 

Illegal value type '1' for specified field type 'text'. Original exception

Former Member
0 Kudos

the program running normal,but when i modify the structure of repository,the exception appearence,but i do not know why!!!!!!!!

RetrieveRecordsByIdCommand rlrCmd = new RetrieveRecordsByIdCommand (rep.connPool);

rlrCmd.addId(rid);

rlrCmd.setResultDefinition(rd);

rlrCmd.setSession(rep.getNewSession());

rlrCmd.execute();

when execute the code "rlrCmd.execute();",the exception come;

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Are you able to solve the problem? If yes, kindly close by marking as Answered and posting the resolution.

Cheers.

Arafat

Former Member
0 Kudos

I have resolved the problem,the reason is that in a child table ,a field type is text and the value si calculated ,but the value of actual is false or true, I do not know why,when I reload the repository the value normally!

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

The issue here is that when you are passing the value 1, it is taking it as a INTEGER value while you have a field in MDM that is of type text, so you need to pass the value as a string.

Hopefully it would resolve the issue.

Regards,

Arafat

Former Member
0 Kudos

but my operation is a query,have no value pass !

Former Member
0 Kudos

Hi,

Can you paste the ResultDefinition structure that you are using?

Regards,

Arafat

Edited by: Arafat Farooqui on Jul 31, 2009 10:37 AM

Former Member
0 Kudos

hi,thi is my code segment:

ResultDefinition rd = new ResultDefinition(mainTableId);

FieldProperties[] fp = rep.repositorySchema.getFields(mainTableId);

FieldId[] mtFIds = new FieldId[fp.length];

for(int i=0;i<mtFIds.length;i++){

mtFIds<i> = fp<i>.getId();

}

rd.setSelectFields(mtFIds);

in the programe,i get all field.thank you!

Former Member
0 Kudos

Hi,

In the below code:

After you have created an array of predefined lenght, you need to store the ids at the corresponding indices.

for(int i=0;i<mtFIds.length;i++){

mtFIds = fp.getId();

I think it should be something like this:

for(int i=0;i<mtFIds.length;i++){

mtFIds<i> = fp<i>.getId();

Anyways I would suggest you to retrieve the value for a single field by addind a single field to resultDefinition.

Hope this helps!!

Regards,

Arafat