<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19046"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=356062407-09062011>Hi again,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=356062407-09062011>I've found the solution for my problem: just set the
parameter 'exception' of the WMS layer to 'application/vnd.ogc.se_xml', then WMS
no longer returns exception message inside the image. Or we can apply the patch
<A
href="http://trac.osgeo.org/openlayers/attachment/ticket/3261/3261.patch">http://trac.osgeo.org/openlayers/attachment/ticket/3261/3261.patch</A>
to remove the default value 'application/vnd.ogc.se_inimage' of
parameter 'exception'.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=356062407-09062011></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=356062407-09062011>Best regards,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=356062407-09062011>Minh-Tri</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT size=2 face=Arial><SPAN
class=356062407-09062011></SPAN></FONT> </DIV><FONT color=#0000ff size=2
face=Arial></FONT><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Duong Minh-Tri
[mailto:duong.minh-tri@ext.jrc.ec.europa.eu] <BR><B>Sent:</B> Wednesday, June
08, 2011 4:21 PM<BR><B>To:</B>
'openlayers-users@lists.osgeo.org'<BR><B>Subject:</B> Error messages displayed
on the map<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=446421113-08062011>Hi
all,</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=446421113-08062011></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=446421113-08062011>I am trying to add
a WMS layer to the map. Sometimes the WMS service doesn't work properly and
the layer can't be displayed properly. But on the map I see the pink tiles and
the error message for each tile: </SPAN></FONT></DIV>
<DIV><FONT size=1 face=Arial><SPAN
class=446421113-08062011>"code="internalError"Rendering process
failed</SPAN></FONT></DIV>
<DIV><FONT size=1 face=Arial><SPAN class=446421113-08062011>Unable to obtain
connection: Cannot get a connection, pool error Timeout waiting for idle
object"</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=446421113-08062011>I think those
error messages comes from WMS service and I am not able to fix those error.
However, at least I don't want display them on the map. I want to display
instead other message, shorter and more friendly to user, and not on
the map. </SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=446421113-08062011></SPAN></FONT><FONT size=2 face=Arial><SPAN
class=446421113-08062011></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=446421113-08062011>I've tried to
overwrite OpenLayers.Util.onImageLoadError by a blank function. Then no pink
tiles are displayed, but the text error messages still there.
</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=446421113-08062011>I also check the
GetMapRequest generated by OpenLayers. This is one of them: <A
href="http://kartta.liikennevirasto.fi/maaliikenne/ows?SERVICE=WMS&amp;&LAYERS=katselupalvelu%3Adigiroad&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=0,-90,90,0&WIDTH=256&HEIGHT=256">http://kartta.liikennevirasto.fi/maaliikenne/ows?SERVICE=WMS&amp;&LAYERS=katselupalvelu%3Adigiroad&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=0,-90,90,0&WIDTH=256&HEIGHT=256</A></SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=446421113-08062011></SPAN></FONT><FONT size=2 face=Arial><SPAN
class=446421113-08062011>When I view this link on Firefox (when server has
some problems and return errors), it displays a transparent image
together with the error message inside. But the image does not contain
the message (I check by saving the image and viewing) The image is just a
small transparent blank image. So the message comes to Firefox in a
secret way I don't know.</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=446421113-08062011></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=446421113-08062011>I guess
that the WMS service still returns an image to OpenLayers, so
OpenLayers.Util.onImageLoadError can't trigger. But it returns some error
message together with the image. Maybe OpenLayers can receive those message as
well and display them. But how can I detect when it happens and prevent
OpenLayers to display those error messages?</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=446421113-08062011></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN class=446421113-08062011>Any help is
appreciated. </SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=446421113-08062011></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=446421113-08062011>Thanks,</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=446421113-08062011></SPAN></FONT> </DIV>
<DIV><FONT size=2 face=Arial><SPAN
class=446421113-08062011></SPAN></FONT> </DIV></BLOCKQUOTE></BODY></HTML>