Skip to main content
Question

The Resource already exists

  • 5 June 2024
  • 4 replies
  • 76 views

In IFS Cloud, I migrated a large set of Resource groups.

When I try to add a Person to a Resource Group, I get an error message stating : 

The Resource already exists.

 

I get the same error when I try to add a new resource group manually.

 

Has anyone encountered this error before ?

 

 

4 replies

Userlevel 2
Badge +4

Hi Antonio,

This looks to be a standard error regarding a primary key violation. The Resource entity has an ResourceSeq as its primary key and this value is generated from an internal Oracle Sequence.

How were the Resource Groups migrated across – would they have updated the internal Oracle Sequence or could the sequence now be trying to use numbers already in the RESOURCE_TAB?

Thanks

Hugh

Userlevel 1
Badge +5

Hi Hugh,

This makes sense.

I migrated using the Excel migration tool.

 

Seemslike I will need to delete all records and re-create.

I will use a Migration job this time.

 

Cheers,

Antonio

 

 

Userlevel 4
Badge +5

Hi Hugh

I keep getting the same error message when attempting to create a new resource group (or) add a resource ID to an already migrated resource group. Can you please help me resolve this issue?

 

Thank You

Nagaraj Kotakonda

Userlevel 2
Badge +4

Hi Hugh

I keep getting the same error message when attempting to create a new resource group (or) add a resource ID to an already migrated resource group. Can you please help me resolve this issue?

 

Thank You

Nagaraj Kotakonda

Hi Nagaraj,

If the migration data has a value for ResourceSeq other than 0 then the internal oracle sequence will not be updated and so when trying to add a new Resource the value returned from the oracle sequence will potentially already exist within RESOURCE_TAB.

This can be confirmed by checking what the next value would be on that internal oracle sequence and then see if there exists within the RESOURCE_TAB a value for ResourceSeq that is equal to or greater than this next value.

If that is the situation then the resolution would be to make sure that the internal oracle sequence’s next value is above any existing values within RESOURCE_TAB. This can be achieved via different ways, for example by removing and recreating the relative migration data, making sure that the new migration data does not include a value, other than 0, for ResourceSeq within the Resource entity. Another example of a way to update the internal oracle sequence’s next value would be to do so directly but that would need to be reviewed and tested before doing so, but there are other ways that an oracle sequence‘s next value can be updated.

Thanks and regards

Hugh

Reply