Hexagon Geospatial
MENU

WebGIS

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Contributor
Posts: 36
Registered: ‎09-18-2018

WMS - New layer fail- Object reference not set to an instance of an object.

[ Edited ]

Hi,

 

After I publish this new layer with 28000 features it show the following service exception:

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3.0">
   <ServiceException code="">
      <![CDATA[
An unexpected error occurred. Original message: 'Object reference not set to an instance of an object.'
      ]]>
    </ServiceException>
</ServiceExceptionReport>

 

I wonder if this is related with the number of features that my layer has. All the other layers works ok.

 

Note : In fact I can see the layer on my wms service GetCapabilities.

 

What am I missing here?

 

Thank you

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

Re: WMS - New layer fail- Object reference not set to an instance of an object.

The features count shall not be of problem here. Please review the WMS rol-log.txt as well as WebMap log (GWMLog).

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Contributor
Posts: 36
Registered: ‎09-18-2018

Re: WMS - New layer fail- Object reference not set to an instance of an object.

Thank you Jan,

 

Unfortunately, both have no logs on those locations (rol-log.txt and GWMLog). I also confirm the logging settings on Adminconsole and they are correct.

 

 

When I published the geoworkspace on Geomedia WebMap, no error occurs.

 

Although I notice that when I run my instance a redirect problem occur which takes me to believe that this might be an internal issue.

Staff
Posts: 293
Registered: ‎02-04-2016

Re: WMS - New layer fail- Object reference not set to an instance of an object.

Please make sure the .NET temp files (the wms folder) are cleared, IIS and WebMap service are restarted...Just to make sure you get a fresh start..

 

Did you have an existing WMS data source and add the new layer later ?  Did you do a Sync-Legend (under Map Content) or simply a "Publish gws to metadata" ?

 

Thanks

 

Frank

 

Regular Contributor
Posts: 315
Registered: ‎10-12-2015

Re: WMS - New layer fail- Object reference not set to an instance of an object.

I logged into Eduardo's test server and found a couple of things.

 

i. There were two web sites with https binding.

One site had a https binding for the servers public name (hostname) and port 443 populated. WebMap / WMS was configured on that site. Binding looked good.

One site had a https binding without hostname populated and also using port 443. 

After I removed the binding for the second site a test WMS service using demo datasets running over https started working (was failing prior).

I'm guessing some traffice went to site 1 and some to site 2 as site 2 binding was essentially a wild card match.

 

ii. After modifing the binding, I then tried running up the WMS service on the server itself using GeoMedia as the client.

It failed. Sometimes I would see the following:

CertificateRevocation.png

Sometimes I wouldn't see that, but instead in the GDOWMS.log I would see three requests for capabilities document 

and then nothing else. i.e. as if request for each capabilities document was failing. First request would not specify version, second request would try version=1.1.1 and final request version=1.1.0. I believe it does that when first capabilities requests are failing.

I then updated IE settings and disabled revocation checking.

IE-RevocationChecks.png

After that GeoMedia would load the WMS service fine.

 

However if I tried loading capabilities document using version=1.1.1 or version=1.1.0 in the browser it would continue to fail - basically timed out.

In the rol-log.txt would continue to get timeout errors.

