Invalid Compiler Output Error

Hello, 

Can somebody please help fix the error shown below? 

I would like to publish and ID is set to Integer, but the server will not allow it.

Thanks,

Reemah




Check the data-type of priority_ID or Refresh & try again.
If possible check service center log & mention it on forum here.


You decalred the Priority.id as Integer with Autonumber but it is defined as text in DB

assif_tiger wrote:

Check the data-type of priority_ID or Refresh & try again.
If possible check service center log & mention it on forum here.


You decalred the Priority.id as Integer with Autonumber but it is defined as text in DB


In the database Priority Id is defined as an integer, refresh does not work. 


Solution

Hi Reemah,


what assif_tiger means (and what your error message is saying) is that at some point earlier, the entity was published with a data type of text resulting in such a table in the dbms, and now the dbms doesn't allow changing the datatype to integer.  

The screenprint you are showing with a data type integer, is the definition of the entity in outsystems, not the underlying table structure.


If you don't have a lot of data in your database yet, and not many screens referencing priority, remove the entity and all references to it from your module.  (and maybe keep a copy of expressions in Notepad if you want to recreate them with the new entity later)

Publish after working through all the error messages you will have to solve.

Then use the DBCleaner Forge component to remove the underlying table and foreign key columns to it.

Then start over, adding the priority with the correct id data type.


If you have a lot of stuff, like screens or expressions referencing the priority, or al lot of data in your database with an assigned priority, and you don't want to loose all that information, then fixing this gets more convoluted.  Assuming you're working on exercises to get to know OS, that would lead you too far off topic, I think.


Have fun,

Dorine

Solution

Dorine Boudry wrote:

Hi Reemah,


what assif_tiger means (and what your error message is saying) is that at some point earlier, the entity was published with a data type of text resulting in such a table in the dbms, and now the dbms doesn't allow changing the datatype to integer.  

The screenprint you are showing with a data type integer, is the definition of the entity in outsystems, not the underlying table structure.


If you don't have a lot of data in your database yet, and not many screens referencing priority, remove the entity and all references to it from your module.  (and maybe keep a copy of expressions in Notepad if you want to recreate them with the new entity later)

Publish after working through all the error messages you will have to solve.

Then use the DBCleaner Forge component to remove the underlying table and foreign key columns to it.

Then start over, adding the priority with the correct id data type.


If you have a lot of stuff, like screens or expressions referencing the priority, or al lot of data in your database with an assigned priority, and you don't want to loose all that information, then fixing this gets more convoluted.  Assuming you're working on exercises to get to know OS, that would lead you too far off topic, I think.


Have fun,

Dorine

Hi Dorine, 

Thank you for this, it's very helpful.  I have deleted the Priority entity and have notes of all of its references to add back in later.  


One last question, I have downloaded the DBCleaner and added it as a dependency in my app: 


Will this now automatically remove underlying tables in the databases or do I need to do something extra before adding back the Priority entity?


Thanks,

Reemah 


Hi Reemah,


DBCleaner is a tool that you can use to go in and clean up stuff in the underlying database that got left behind after removal of entities or attributes.

So publish it in your environment and launch it, you'll have to log in.

You can go to the database entities tab, and you should see the priority entity in the entity section, and any deleted referencing attributes as columns in the second section of this tab.  The 'drop' button will remove them from the database.


PS. No need to add it as a dependency in your own modules.

Dorine Boudry wrote:

Hi Reemah,


DBCleaner is a tool that you can use to go in and clean up stuff in the underlying database that got left behind after removal of entities or attributes.

So publish it in your environment and launch it, you'll have to log in.

You can go to the database entities tab, and you should see the priority entity in the entity section, and any deleted referencing attributes as columns in the second section of this tab.  The 'drop' button will remove them from the database.


PS. No need to add it as a dependency in your own modules.


Thank you, Dorine. 

I have followed your instructions and dropped the deleted attributes.  I then re-added the Priority entity and published, that now works fine. 

The problem seems to be popping back up when I try to reference the Priority ID in other entities, this message appears again. 




Hi Reemah,


that sounds like you didn't delete the referencing column in that entity.  you have same problem there, of course.

The quick and dirty would be to just choose another attribute name...


Dorine Boudry wrote:

Hi Reemah,


that sounds like you didn't delete the referencing column in that entity.  you have same problem there, of course.

The quick and dirty would be to just choose another attribute name...


Brilliant, thanks Dorine this is all resolved and is working perfectly. now  Thank you for all of your help!