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
New Contributor
Posts: 4
Registered: ‎01-10-2017
Accepted Solution

Problem in execution sql trigger (NpgsqlException)

Dear all,

 

GMSC v16.5.240.3
Postgres v10

PostGIS v2.4.4.

i have problem with trigger  execution

<WorkflowTrigger name="Select1_Trigger" type="SqlTrigger" method="action" >
  <Param name="Sql" value="Select get_geometry ( {FORM.PROCESS_ID},{FORM.PLUDU_LIMENI} )"/>
</WorkflowTrigger>v

SmartClient show "Unexpected Error"

in  workflow log

23.08.2018 12:19:14 ERROR - Controller Trigger has raised an exception in Action FireData.
Npgsql.NpgsqlException: Exception while reading from stream
   at Npgsql.ReadBuffer.Ensure(Int32 count, Boolean dontBreakOnTimeouts)
   at Npgsql.NpgsqlConnector.DoReadMessage(DataRowLoadingMode dataRowLoadingMode, Boolean isPrependedMessage)
   at Npgsql.NpgsqlConnector.ReadMessageWithPrepended(DataRowLoadingMode dataRowLoadingMode)
   at Npgsql.NpgsqlConnector.ReadExpecting[T]()
   at Npgsql.NpgsqlDataReader.NextResultInternal()
   at Npgsql.NpgsqlDataReader.NextResult()
   at Npgsql.NpgsqlCommand.Execute(CommandBehavior behavior)
   at Npgsql.NpgsqlCommand.ExecuteNonQueryInternal()
   at Intergraph.Emea.Data.Database.ExecuteNonQuery(String sql, IEnumerable`1 parameters, DbConnection connection, DbTransaction transaction)
   at Intergraph.Emea.Data.Database.ExecuteNonQuery(String sqlCommand, IEnumerable`1 parameters)
   at Intergraph.Emea.Workflows.SqlTrigger.Execute()
   at Intergraph.Emea.Workflows.TriggerController.ExecuteTriggers(TriggerExecution triggerExecution, IEnumerable`1 workflowTriggerDescriptions, IWorkflowControllerContext workflowControllerContext, WorkflowData workflowData)
   at Intergraph.Emea.Workflows.TriggerController.ExecuteTrigger(IEnumerable`1 triggerNames, WorkflowNodeDescription nodeDescription, IWorkflowControllerContext workflowControllerContext, WorkflowData workflowData)
   at Intergraph.Emea.Workflows.TriggerController.FireData(List`1 triggerNames, DomainObject domainObject)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
   --- Inner exception ---
System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
   at Npgsql.ReadBuffer.Ensure(Int32 count, Boolean dontBreakOnTimeouts)
   --- Inner exception ---
System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
   at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)

in postgres log

2018-08-23 12:15:00.682 EEST [3436] ERROR:  query string argument of EXECUTE is null
2018-08-23 12:15:00.682 EEST [3436] CONTEXT:  PL/pgSQL function write_objects(numeric) line 68 at EXECUTE
	SQL statement "SELECT write_objects(process_id)"
	PL/pgSQL function get_geometry(numeric,text) line 87 at PERFORM
2018-08-23 12:15:00.682 EEST [3436] STATEMENT:  Select get_geometry ( $1,$2 )
2018-08-23 12:15:00.683 EEST [3436] LOG:  could not send data to client: An established connection was aborted by the software in your host machine.

	
2018-08-23 12:15:00.683 EEST [3436] STATEMENT:  Select get_geometry ( $1,$2 )
2018-08-23 12:15:00.683 EEST [3436] FATAL:  connection to client lost
2018-08-23 12:15:52.834 EEST [2904] ERROR:  prepared statement "teststmt" does not exist
2018-08-23 12:15:52.834 EEST [2904] STATEMENT:  deallocate teststmt
2018-08-23 12:15:59.838 EEST [2516] ERROR:  prepared statement "teststmt" does not exist
2018-08-23 12:15:59.838 EEST [2516] STATEMENT:  deallocate teststmt
2018-08-23 12:18:07.884 EEST [2228] LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.

	


but in db I see,that function was executed. Calling this function from db no one error.  And error in GMSC is depending from execution time: if it less than 1minute no error .
Please,give me any advice how to solve this problem

 

 

 

 

 

 

 

 

 

Contributor
Posts: 33
Registered: ‎11-19-2015

Re: Problem in execution sql trigger (NpgsqlException)

Problem solved after adding two hints  into Workflow connection Connect string :

 

CommandTimeout=0;Keepalive=59

 

 

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