2019-01-31 13:00:00,895 [7] WARN Intergraph.GeoMedia.Web.SDI.Common.SDIProFacadeInterface.SDIProErrorHandler [(null)] - Unhandled exception has been thrown.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenAndPush(Uri uri)
at System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset(String publicId, String systemId, Uri baseUri, String entityName)
at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)
at System.Xml.DtdParser.ParseExternalSubset()
at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)
at System.Xml.DtdParser.System.Xml.IDtdParser.ParseFreeFloatingDtd(String baseUri, String docTypeName, String publicId, String systemId, String internalSubset, IDtdParserAdapter adapter)
at System.Xml.XmlLoader.ParseDocumentType(XmlDocumentType dtNode, Boolean bUseResolver, XmlResolver resolver)
at System.Xml.XmlDocument.CreateDocumentType(String name, String publicId, String systemId, String internalSubset)
at System.Xml.XmlDocument.ImportNodeInternal(XmlNode node, Boolean deep)
at System.Xml.XmlDocument.ImportChildren(XmlNode fromNode, XmlNode toNode, Boolean deep)
at System.Xml.XmlDocument.CloneNode(Boolean deep)
at Intergraph.GeoMedia.Web.SDI.WMS.Pipes.WMSBasicOriginatingPipe.WMSBasicOriginatingPipe.GetCapabilities111Handler(GetCapabilitiesParametersBase sdiMethodParameters, AdditionalParametersCollection additionalParameters, IUserContext userContext)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Intergraph.GeoMedia.Web.SDI.Common.BasePipe.MethodDispatcher.SDIMethodDispatcher.Dispatch(Object actPipe, MethodParameterInfo methodInfo, SDIMethodParameters parametersClass, AdditionalParametersCollection additionalParameters, IUserContext userContext)
at Intergraph.GeoMedia.Web.SDI.Common.Pipes.MetadataConfigurationPipe.MetadataConfigurationPipe.GetCapabilitiesHandler(SDIMethodParameters getCapabilitiesParameters, AdditionalParametersCollection additionalParameters, IUserContext userContext)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Intergraph.GeoMedia.Web.SDI.Common.BasePipe.MethodDispatcher.SDIMethodDispatcher.Dispatch(Object actPipe, MethodParameterInfo methodInfo, SDIMethodParameters parametersClass, AdditionalParametersCollection additionalParameters, IUserContext userContext)
at Intergraph.GeoMedia.Web.SDI.Common.SDIProFacadeInterface.SDIProOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

I am speculating that is becuase with version 1.1.1 and 1.1.0 there must be an internal service call over ssl which fails due to the certificate revocation (guess). And as the IE settings on apply to my account, the internal built in accounts the service is running over still fail.

I also deleted the .net temporary folders.

 

Another possibility for the revocation message is mixed https / http content. Server is configured for https so I don't see how that would occur unless I missed a config somewhere.

So my best guess at the moment is that the ssl certificate on the IIS server does not have revocation setup correct.

Any other ideas?

 

And yes - if I disabled https and used http only then the WMS would work find for version 1.3.0, 1.1.1 and 1.1.0.

Regular Contributor
Posts: 315
Registered: ‎10-12-2015

Re: WMS - New layer fail- Object reference not set to an instance of an object.

And perhaps a quick note on enabling the different logs.

 

i. WMS or WFS service log file by default is only configured to show ERROR activity.

To show other activity such as WARNING or INFO need to update the configuration.

Open C:\Program Files\Common Files\Hexagon\Services\Instances\YourWMSorWFSName\Web.config

Locate section <log4net>

Change the 2 x <level value="ERROR" /> to <level value="ALL" /> (or WARNING or INFO)

WMS-WFS-logEnable.png

Will then see warnings such as the one shown in my previous posting.

 

ii. WebMap

AdminConsole> System Settings, Logging tab. Can change to Normal or Detailed. Detailed will show more information.

webmap-detailed-logging.png

 

iii. GeoMedia GDOWMS.log

In folder %Temp% create text file called GDOWMS.log

Launch GeoMedia desktop. Connect to the WMS and add layers etc.

The GDOWMS.log will list the requests made. The requests can be tried in a browser.

From that I could identify that GeoMedia was only making capabilities requests.

 

Off course disable all the logs or put back to default settings in production when not performing diagnosis.

Highlighted
Staff
Posts: 293
Registered: ‎02-04-2016

Re: WMS - New layer fail- Object reference not set to an instance of an object.

Hi Shaun

 

While I can't comment on the GM behavior (i.e. probably need a GM support ticket), what if you enable revocation checking (i.e. GM fails), does the WMS works in browser/Portal ?

 

Btw, what OS is the webmap server, what versions are the GM and WebMap/Portal ?

 

Thanks

 

Frank

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