Oracle error after update to 4.2

Posts   
 
    
methodman
User
Posts: 194
Joined: 24-Aug-2009
# Posted on: 29-Dec-2014 22:43:03   

Hi,

After the update from 3.5 to 4.2 the part where it gets the primary key from the sequencer stopped to working. I havent changed any code just referenced the new dlls and recreated the project.

Selects and inserts without a sequencer works flawless.

It throws this error:

SD.LLBLGen.Pro.DQE.OracleODPNet.dll version 4.2.14.1212


"ORA-06550: line 1, column 94:\nPL/SQL: ORA-06552: PL/SQL: Compilation unit analysis terminated\nORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed\nORA-06550: line 1, column 73:\nPL/SQL: SQL Statement ignored"

generated sql


    Query: BEGIN  SELECT "SMTAPP"."XF_REQUEST_LOG_SEQ".NEXTVAL INTO :p2 FROM DUAL; INSERT INTO "SMTAPP"."XF_REQUEST_LOG" ("DATE", "ID", "METHOD", "TIME", "URL", "USER_NAME") VALUES (:p1, :p2, :p3, :p4, :p5, :p6) ; END;
    Parameter: :p1 : Date. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: 29. 12. 2014 10:11:55.
    Parameter: :p2 : Int32. Length: 0. Precision: 0. Scale: 0. Direction: InputOutput. Value: <undefined value>.
    Parameter: :p3 : String. Length: 10. Precision: 0. Scale: 0. Direction: Input. Value: "GET".
    Parameter: :p4 : Int32. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: 133.
    Parameter: :p5 : String. Length: 350. Precision: 0. Scale: 0. Direction: Input. Value: "/workspace/es/api/systeminfo?id=ES&_dc=1419844314708".
    Parameter: :p6 : String. Length: 25. Precision: 0. Scale: 0. Direction: Input. Value: "".

stacktrace


v SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute()
   v SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.ExecuteActionQuery(IActionQuery queryToExecute)
   v SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.PersistQueue(List`1 queueToPersist, Boolean insertActions)
   v SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.SaveEntity(IEntity2 entityToSave, Boolean refetchAfterSave, IPredicateExpression updateRestriction, Boolean recurse)
   v SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.<>n__FabricatedMethod101(IEntity2 , Boolean , IPredicateExpression , Boolean )
   v SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.<>c__DisplayClassff.<SaveEntity>b__fe()
   v SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteWithActiveRecoveryStrategy[T](Func`1 toExecute)
   v SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2 entityToSave, Boolean refetchAfterSave, IPredicateExpression updateRestriction, Boolean recurse)
   v SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.SaveEntity(IEntity2 entityToSave)
   v Icp.Handlers.System.RequestLoggerHandler.Handle(RequestLogCreateCommand command) v d:\temp\!\ioris\src\Icp.Handlers\System\RequestLoggerHandler.cs:řádek 26
   v Icp.Framework.Bus.SimpleBus.Send[T](T command) v d:\temp\!\ioris\src\Icp.Framework\Bus\SimpleBus.cs:řádek 24
   v Icp.UI.WebSP.Infrastructure.RequestLoggerActionFilter.OnActionExecuted(HttpActionExecutedContext actionExecutedContext) v d:\temp\!\ioris\src\Icp.UI.WebSP\Infrastructure\RequestLoggerActionFilter.cs:řádek 34
   v System.Web.Http.Filters.ActionFilterAttribute.OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, CancellationToken cancellationToken)

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 30-Dec-2014 07:44:34   
  • What says SQLPlus if you execute this query directly on the console?
  • What Oracle DB version are you using? And are you using Oracle compatibility setting in your config file?
  • When you say that you migrated from v3.5 to v4.2 I assume that you migrated the LLBLGen -project, then regenerated the code and updated the LLBLGen assembly references, right?
David Elizondo | LLBLGen Support Team
methodman
User
Posts: 194
Joined: 24-Aug-2009
# Posted on: 07-Jan-2015 14:19:50   
  • What says SQLPlus if you execute this query directly on the console?

The generated code confuses me. It uses a select into statement but there isn't any variable to assign the value to. But when I've added a variable definition to it, then I've got the same error as the LLBLGen runtime.


DECLARE
    newId number;
BEGIN 

SELECT "SMTAPP"."XF_REQUEST_LOG_SEQ".NEXTVAL INTO newId FROM DUAL; 
INSERT INTO "SMTAPP"."XF_REQUEST_LOG" ("DATE", "ID", "METHOD", "TIME", "URL", "USER_NAME") VALUES (:p1, newId, :p3, :p4, :p5, :p6) ; 

END;

What Oracle DB version are you using? And are you using Oracle compatibility setting in your config file?

Oracle Database 10g Release 10.2.0.4.0 - 64bit Production

I wasn't using any compatibility setting. I've added this one after your post


<add key="OracleDQECompatibilityLevel" value="0" />

to the appSettings in Web.config, but it didn't helped.

When you say that you migrated from v3.5 to v4.2 I assume that you migrated the LLBLGen -project, then regenerated the code and updated the LLBLGen assembly references, right?

I've referenced the new dlls and opened the project file in the new designer and regenerated the code.

methodman
User
Posts: 194
Joined: 24-Aug-2009
# Posted on: 07-Jan-2015 16:03:38   

I found what was causing the error. The table had a column named DATE. It's a reserved word in PLSQL. The solution is to rename the column. simple_smile