ORA-00904: invalid identifier

  

We're getting an error when performing simple queries to some entities in the application. When performing the query in the Core module where it is defined, the error does not occur. However, when referencing the entity in a consumer module, the database raises an exception.

Has anyone ever experienced this?


Error Detail
Back to Log
Id:
babc311b-51fa-4f17-87be-8896c4dcd7bf
Time of Log:
2018-02-02 00:17:55
eSpace:
Biograma_Financeiro
Tenant:
Users
User:
 (8)
Session Id:
uegt2lpdqpldejytk0zqbkn1
Server:
E30EC-DV41CS
Module:

Message:


ORA-00904: "ENLANCAMENTO"."PAGDTLANCAMENTO": invalid identifier


Environment InformationeSpaceVer: 9 (Id=617, PubId=615, CompiledWith=10.0.604.0)
RequestUrl: https://axialimplantesltda-dev.outsystemsenterprise.com/Biograma_Financeiro/ContasPagar.aspx (Method: GET)
AppDomain: /LM/W3SVC/1/ROOT/Biograma_Financeiro-134-131620041622462891
FilePath: d:\OutSystems\Platform Server\running\Biograma_Financeiro.01549622033\ContasPagar.aspx
ClientIp: 177.42.184.128
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 2840 ('w3wp', Started='1/24/2018 9:23:37 AM', Priv=791Mb, Virt=9697Mb)
TID: 17
Thread Name:
.NET: 4.0.30319.42000
Stack:
ORA-00904: "ENLANCAMENTO"."PAGDTLANCAMENTO": invalid identifier
   at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution(OracleConnectionImpl connectionImpl, Int32& cursorId, Boolean bThrowArrayBindRelatedErrors, OracleException& exceptionForArrayBindDML, Boolean& hasMoreRowsInDB, Boolean bFirstIterationDone)
   at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteReader(String commandText, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, OracleDataReaderImpl& rdrImpl, Int32 longFetchSize, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64[] scnForExecution, Int64[]& scnFromExecution, OracleParameterCollection& bindByPositionParamColl, Boolean& bBindParamPresent, Int64& internalInitialLOBFS, OracleException& exceptionForArrayBindDML, Boolean isDescribeOnly, Boolean isFromEF)
   at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
   at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at OutSystems.HubEdition.DatabaseProvider.Oracle.ExecutionService.ExecutionService.ExecuteReader(IDbCommand cmd)
   at #vmb.#Emb.ExecuteReader(String description, Boolean isApplication, Boolean transformParameters, Boolean skipLog)
   at OutSystems.Internal.Db.DatabaseAccessProvider`1.ExecuteQuery[T](Command cmd, GenericRecordList`1 rl, String description, Boolean transformParameters, Boolean skipLog)
   at ssBiograma_Financeiro.Flows.FlowMainFlow.ScrnContasPagar.FuncssPreparation.datasetGetLancamentos(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount)
   at ssBiograma_Financeiro.Flows.FlowMainFlow.ScrnContasPagar.Preparation(HeContext heContext)
   at ssBiograma_Financeiro.Flows.FlowMainFlow.ScrnContasPagar.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


We also tried to run DBCleaner to eliminate any possible bank database junk, however the following error is also occurring:



Message:


Error in advanced query GetESpaceInfo in Preparation in PruneOldESpaces in MainFlow in DBCleaner (SELECT       {Espace}.[Id],       {Espace}.[Name],       {Espace}.[Is_Active],       Count({Espace_Version}.[Id]),       sum( @Datalength({Espace_Version}.[OML_File]) / 1024 )  as total  FROM {Espace}  INNER JOIN {Espace_Version} ON ({Espace}.[Id] = {Espace_Version}.[eSpace_Id] and {Espace}.[Version_Id] <> {Espace_Version}.[Id])   LEFT JOIN {Solution_Version_Reference} ON ({Solution_Version_Reference}.[Espace_Version_Id] = {Espace_Version}.[Id])  LEFT JOIN {APP_VERSION_MODULE_VERSION} ON ({APP_VERSION_MODULE_VERSION}.[ESPACE_VERSION_ID] = {Espace_Version}.[Id])  WHERE       {Solution_Version_Reference}.[Id] IS NULL AND      {APP_VERSION_MODULE_VERSION}.[ID] IS NULL AND      {Espace_Version}.[Uploaded_Date] < @OlderThan  GROUP BY {Espace}.[Id], {Espace}.[Name], {Espace}.[Is_Active]  ORDER BY total DESC): ORA-00942: table or view does not exist


