Discussion:
[mapguide-users] How to troubleshoot "The specified class was not found"?
Hans Milling
2012-09-28 13:33:44 UTC
Permalink
Hi all

How do I troubleshoot the error/exception “The specified class was not
found”?
The error occurs when I try to query the map e.g. for selection or tooltip.
I am using Maestro 4 API (latest) and KingOracle provider. The error does
not occur with OGR provider and MapInfo files.
Here is an example of code that breakes when querying for a tool tip:
IMappingService mapSvc =
(IMappingService)con.GetService((int)ServiceType.Mapping);
return mapSvc.QueryMapFeatures(runtimemapname, wkt, false,
QueryMapFeaturesLayerAttributes.OnlyVisible, true);

I am using LocalNativeConnection, but how do I troubleshoot what is wrong
with my runtime map? How can I get to know what “class” it expects that is
not there?

The error in the MapGuide log is this:
<2012-09-28T15:22:09> 3204 Administrator
Error: The specified class was not found.
StackTrace:
- MgRenderingServiceHandler.ProcessOperation() line 83 file
c:\builds\mg22x64\mgdev\server\src\services\rendering\RenderingServiceHandler.cpp
- MgOpQueryFeatures.Execute() line 125 file
c:\builds\mg22x64\mgdev\server\src\services\rendering\OpQueryFeatures.cpp
- MgServerRenderingService.QueryFeatures() line 718 file
c:\builds\mg22x64\mgdev\server\src\services\rendering\ServerRenderingService.cpp
- MgServerRenderingService.RenderForSelection() line 1452 file
c:\builds\mg22x64\mgdev\server\src\services\rendering\ServerRenderingService.cpp
- MgServerDescribeSchema.GetClassDefinition() line 970 file
c:\builds\mg22x64\mgdev\server\src\services\feature\ServerDescribeSchema.cpp

In the access.log:
<2012-09-28T14:51:08> 6408 Administrator
QueryFeatures.1.0.0:7(Session:26973744-096b-11e2-8000-08002700f46b_en_7F0000010AFC0AFB0AFA//Kort
ENV El og Fiber.Map,MgStringCollection,MgGeometry,4,,-1,1) Failure

Running mgserver with the cpl_debug=on only shows the same short error
message: "The specified class was not found."

Best regards
Hans Milling...




--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-troubleshoot-The-specified-class-was-not-found-tp5005219.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Jackie Ng
2012-09-28 14:07:03 UTC
Permalink
There's some really crappy error messages in MapGuide that we've cleaned up
in 2.4. This is one such example. 2.4 tells you the offending class name.

But since the MapGuide in question is 2.2, I'd say do a validation check on
the Map Definition with Maestro

- Jackie



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-troubleshoot-The-specified-class-was-not-found-tp5005219p5005227.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
Hans Milling
2012-10-01 09:41:07 UTC
Permalink
Hi Jackie

All i get in MGOS2.4 RC2 is:

Command line output:
(4980) The specified class was not found.

error.log file:
<2012-10-01T11:36:44> 4980 Ajax Viewer ::1 Administrator
Error: The specified class was not found.
StackTrace:
- MgRenderingServiceHandler.ProcessOperation() line 83 file
c:\mg-2.4-x64\mgdev\server\src\services\rendering\RenderingServiceHandler.cpp
- MgOpQueryFeatures.Execute() line 125 file
c:\mg-2.4-x64\mgdev\server\src\services\rendering\OpQueryFeatures.cpp
- MgServerRenderingService.QueryFeatures() line 848 file
c:\mg-2.4-x64\mgdev\server\src\services\rendering\ServerRenderingService.cpp
- MgServerRenderingService.RenderForSelection() line 1520 file
c:\mg-2.4-x64\mgdev\server\src\services\rendering\ServerRenderingService.cpp
- MgServerDescribeSchema.GetClassDefinition() line 1061 file
c:\mg-2.4-x64\mgdev\server\src\services\feature\ServerDescribeSchema.cpp

This is when I try selection on the map. It only happens at a certain zoom
level so it must be some layer causing problems, but still no info on which
layer.
I will try to delete the layers one by one until the problem is gone to
identify the problematic layer.

Hans...



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/How-to-troubleshoot-The-specified-class-was-not-found-tp5005219p5005489.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
cremebrulee
2017-10-06 20:14:55 UTC
Permalink
Hi @Hans Milling or Jackie

Where/how you able to resolve this? I too am getting the same issue "The
specified class was not found". I am running MGOS 2.2. Thanks



-----
-MGnoob
--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Hans Milling
2017-10-09 09:40:11 UTC
Permalink
This was some years ago. I think the problem was that the geometry in the
Oracle table where 3D coordinates. MapGuide did not like that. I solved it
by converting all 3D coordnates to 2D coordinates in the database.
Anyway "The specified class does not exist" usually means that a DLL some
where has the wrong version or you are running 64 bit and the dll is 32 bit,
or that the program is calling a function in the dll that is either not
defined or has different parameters.
What are you doing when you get this error?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Hans Milling
2017-10-12 07:17:01 UTC
Permalink
I just remembered that this error could also mean that the FDO provider does
not provide the method that MapGuide tries to use.
A great example is, if you enable selection on a raster layer. Raster does
not support querying the map for data. If you try to query a tooltip or
selection on a raster layer MapGuide will throw an error, because the raster
layer does not support the query functions. In other words, do not enable
selection on raster layers.
You can make a copy of your map, and remove one layer at the time until the
map works. Then you know which layer is generating the error.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
cremebrulee
2017-10-21 23:56:19 UTC
Permalink
@Hans Milling : Thanks for your detailed responses.
It turned out that files I was using to display data (I use .SDF files) did
not have a required class that I had set up in my Layers
definition/template. I was able to use the FDO Toolbox & Maestro to resolve
this.



-----
-MGnoob
--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
Loading...