Hexagon Geospatial
MENU

GeoMedia Smart Client

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Regular Contributor
Posts: 170
Registered: ‎07-07-2016
Accepted Solution

ORA-00001: unique constraint violated GMSC2.PK_SESSION

Hi,

I have a form in GeoMedia Smart Client 2016, containing button that should save form data to database.

 

<FormAction name="Save_form" label="Zapisz" visible="form" type="form" action="save" />  

 

After pressing this button, application starts to save data, but it can takes even 10 second to complete.(probably it because the form is quite complicated). The problem is, when user click this button again (I mean click it before saving data to database is completed). Then the error apears in workflow log "ORA-00001: unique constraint violated (GMSC2.PK_SESSION)"

What is the simplest way to lock the button after click and unlock it after save is complete? Or maybe there's another better solution?

 

Below is full stacktrace:

 

29.03.2018 10:25:42 ERROR - Controller Form has raised an exception in Action save.
Oracle.DataAccess.Client.OracleException: ORA-00001: naruszono więzy unikatowe (GMSC2.PK_SESSION)
w Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
w Oracle.DataAccess.Client.OracleCommand.ExecuteNonQuery()
w Intergraph.Emea.Security.SessionPersistence.PersistNewOrUpdatedItems(DbCommand cmd, IEnumerable`1 newOrUpdatedSessionItems)
w Intergraph.Emea.Security.SessionPersistence.PersistSessionState(SessionState sessionState)
w Intergraph.Emea.SmartClient.Workflows.SmartClientWorkflowSessionProvider.Persist(SessionState sessionState)
w Intergraph.Emea.Workflows.WorkflowControllerBase.OnActionExecuted(ActionExecutedContext filterContext)
w System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
w System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
w System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
w System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)

 

Staff
Posts: 1,036
Registered: ‎10-18-2015

Re: ORA-00001: unique constraint violated GMSC2.PK_SESSION

Hi,

 

it looks quite strange to me a so long process to persist the data in the database. Please check if there is any problem with the database setup and/or issues in connectivity from the App Server to the DB.

To solve it on the client side I would use something like this (I did not test the code):

 

busyDialog = IG.Busy({
    message: 'Saving data'
});

IG.submit('Form','Save').done(function(result){
	busyDialog.close();
	IG.navigate('NODENAME');
});

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Regular Contributor
Posts: 170
Registered: ‎07-07-2016

Re: ORA-00001: unique constraint violated GMSC2.PK_SESSION

This solution works perfectly!

Thanks!

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.