We have a very simple console application to create shape file indexes. The application runs on a Linux system using mono.
I have upgraded this to ThinkGeo version 10. It is getting an error that appears to be related to the license file.
Here is the code for the app:
Imports ThinkGeo.MapSuite
Imports ThinkGeo.MapSuite.Layers
Module MapShapeIndex
Sub Main(ByVal cmdArgs() As String)
Dim sFileName As String
sFileName = cmdArgs(0)
ShapeFileFeatureLayer.BuildIndexFile(sFileName, BuildIndexMode.Rebuild,)
End Sub
End Module
Here is the error that appears:
mono MapShapeIndex.exe stop.shp
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
at ThinkGeo.MapSuite.Portable.PclSystem.get_Directory () <0xa7a090 + 0x0003d> in :0
at ohM=.yhM=.1RM= (System.String licenseFileExtension, System.String searchPattern) <0xa78a98 + 0x000af> in :0
at ohM=.yhM=.zhM= () <0xa787f8 + 0x000d7> in :0
at ohM=.yhM=.0hM= () <0xa787d0 + 0x00017> in :0
at ohM=.XRQ=.YxQ= () <0xa773e8 + 0x0002b> in :0
at ohM=.XRQ=.YhQ= (System.Boolean needToShowProductCenter) <0xa76728 + 0x000a7> in :0
at ThinkGeo.MapSuite.ValidatorHelper.CheckStatus () <0xa76498 + 0x00013> in :0
at ThinkGeo.MapSuite.ValidatorHelper.CheckObjectIsNotNull (System.Object parameterObject, System.String parameterName) <0xa76358 + 0x0000b> in :0
at ThinkGeo.MapSuite.Layers.ShapeFileFeatureLayer.BuildIndexFile (System.String pathFilename, ThinkGeo.MapSuite.Layers.BuildIndexMode rebuildExistingIndexMode) <0xa762c8 + 0x0001b> in :0
at MapShapeIndex.MapShapeIndex.Main (System.String[] cmdArgs) <0xa6dfd8 + 0x00047> in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at ThinkGeo.MapSuite.Portable.PclSystem.get_Directory () <0xa7a090 + 0x0003d> in :0
at ohM=.yhM=.1RM= (System.String licenseFileExtension, System.String searchPattern) <0xa78a98 + 0x000af> in :0
at ohM=.yhM=.zhM= () <0xa787f8 + 0x000d7> in :0
at ohM=.yhM=.0hM= () <0xa787d0 + 0x00017> in :0
at ohM=.XRQ=.YxQ= () <0xa773e8 + 0x0002b> in :0
at ohM=.XRQ=.YhQ= (System.Boolean needToShowProductCenter) <0xa76728 + 0x000a7> in :0
at ThinkGeo.MapSuite.ValidatorHelper.CheckStatus () <0xa76498 + 0x00013> in :0
at ThinkGeo.MapSuite.ValidatorHelper.CheckObjectIsNotNull (System.Object parameterObject, System.String parameterName) <0xa76358 + 0x0000b> in :0
at ThinkGeo.MapSuite.Layers.ShapeFileFeatureLayer.BuildIndexFile (System.String pathFilename, ThinkGeo.MapSuite.Layers.BuildIndexMode rebuildExistingIndexMode) <0xa762c8 + 0x0001b> in :0
at MapShapeIndex.MapShapeIndex.Main (System.String[] cmdArgs) <0xa6dfd8 + 0x00047> in :0