[mapguide-dev] problems initializing web tier

alucas at srtec.com alucas at srtec.com
Mon Apr 24 18:14:14 EDT 2006


Hi Traian,

I've solved the problem. The problem was in webconfig.ini, the directories
pointed in ResourcesPath and TempPath values in general properties does
not exists. I've created the directories and correct this values, finally,
in resources dir. I put web_en.res file.

Thanks for your help.
>
> Sounds like it is finding the webconfig.ini, but some path is wrong
> inside it. For example check if you have an entry like this in it:
>
> ResourcesPath =C:\Program
> Files\MapGuideOpenSource\WebServerExtensions\www\mapagent\Resources
>
> And make sure it is correctly set up. Also I do recommend running it in
> the debugger so that you can see exactly which file it is looking for --
> something the Windows stack trace does not show.
>
> Traian
>
>
> -----Original Message-----
> From: alucas at srtec.com [mailto:alucas at srtec.com]
> Sent: Monday, April 24, 2006 10:15 AM
> To: dev at mapguide.osgeo.org
> Cc: dev at mapguide.osgeo.org
> Subject: RE: [mapguide-dev] problems initializing web tier
>
>
> I've a trail, if I run the .exe from explorer in debug mode, I get this
> full explanation:
>
> See the end of this message for details on invoking
> just-in-time (JIT) debugging instead of this dialog box.
>
> ************** Exception Text **************
> OSGeo.MapGuide.MgFileNotFoundException: Failed to retrieve message for
> "MgFileNotFoundException".
> - MgInitializeWebTier line 64 file c:\documents and settings\alucas\mis
> documentos\mapguide-1.0.0\web\src\websupport\initializewebtier.cpp
> - MgInitializeWebTierInternal line 55 file c:\documents and
> settings\alucas\mis
> documentos\mapguide-1.0.0\web\src\websupport\initializewebtier.cpp
> - MgResources.LoadResources line 281 file c:\documents and
> settings\alucas\mis
> documentos\mapguide-1.0.0\common\service\system\resources.cpp
> - MgResources.ParseFile line 512 file c:\documents and
> settings\alucas\mis
> documentos\mapguide-1.0.0\common\service\system\resources.cpp
> - ByteSourceFileImpl line 115 file c:\documents and settings\alucas\mis
> documentos\mapguide-1.0.0\common\service\data\bytesourcefileimpl.cpp
>
>
>
> ************** Loaded Assemblies **************
> mscorlib
>     Assembly Version: 2.0.0.0
>     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
>     CodeBase:
> file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
> ----------------------------------------
> WindowsApplication1
>     Assembly Version: 1.0.0.0
>     Win32 Version: 1.0.0.0
>     CodeBase:
> file:///C:/Documents%20and%20Settings/alucas/Mis%20documentos/Visual%20S
> tudio%202005/Projects/WindowsApplication1/WindowsApplication1/bin/Debug/
> WindowsApplication1.exe
> ----------------------------------------
> System.Windows.Forms
>     Assembly Version: 2.0.0.0
>     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
>     CodeBase:
> file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5
> c561934e089/System.Windows.Forms.dll
> ----------------------------------------
> System
>     Assembly Version: 2.0.0.0
>     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
>     CodeBase:
> file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/Sy
> stem.dll
> ----------------------------------------
> System.Drawing
>     Assembly Version: 2.0.0.0
>     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
>     CodeBase:
> file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d
> 50a3a/System.Drawing.dll
> ----------------------------------------
> System.Configuration
>     Assembly Version: 2.0.0.0
>     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
>     CodeBase:
> file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5
> f7f11d50a3a/System.Configuration.dll
> ----------------------------------------
> System.Xml
>     Assembly Version: 2.0.0.0
>     Win32 Version: 2.0.50727.42 (RTM.050727-4200)
>     CodeBase:
> file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e08
> 9/System.Xml.dll
> ----------------------------------------
> MapGuideDotNetApid
>     Assembly Version: 1.0.0.1
>     Win32 Version: 1.0.0.1
>     CodeBase:
> file:///C:/Documents%20and%20Settings/alucas/Mis%20documentos/Visual%20S
> tudio%202005/Projects/WindowsApplication1/WindowsApplication1/bin/Debug/
> MapGuideDotNetApid.DLL
> ----------------------------------------
>
> ************** JIT Debugging **************
> To enable just-in-time (JIT) debugging, the .config file for this
> application or computer (machine.config) must have the
> jitDebugging value set in the system.windows.forms section.
> The application must also be compiled with debugging
> enabled.
>
> For example:
>
> <configuration>
>     <system.windows.forms jitDebugging="true" />
> </configuration>
>
> When JIT debugging is enabled, any unhandled exception
> will be sent to the JIT debugger registered on the computer
> rather than be handled by this dialog box.
>
>
>
>
>>
>> Well if you have all debug DLLs, you should be able to turn on
> unmanaged
>> debugging for your project and then set up the debugger to break on
> C++
>> exceptions and Win32 exceptions. Then run your app and see where it
>> stops in the debugger -- this will be the place it is crashing -- and
>> see what exactly it is trying to do.
>>
>> Traian
>>
>> -----Original Message-----
>> From: alucas at srtec.com [mailto:alucas at srtec.com]
>> Sent: Monday, April 24, 2006 9:59 AM
>> To: dev at mapguide.osgeo.org
>> Cc: dev at mapguide.osgeo.org
>> Subject: RE: [mapguide-dev] problems initializing web tier
>>
>> Well, I've run the .exe through explorer getting the same error. If I
>> build my sample applicattion in Debug mode, the exception I get is:
>>
>> An unhandled exception of type 'System.TypeInitializationException'
>> occurred in MapGuideDotNetApid.dll
>>
>> Additional information: The type initializer for 'MapGuideApiPINVOKE'
>> threw an exception.
>>
>>
>> Any idea?
>>
>>>
>>> The msjava should not be an issue. I'm all out of ideas, may be
>> someone
>>> else will come up with something... By the way, are you running from
>>> inside the debugger? Did you try running the .exe directly by
> clicking
>>> on it from explorer?
>>>
>>> Traian
>>>
>>>
>>> -----Original Message-----
>>> From: alucas at srtec.com [mailto:alucas at srtec.com]
>>> Sent: Monday, April 24, 2006 9:44 AM
>>> To: dev at mapguide.osgeo.org
>>> Cc: dev at mapguide.osgeo.org
>>> Subject: RE: [mapguide-dev] problems initializing web tier
>>>
>>> Well,
>>>
>>> I set this variables in order to build Web Extensions:
>>>
>>> PROJ_LIB=C:\Documents and Settings\alucas\Mis
>>> documentos\mapguide-1.0.0\Oem\proj-4.4.9\nad
>>>
>>> GDAL_DATA=c:\Documents and Settings\alucas\Mis
>>> documentos\mapguide-1.0.0\Oem\gdal-1.3.0\data
>>>
>>> I've depends.exe and have been executed selecting
>>> MapGuideDotNetApid.dll,
>>> I'm not an expert using this tool but, the only problem I see is with
>>> MSJAVA.dll. I attach screenshot of the result.
>>>
>>>>
>>>> OK that looks fine. It is probably still worth it to check with the
>>> dll
>>>> dependecy tool -- available at http://www.dependencywalker.com/
>>>>
>>>> Another thing... Can you run "set" form a command line and tell me
> if
>>>> the environment variables GDAL_DATA and PROJ_LIB are defined and
> what
>>>> their values are?
>>>>
>>>> Traian
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: alucas at srtec.com [mailto:alucas at srtec.com]
>>>> Sent: Monday, April 24, 2006 8:59 AM
>>>> To: dev at mapguide.osgeo.org
>>>> Cc: dev at mapguide.osgeo.org
>>>> Subject: RE: [mapguide-dev] problems initializing web tier
>>>>
>>>> You're right Traian, but all dll's are builded as debug. I've
> omitted
>>>> this
>>>> detail because I read this in the pdf. Excuse me this mistake.
>>>> So, all Webtier.sln and Oem.sln have been compiled in debug mode,
> all
>>>> dll's have 'd' character at the end:
>>>>
>>>> ACEd.dll
>>>> MapGuideDotNetApid.dll
>>>> ...
>>>> I've attached a screeenshot.
>>>>
>>>>>
>>>>> One thing bothers me here. The exception message says it is
>>> attempting
>>>>> to load MapGuideDotNetApid.dll, which is a debug build of the API
>> dll
>>>>> (notice the d). The debug dll expects to find other debug dlls like
>>>>> MgCommond.dll and ACEd.dll. The list you give me has no 'd', which
>>>> leads
>>>>> me to believe these are release dlls. You need either all debug or
>>> all
>>>>> release builds of the dlls.
>>>>>
>>>>> Traian
>>>>>
>>>>> -----Original Message-----
>>>>> From: alucas at srtec.com [mailto:alucas at srtec.com]
>>>>> Sent: Monday, April 24, 2006 8:40 AM
>>>>> To: dev at mapguide.osgeo.org
>>>>> Cc: dev at mapguide.osgeo.org
>>>>> Subject: RE: [mapguide-dev] problems initializing web tier
>>>>>
>>>>> Hi Traian,
>>>>>
>>>>> I was thinking this, for this reason, I was put all dll's generated
>>>> with
>>>>> WebTier.sln in the same directory that exe file. So, the directory
>>>>> contains:
>>>>>
>>>>> ACE.dll
>>>>> All Api dll's : MapGuideJavaApi.dll ...
>>>>> MapguideUnmanagedApi.dll
>>>>> MgCommon.dll
>>>>> MgCoordinateSystem.dll
>>>>> ...
>>>>> I don't know nothing about dependency tool. I never have used it. I
>>>> will
>>>>> search in the net.
>>>>>
>>>>>>
>>>>>> Could it be that it is looking for the dll that contains
>>>>>> MgInitializeWebTier (or one of its dependencies) and not finding
>> it?
>>>>> Do
>>>>>> you have the dependency tool (depends.exe). Could you run it
>> against
>>>>>> MapGuideDotNetApid.dll and see which dlls it depends on and is not
>>>>>> finding?
>>>>>>
>>>>>> For example, when you add a managed dependency, if that dll has
>>>>>> unmanaged dependencies (like MgCommond.dll in our case), the
>>>> unmanaged
>>>>>> dependencies will not get automatically copied to the .exe
>> directory
>>>>> and
>>>>>> you will need to do it by hand.
>>>>>>
>>>>>> Traian
>>>>>>
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: alucas at srtec.com [mailto:alucas at srtec.com]
>>>>>> Sent: Monday, April 24, 2006 7:18 AM
>>>>>> To: dev at mapguide.osgeo.org
>>>>>> Subject: [mapguide-dev] problems initializing web tier
>>>>>>
>>>>>> Hello list,
>>>>>>
>>>>>> When I try to connect to the server in .NET, I get the exception:
>>>>>>
>>>>>> 'An unhandled exception of type
>>>>> 'OSGeo.MapGuide.MgFileNotFoundException'
>>>>>> occurred in MapGuideDotNetApid.dll'
>>>>>>
>>>>>> I've added as a reference 'MapGuideDotNetApi.dll' in the project.
>>>>>>
>>>>>> The sample code to establish my conenction is:
>>>>>>
>>>>>> // This is a sample windows form application in C#.
>>>>>> // I've tried with @"c:\pathtofile\webconfig.ini".
>>>>>> // Here, the file is in the same directory that .exe
>>>>>> // I've changed the IP address in the webconfig.ini
>>>>>>
>>>>>>
>>>>>> // Here, I get the exception
>>>>>> MapGuideApi.MgInitializeWebTier("webconfig.ini");
>>>>>> // I've tried several paths and combinations but
>>>>>> // always get the same exception.
>>>>>>
>>>>>> MgUserInformation userInfo = new
>>>>>> MgUserInformation("Administrator","admin");
>>>>>> MgSiteConnection siteConn = new MgSiteConnection();
>>>>>> siteConn.Open(userInfo);
>>>>>>
>>>>>>
>>>>>> Antonio Lucas
>>>>>>
>>>>>> Software Engineer
>>>>>> SER&TEC S.L
>>>>>> Phone: +34 96 395 95 13
>>>>>> www.srtec.com
>>>>>> Valencia (Spain)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: dev-unsubscribe at mapguide.osgeo.org
>>>>>> For additional commands, e-mail: dev-help at mapguide.osgeo.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: dev-unsubscribe at mapguide.osgeo.org
>>>>>> For additional commands, e-mail: dev-help at mapguide.osgeo.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Antonio Lucas
>>>>>
>>>>> Software Engineer
>>>>> SER&TEC S.L
>>>>> Phone: +34 96 395 95 13
>>>>> www.srtec.com
>>>>> Valencia (Spain)
>>>>>
>>>>>
>>>>>
>>>>>
>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe at mapguide.osgeo.org
>>>>> For additional commands, e-mail: dev-help at mapguide.osgeo.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe at mapguide.osgeo.org
>>>>> For additional commands, e-mail: dev-help at mapguide.osgeo.org
>>>>>
>>>>>
>>>>
>>>>
>>>> Antonio Lucas
>>>>
>>>> Software Engineer
>>>> SER&TEC S.L
>>>> Phone: +34 96 395 95 13
>>>> www.srtec.com
>>>> Valencia (Spain)
>>>>
>>>>
>>>>
>>>>
> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe at mapguide.osgeo.org
>>>> For additional commands, e-mail: dev-help at mapguide.osgeo.org
>>>>
>>>>
>>>
>>>
>>> Antonio Lucas
>>>
>>> Software Engineer
>>> SER&TEC S.L
>>> Phone: +34 96 395 95 13
>>> www.srtec.com
>>> Valencia (Spain)
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe at mapguide.osgeo.org
>>> For additional commands, e-mail: dev-help at mapguide.osgeo.org
>>>
>>>
>>
>>
>> Antonio Lucas
>>
>> Software Engineer
>> SER&TEC S.L
>> Phone: +34 96 395 95 13
>> www.srtec.com
>> Valencia (Spain)
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe at mapguide.osgeo.org
>> For additional commands, e-mail: dev-help at mapguide.osgeo.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe at mapguide.osgeo.org
>> For additional commands, e-mail: dev-help at mapguide.osgeo.org
>>
>>
>
>
> Antonio Lucas
>
> Software Engineer
> SER&TEC S.L
> Phone: +34 96 395 95 13
> www.srtec.com
> Valencia (Spain)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe at mapguide.osgeo.org
> For additional commands, e-mail: dev-help at mapguide.osgeo.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe at mapguide.osgeo.org
> For additional commands, e-mail: dev-help at mapguide.osgeo.org
>
>


Antonio Lucas

Software Engineer
SER&TEC S.L
Phone: +34 96 395 95 13
www.srtec.com
Valencia (Spain)






More information about the Mapguide-internals mailing list