- Home
- LLBLGen Pro
- LLBLGen Pro Runtime Framework
Oracle Sequence Error
Joined: 31-Oct-2011
Hi,
I am using LLBNGen Pro 3.1, Sql 2008 & Oracle 11i
I have mapped sql and oracle to llblgen entity. I have identity for sql and sequence for oracle. I also have trigger on table to insert sequence value.
When i am trying to insert values in database i am getting following exception.
{"ORA-00942: table or view does not exist"}
SELECT "GRB_FRAMEWORK_RBS4"."SEQ_INSERT_DOMAIN_ID".NEXTVAL FROM DUAL
{"An exception was caught during the execution of a sequence retrieval query: ORA-00942: table or view does not exist. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception."}
Query: INSERT INTO "GRB_FRAMEWORK_RBS4"."DOMAIN" ("ID", "LICENSE", "NAME", "SECURITY_KEY") VALUES (:p1, :p2, :p3, :p4)
Parameter: :p1 : Int32. Length: 0. Precision: 0. Scale: 0. Direction: Input. Value: <undefined value>.
Parameter: :p2 : Object. Length: 2147483647. Precision: 0. Scale: 0. Direction: Input. Value: binary lob.
Parameter: :p3 : String. Length: 64. Precision: 0. Scale: 0. Direction: Input. Value: "1092".
Parameter: :p4 : String. Length: 64. Precision: 0. Scale: 0. Direction: Input. Value: "FrameworkMembershipProvider1".
- Are you setting your ConnectionString properly?
- Double check that table and schema exists on the server you are connection to.
- Double check that sequence and schema exists on the server you are connection to.
- If you are specifying sequence values through triggers you should specify that in your .config. See Oracle trigger based sequence values:
<add key="OracleTriggerSequences" value="true" />
If nothing above helps, please provide the full exception stack trace and every piece of relevant information.
Joined: 31-Oct-2011
This helped me with some of the sequence, but i am still getting these error. Do you have any idea?
An exception was caught during the execution of an action query: An exception was caught during the execution of a sequence retrieval query: ORA-08002: sequence SEQ_INSERT_ROLE_ID.CURRVAL is not yet defined in this session. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.. Check InnerException, QueryExecuted and Parameters of this exception to examine the cause of this exception.
ORM Profiler Exception:
Exception type: Oracle.DataAccess.Client.OracleException Message: ORA-08002: sequence SEQ_INSERT_ROLE_ID.CURRVAL is not yet defined in this session
Stack-trace: at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck) at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) at Oracle.DataAccess.Client.OracleCommand.ExecuteReader() at Oracle.DataAccess.Client.OracleCommand.ExecuteScalar() at SD.Tools.OrmProfiler.Interceptor.ProfilerDbCommand.ExecuteScalar() at SD.LLBLGen.Pro.ORMSupportClasses.SequenceRetrievalQuery.Execute() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\Query\SequenceRetrievalQuery.cs:line 178 at SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\Query\ActionQuery.cs:line 236 at SD.LLBLGen.Pro.ORMSupportClasses.BatchActionQuery.Execute() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\Query\BatchActionQuery.cs:line 112 at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteActionQuery(IActionQuery) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 541 at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.PersistQueue(List`1, Boolean, Int32&) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 1388 at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2, Boolean, IPredicateExpression, Boolean) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 1295 at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2, Boolean, Boolean) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 1170 at Grb.PlugIn.Assist.Business.Lower.DataAccess.SetLicenseEntity(MainBase, String, String, Int32, Int32, Object) in c:\Work\RBS\AssistWeb\PlugIn\Assist\Business.Lower\DataAccess.vb:line 179 at Grb.PlugIn.Assist.Business.DomainManager.SetLicense(String, String) in c:\Work\RBS\AssistWeb\PlugIn\Assist\Business\DomainManager.vb:line 39 at SystemAdmin.SystemAdmin.LoadLicenseButton_Click(Object, EventArgs) in c:\Work\RBS\AssistWeb\Utilities\SystemAdmin\SystemAdmin.vb:line 370 at System.EventHandler.Invoke(Object, EventArgs) at System.Windows.Forms.Control.OnClick(EventArgs) at System.Windows.Forms.Button.OnClick(EventArgs) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs) at System.Windows.Forms.Control.WmMouseUp(Message&, MouseButtons, Int32) at System.Windows.Forms.Control.WndProc(Message&) at System.Windows.Forms.ButtonBase.WndProc(Message&) at System.Windows.Forms.Button.WndProc(Message&) at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(Message&) at System.Windows.Forms.Control+ControlNativeWindow.WndProc(Message&) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&) at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32) at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, ApplicationContext) at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, ApplicationContext) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]) at SystemAdmin.My.MyApplication.Main(String[]) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(RuntimeAssembly, String[]) at System.AppDomain.ExecuteAssembly(String, Evidence, String[]) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object) at System.Threading.ExecutionContext.Run(ExecutionContext, ContextCallback, Object, Boolean) at System.Threading.ExecutionContext.Run(ExecutionContext, ContextCallback, Object) at System.Threading.ThreadHelper.ThreadStart()
Exception type: Oracle.DataAccess.Client.OracleException Message: ORA-08002: sequence SEQ_INSERT_ROLE_ID.CURRVAL is not yet defined in this session
Stack-trace: at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck) at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior) at Oracle.DataAccess.Client.OracleCommand.ExecuteReader() at Oracle.DataAccess.Client.OracleCommand.ExecuteScalar() at SD.Tools.OrmProfiler.Interceptor.ProfilerDbCommand.ExecuteScalar() at SD.LLBLGen.Pro.ORMSupportClasses.SequenceRetrievalQuery.Execute() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\Query\SequenceRetrievalQuery.cs:line 178 at SD.LLBLGen.Pro.ORMSupportClasses.ActionQuery.Execute() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\Query\ActionQuery.cs:line 236 at SD.LLBLGen.Pro.ORMSupportClasses.BatchActionQuery.Execute() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\Query\BatchActionQuery.cs:line 112 at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteActionQuery(IActionQuery) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 541 at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.PersistQueue(List`1, Boolean, Int32&) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 1388 at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2, Boolean, IPredicateExpression, Boolean) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 1295 at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.SaveEntity(IEntity2, Boolean, Boolean) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:line 1170 at Grb.PlugIn.Assist.Business.Lower.DataAccess.SetLicenseEntity(MainBase, String, String, Int32, Int32, Object) in c:\Work\RBS\AssistWeb\PlugIn\Assist\Business.Lower\DataAccess.vb:line 179 at Grb.PlugIn.Assist.Business.DomainManager.SetLicense(String, String) in c:\Work\RBS\AssistWeb\PlugIn\Assist\Business\DomainManager.vb:line 39 at SystemAdmin.SystemAdmin.LoadLicenseButton_Click(Object, EventArgs) in c:\Work\RBS\AssistWeb\Utilities\SystemAdmin\SystemAdmin.vb:line 370 at System.EventHandler.Invoke(Object, EventArgs) at System.Windows.Forms.Control.OnClick(EventArgs) at System.Windows.Forms.Button.OnClick(EventArgs) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs) at System.Windows.Forms.Control.WmMouseUp(Message&, MouseButtons, Int32) at System.Windows.Forms.Control.WndProc(Message&) at System.Windows.Forms.ButtonBase.WndProc(Message&) at System.Windows.Forms.Button.WndProc(Message&) at System.Windows.Forms.Control+ControlNativeWindow.OnMessage(Message&) at System.Windows.Forms.Control+ControlNativeWindow.WndProc(Message&) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&) at System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32) at System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner(Int32, ApplicationContext) at System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, ApplicationContext) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]) at SystemAdmin.My.MyApplication.Main(String[]) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(RuntimeAssembly, String[]) at System.AppDomain.ExecuteAssembly(String, Evidence, String[]) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object) at System.Threading.ExecutionContext.Run(ExecutionContext, ContextCallback, Object, Boolean) at System.Threading.ExecutionContext.Run(ExecutionContext, ContextCallback, Object) at System.Threading.ThreadHelper.ThreadStart()
The error is about the sequence too. It seems it's trying to obtain the sequence value but it never called the seq.NEXTVAL.
- Did you set the sequence in the "SequenceToUse" column in your Oracle mappings in LLBLGen Designer?
- If you are calculating this on a trigger, Did you specify that you are using triggers in the config file? If so, Is your trigger setting all in the right way?