M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
New Contributor
Posts: 4
Registered: ‎11-11-2015
Accepted Solution

M.App Enterprise GE_SPLITPOLYGON Error

Hi

 

When I try to split a polygon I get the following Error when clicking on the Save button:

 

 

Nov 14, 2017 1:55:46 PM SEVERE:	Error during save!				--> [AWT-EventQueue-2] com.intergraph.web.plugin.edit.EditPlugin.save
com.google.api.client.http.HttpResponseException: 500 Internal Server Error
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Error</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link href="/Workflows/Content/Css/workflow-themes/FlatTheme/content-theme.bundle" rel="stylesheet"/>
<link href="/Workflows/Content/Css/workflow-themes/FlatTheme/menu-theme.bundle" rel="stylesheet"/>

</head>
<body>
    <div id="ig-root" class="ig-root">
        <div id="ig-root-container" class="ig-root-container">
            <div id="ig-root-container-exception" class="ig-root-container-exception">
                <div id="ig-workflow-wrapper" class="ig-workflow-wrapper">
                    <div id="ig-history-container" class="ig-history-container">
                        
                    </div>
                </div>
                <div id="ig-exception-wrapper" class="ig-exception-wrapper">
                    <div id="ig-exception-content" class="ig-exception-content">
                        <h1>
                            An Error occured</h1>
                        
    <p>
        Unexpected exception occured. Please contact support.
    </p>

                    </div>
                </div>
            </div>
        </div>
<div class="ig-float-clearer" ></div>
<div class="ig-form-footer-wrapper" ></div>
    </div>
</body>
</html>

	at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1070)
	at com.intergraph.web.plugin.edit.persistence.AbstractPersitenceProvider.persistChanges(AbstractPersitenceProvider.java:110)
	at com.intergraph.web.plugin.edit.persistence.WorkflowPersitenceProvider.persistChanges(WorkflowPersitenceProvider.java:63)
	at com.intergraph.web.plugin.edit.EditPlugin.save(EditPlugin.java:326)
	at com.intergraph.web.plugin.edit.EditActions.GE_SAVE(EditActions.java:231)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.intergraph.tools.utils.disptach.MiniDispatcher.dispatch2Method(MiniDispatcher.java:93)
	at com.intergraph.tools.utils.disptach.MiniDispatcher.dispatch(MiniDispatcher.java:79)
	at com.intergraph.tools.utils.disptach.RPAction.dispatch(RPAction.java:577)
	at com.intergraph.tools.utils.disptach.RPAction.actionPerformed(RPAction.java:514)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

 

And in the Studio Logs:

 

 

System.ArgumentException: An item with the same key has already been added.
   [Details]
   Href: http://mappserver:80/Workflows/Form/SaveGeometries/?workflow=AAGIFEdit&lang=en-US&sessionid=a85dba84-2bd6-40ab-86b8-38e4e1a3b04e&tenant=Stats_Demo&nodeid=ea_edit&id=5234&srid=3857&layer=DEMO_EA&debugMode=true
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at MApp.Workflows.FormController.<SaveGeometries>d__66.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(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.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.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.OnAsyncHandlerCompletion(IAsyncResult ar)

 

Here is my basic workflow:

 

 

<Form name="demo_ea_edit" editable="true" idfield="OBJECTID" table="DEMO_EA">
    <FormTab name="NewTabPage1" editable="true" visible="true">
      <FormGroup name="NewGroup1" label="MRN Details" editable="true" visible="true">
        <FormField name="OBJECTID" editable="true" visible="true" datatype="number"  persisted="true" type="textfield" />
        <FormAction name="Split" action="SCRIPT[SC.digitize('DEMO_EA', {commands: ['GE_SPLITPOLYGON'], startOnLoad: 'GE_SPLITPOLYGON'}, [{FORM.OBJECTID}])]" />
        <FormAction name="Edit" action="SCRIPT[SC.digitize('DEMO_EA', {commands: ['GE_MODIFY'], startOnLoad: 'GE_MODIFY'}, {FORM.OBJECTID})]" />
        <FormAction name="Merge" action="SCRIPT[SC.digitize('DEMO_EA', {commands: ['GE_MERGE'], startOnLoad: 'GE_MERGE'}, [{FORM.OBJECTID}])]" /> 
      </FormGroup>
    </FormTab>
  </Form>
  <Form name="demo_ea_list" editable="true" idfield="OBJECTID" table="DEMO_EA" pagesize="20" isfilterareaopen="false">
    <FormTab name="NewTabPage1" editable="true" visible="true">
      <FormGroup name="NewGroup1" editable="true" visible="true">
        <FormField name="OBJECTID" editable="true" visible="list" datatype="number" required="true" persisted="true" saveinsession="false" type="textfield" />
        <FormField name="MP_NAME" label="EA NO" editable="true" visible="list,filter" datatype="string" required="true" persisted="true" saveinsession="false" type="textfield" filter="ISLIKE" />
        <FormField name="MN_NAME" editable="true" visible="list,filter" datatype="string" required="true" persisted="true" saveinsession="false" type="textfield" filter="ISLIKE" />
      </FormGroup>
    </FormTab>
  </Form>




<!-- The Workflow Settings: -->
<WorkflowNode id="EAList" label="EA List" controller="List" form="demo_ea_list">
  <WorkflowNode id="ea_edit" controller="Form" form="demo_ea_edit" emptyform="false" />
</WorkflowNode>

 

I am using SQL Server 2016, the primary key is an int and set to auto-increment.

 

Before this issue I got the same error ("An item with the same key has already been added") on modifing a polygon, but fixed it with using case sensitive columns names in the workflow. Now I am able to modify and add new polygons(not in the workflow above) but something goes wrong with split, am I missing something?

 

Regards

Ruan

 

 

Highlighted
Staff
Posts: 1,065
Registered: ‎10-18-2015

Re: M.App Enterprise GE_SPLITPOLYGON Error

Hi,

 

what do you want to do with the split polygons? To store 2 different rows with same attributes or to store a multigeometry?

 

thanks,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Highlighted
New Contributor
Posts: 4
Registered: ‎11-11-2015

Re: M.App Enterprise GE_SPLITPOLYGON Error

Hi Stefano, The purpose is to have a record with an updated geometry and another new record with the new 2nd part of the split.

Highlighted
New Contributor
Posts: 4
Registered: ‎11-11-2015

Re: M.App Enterprise GE_SPLITPOLYGON Error

This issue is fixed in M.App Enterprise 16.1 service pack 1