Environment InformationeSpaceVer: 1 (Id=639, PubId=638, CompiledWith=10.0.604.0)
RequestUrl: https://axialimplantesltda-dev.outsystemsenterprise.com/DBCleaner/Home.aspx (Method: GET)
AppDomain: /LM/W3SVC/1/ROOT/DBCleaner-157-131620482083547471
FilePath: d:\OutSystems\Platform Server\running\DBCleaner.01482113562\PruneOldESpaces.aspx
ClientIp: 187.115.158.250
Locale: en-US
DateFormat: yyyy-MM-dd
PID: 2840 ('w3wp', Started='1/24/2018 9:23:37 AM', Priv=1018Mb, Virt=9758Mb)
TID: 8
Thread Name:
.NET: 4.0.30319.42000
Stack:
Error in advanced query GetESpaceInfo in Preparation in PruneOldESpaces in MainFlow in DBCleaner (SELECT       {Espace}.[Id],       {Espace}.[Name],       {Espace}.[Is_Active],       Count({Espace_Version}.[Id]),       sum( @Datalength({Espace_Version}.[OML_File]) / 1024 )  as total  FROM {Espace}  INNER JOIN {Espace_Version} ON ({Espace}.[Id] = {Espace_Version}.[eSpace_Id] and {Espace}.[Version_Id] <> {Espace_Version}.[Id])   LEFT JOIN {Solution_Version_Reference} ON ({Solution_Version_Reference}.[Espace_Version_Id] = {Espace_Version}.[Id])  LEFT JOIN {APP_VERSION_MODULE_VERSION} ON ({APP_VERSION_MODULE_VERSION}.[ESPACE_VERSION_ID] = {Espace_Version}.[Id])  WHERE       {Solution_Version_Reference}.[Id] IS NULL AND      {APP_VERSION_MODULE_VERSION}.[ID] IS NULL AND      {Espace_Version}.[Uploaded_Date] < @OlderThan  GROUP BY {Espace}.[Id], {Espace}.[Name], {Espace}.[Is_Active]  ORDER BY total DESC): ORA-00942: table or view does not exist
   at ssDBCleaner.Flows.FlowMainFlow.ScrnPruneOldESpaces.FuncssPreparation.QueryGetESpaceInfo(HeContext heContext, Int32 maxRecords, IterationMultiplicity multiplicity, Int64& outParamCount, DateTime qpdaOlderThan, String qpstDatalength)
   at ssDBCleaner.Flows.FlowMainFlow.ScrnPruneOldESpaces.Preparation(HeContext heContext)
   at ssDBCleaner.Flows.FlowMainFlow.ScrnPruneOldESpaces.Page_Load(Object sender, EventArgs e)
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


I suggest to publish a solution with all you environment espace, to make sure that you don't have any eSpace outdate.


Please let me know the outcome.

Solution

Hi Daniel! Thanks for the reply.

This is not a reference problem (I also thought that was it at first). I've contacted the support and they confirmed that this is a bug. It seems the internal reference of some entitiy attributes are broken in metadata, so when platform builds the query some columns in the select statement are placed incorrectly. It seems that what caused this was a copy/paste of the attributes from the MySQL extension entity to one entity of the module. We did this to accelerate the development of a data migration.

They are still analysing, I'll post here any updates.

Best regards

Solution

Hi André Siébra

Can you check if there is outdated references on the application via Service Center? If yes, publish the outdated espaces or the full solution.