We are creating some custom views within the IFS Oracle database so that we can pull the data from the views into the IFS BI Module using SSIS packages. Most of the time when I am running the SQL scripts to test the views everything works fine but occasionally we run into errors like the following:
ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package "IFSAPP.SHIPMENT_CFP" has been invalidated ORA-04065: not executed, altered or dropped package "IFSAPP.SHIPMENT_CFP" 04068. 00000 - "existing state of packages%s%s%s has been discarded" *Cause: One of errors 4060 - 4067 when attempt to execute a stored procedure. *Action: Try again after proper re-initialization of any application's state.
If I run the script again right after everything works. Does anyone know what causes this error and what we should do to avoid it?
Our scripts often make use of IFS Views as they usually have the additional data like Custom Fields that we need.
Thanks,
Mark Mruss
Page 1 / 1
Hi @MarkMr,
The package mentioned in the error is a custom field package. Every time someone re-synchronize or re-publish custom fields, this type of packages will be re-compiled. Have you checked if anyone is working with custom fields in Shipment area while this is happening?
Hope this helps!
Hi @Charith Epitawatta
Thanks for the information. Does this mean that someone was updating the custom fields while the script was running? I can check within the organization to see if that’s the case.
If that does happen what do we need to do in order to get the custom fields to be re-initialized? I don’t change anything and just runt he SQL again and it works.
Thanks,
Mark Mruss
Hi @MarkMr,
Hi @Charith Epitawatta
Thanks for the information. Does this mean that someone was updating the custom fields while the script was running? I can check within the organization to see if that’s the case.
It appears that way. You can check the Custom Objects cache in “Refresh Server Cache” window in IEE to check when was the last time Custom Objects cache was refreshed. Every time someone synchronize or publish a custom object, this cache will be refreshed. However, it won’t tell you who did it for which custom object. For that, you may check with the people who have privileges to develop/administrate custom objects.
If that does happen what do we need to do in order to get the custom fields to be re-initialized? I don’t change anything and just runt he SQL again and it works.
Ideally, nothing. Once the relevant database object is properly re-compiled, it should work when you query again. However you can go to the Custom Fields window and query for the relevant Logical Unit(appears to be ‘Shipment’ in this case) and see if the synchronized check box is checked, which means the custom fields and all the relevant database objects are correctly published.
Hope this helps!
Thanks for the help @Charith Epitawatta that seems like exactly what is happening here. I doubt it will be an issue in production and it’s probably just happening in development because people are actively working.