Hexagon Geospatial
MENU

Support 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
Contributor
Posts: 41
Registered: ‎11-12-2015

GMSC 2018 & Postgresql - error during SaveMapState

Hi all,

 

I tried to migrate GMSC from oracle to postgresql. I am able to display features in map and run predefned queries (in Search window). But when I try to run workflow I always got: "Workflow returned an error. Please check log file." There is only one feature in project and there is only one workflownode and empty form in workflow. The project has custom crs EPSG5514.

 

Error from log file:

10.04.2018 08:18:34 ERROR - Controller MapState has raised an exception in Action SaveMapState.
Npgsql.PostgresException: 42883: operator does not exist: integer = text
   [Data]
   Severity: ERROR
   SqlState: 42883
   Code: 42883
   MessageText: operator does not exist: integer = text
   Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
   Position: 593
   File: parse_oper.c
   Line: 726
   Routine: op_error
   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.ExecuteDbDataReaderInternal(CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
   at Intergraph.Emea.Data.PostgreSqlProvider.CreateDataTable(String sqlCommand, DbConnection connection, IEnumerable`1 parameters, DbTransaction transaction, String[] spatialColumns)
   at Intergraph.Emea.SmartClient.Data.DefaultMetadataContext.GetFeatureMetadata(String[] featureIdentifiers, FeatureTypes featureType, IUserRoleProvider roleProvider)
   at Intergraph.Emea.SmartClient.Data.DefaultMetadataContext.GetFeatureMetadata(String featureIdentifier, IUserRoleProvider roleProvider)
   at Intergraph.Emea.SmartClient.Workflows.MapStateController.PersistMapState(MapState mapState)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ActionMethodDispatcher.<>c__DisplayClass1.<WrapVoidAction>b__0(ControllerBase controller, Object[] parameters)
   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.EndInvokeActionMethod(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.EndInvokeActionMethodWithFilters(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)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 

What can I change to make it work? I already tried feature with numeric or text id, with same result.

 

Tereza

Technical Evangelist
Posts: 492
Registered: ‎09-11-2015

Re: GMSC 2018 & Postgresql - error during SaveMapState

Hi Tereza,

 

maybe it is not relevant, but do you have the uuid-ossp extension installed in the postgresql database?

 

Pavel

Contributor
Posts: 41
Registered: ‎11-12-2015

Re: GMSC 2018 & Postgresql - error during SaveMapState

Hi Pavel,

 

yes, uuid-ossp is installed. 

 

Tereza

Staff
Posts: 724
Registered: ‎10-18-2015

Re: GMSC 2018 & Postgresql - error during SaveMapState

Hi Tereza,

 

what type of field do you have as primary key? Please check also if id field is set in feature settings.

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Contributor
Posts: 41
Registered: ‎11-12-2015

Re: GMSC 2018 & Postgresql - error during SaveMapState

Hi Stefano, 

 

I tried the primary key field of type text and also number, but none of these worked for me. And yes, primary key is set in feature settings.

 

Tereza

Staff
Posts: 724
Registered: ‎10-18-2015

Re: GMSC 2018 & Postgresql - error during SaveMapState

Hi Tereza,

 

can you please post your form and table definitions?

 

Thanks,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Contributor
Posts: 41
Registered: ‎11-12-2015

Re: GMSC 2018 & Postgresql - error during SaveMapState

Hi Stefano,

 

ok, I need to be more specific. I did few more tests and the workflow is working when there is not the condition, that some element in feature need to be selected. But when the selected element is required, workflow fails.

 

Action settings and Feature setting are in attached files.

 

Here is WorkflowSettings:

<?xml version="1.0" encoding="UTF-8" ?>
<WorkflowRoot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  theme="FlatTheme">

 	<WorkflowNode id="attrProxy" label="Informace o prvku ()" form="FmAttrProxy" follownode="FmAttrProxy" emptyform="true" controller="Form" >	
	</WorkflowNode>

</WorkflowRoot>

 

And FormSettings:

<?xml version="1.0" encoding="UTF-8"?>
<FormList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<Form name="FmAttrProxy" label="Informace o dokumentaci" >
<FormTab name="tabInformaceODokumentaci" label="Dokumentace">
<FormGroup name="Fgp1">
<FormField name="LAYER" label="Vrstva:" type="label" persisted="false" defaultvalue="test" visible="form" />
</FormGroup>
</FormTab>
</Form>

</FormList>

 

Thanks,

Tereza

 

Staff
Posts: 724
Registered: ‎10-18-2015

Re: GMSC 2018 & Postgresql - error during SaveMapState

Hi Tereza,

 

I'm not sure what you want to achieve. You want to open this node from the feature context? But this node has emptyform="true", do you use want to use values from the selected feature to be used on another one?

Also in the form settings I don't see the table and idfield specified and a textfield representing the idfield.

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Contributor
Posts: 41
Registered: ‎11-12-2015

Re: GMSC 2018 & Postgresql - error during SaveMapState

Hi Stefano,

 

this is just a test workflow. I did try full workflow with FormFields with feature attributes, definition of table and idfield and with emptyform="false". But that configuration did not work, so I try to create a minimal workflow to test where is the problem.

 

I changed the configuration as follows, but the result is still the same:

WorkflowSettings:

 

FormSettings:

<Form name="FmAttrProxy" table="gmsc.test" idfield="ID" label="Informace o dokumentaci"   >
	<FormTab name="tabInformaceODokumentaci" label="Dokumentace">
		<FormGroup name="Fgp1">
			<FormField name="ID" label="Vrstva:" type="label" defaultvalue="test"  visible="form"   />
		</FormGroup>
	</FormTab>
</Form>

WorkflowSettings:

<WorkflowNode id="attrProxy" label="Informace o prvku ()" form="FmAttrProxy" follownode="FmAttrProxy" controller="Form" >
</WorkflowNode>

 

Tereza

Staff
Posts: 724
Registered: ‎10-18-2015

Re: GMSC 2018 & Postgresql - error during SaveMapState

Hi Tereza,

 

so is ID a string in the database? can you please set datatype in the form? There seems to be a conversion issue in your workflow, we have to understand if it is on the client or on the server side.

 

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.