GetCapabilities error : String index out of range: -1

Added by BRUNET Clément almost 7 years ago

Hello,

I can't find where this error comes from.... that's why I need your help...

I have a proxy with a policy and config, grouping a lot of WMS services. By this proxy, I succeed to display in my map all the layers available, so my proxy works well with the getMap request.

I'd like to add a geoWebcache in my architecture. For that, I need to ask a getCapabilities request.

Here, in this request, I can not see the XML, and my url forward : Error in EasySDI Proxy. Consult the proxy log for more details.

In the logs, I can see all the RemoteRequestUrl, and all the RemoteResponseToRequestUrl, and to finish, after the last one response :

<logEntry time="16/09/2011 11:08:08" severity="ERROR"><![CDATA[String index out of range: -1]]></logEntry>

Any idea ?

Thanks by advance.

Clément.


Replies (7)

RE: GetCapabilities error : String index out of range: -1 - Added by Mérour Xavier almost 7 years ago

Hello Clément,

I'am not sure to follow you. You use Geowebcache to serve WMS, WMS-C or WMTS ?

Xavier

PS : You can't mix WMS and WMTS in a single PROXY config... I guess you konw that.

RE: GetCapabilities error : String index out of range: -1 - Added by BRUNET Clément almost 7 years ago

Hello Xavier,

Thanks for the precision concerning WMS et WMTS in a single proxy.

For the moment, I just try to deploy geowebcache, and my problem, isn't about geowebcache but about the getCapabilies request of my proxy.

Clément.

RE: GetCapabilities error : String index out of range: -1 - Added by Mérour Xavier almost 7 years ago

OK, you installed Geowebcache (GWC) and you try now to make a GetCapabilities on GWC through the PROXY, that's right ?

If so, it means you defined a new config in your PROXY, right ?
which kind of config ? WMS or WMTS ?

When you say "the problem is about the getCapabilies request of my proxy" -> making a GetCapabilities on a PROXY without any remote service (WMS,..) won't work of course. I need to know what (GWC ?) you have behind your PROXY ?

Sorry, but I am a bit confused... not sure I get the whole picture of what you try to do...

Xavier

RE: GetCapabilities error : String index out of range: -1 - Added by BRUNET Clément almost 7 years ago

Thanks Xavier,

Excuse me, I put you in trouble with GWC, because at the moment, I'm a newbie with GWC. We can forgot it for my problem.

I ask my proxy url in a navigator like this : http://[url]/proxy/ogc/wms_secure?service=wms&version=1.1.1&request=GetCapabilities

Here, I got in the logs :

<logEntry time="16/09/2011 11:08:08" severity="ERROR"><![CDATA[String index out of range: -1]]></logEntry>

RE: GetCapabilities error : String index out of range: -1 - Added by Mérour Xavier almost 7 years ago

OK, GWC is not concerned :-)

What is behind your "wms_secure" config exactly ?
All these WMS services you talked about at first, right ?

A GetMap works... a GetCapabilities doesn't...

hum, I can imagine that one of your remote service has a XML capabilities bad structure... if you try to remove one after the other, check if the problem remains.

By the way, you work with PROXY v 2.2.0 ?

RE: GetCapabilities error : String index out of range: -1 - Added by BRUNET Clément almost 7 years ago

Xavier,

Thanks for your idea.

I've made a test :

Take a new config with a new policy.
Add one by one, each service and all its layers
Test after every adding the getCapabilities of my proxy.

I've add my 17 services and my proxy answers with a good xml.

So, now, the difference between my new config and the old one is the GML filters that I disabled in the new one.

The GML content is very large, putting my Policy file over than 1Mo.. So, can the DOM libary, used to get URL in order to ask for getCapabilities request, can be corrupted by some character or some buffer overflow parsing a big content ?

One other question : When one of the "proxeed" server shuts-down, does my proxy response should stayed available ?

I mean, if it doesn't, the more you put some distant server, the more the datas are up to date (that's nice..), but the more the service is unstable....

Thanks for your answers.

Clément.

RE: GetCapabilities error : String index out of range: -1 - Added by Mérour Xavier almost 7 years ago

Hello Clément,

So, now, the difference between my new config and the old one is the GML filters that I disabled in the new one.
The GML content is very large, putting my Policy file over than 1Mo.. So, can the DOM libary, used to get URL in order to ask for getCapabilities
request, can be corrupted by some character or some buffer overflow parsing a big content ?

Yes, it could be the case. I also experienced once that with a big GML based filter, the PROXY could not handle it good. I think your problem, as you describe it, is related to this. One way to move solve it would be to "generalize" your GML file so that you have less pairs of X/Y coordinates or lower the precision by removing extra decimal in X/Y coordinates.

Anyway, I think you can open a ticket "defect" under PROXY forge and describe the problem.

One other question : When one of the "proxeed" server shuts-down, does my proxy response should stayed available ?

Yes, PROXY remains available if you set in your config "Mode de gestion des exceptions" to "Permissif". If set to "Restrictif", it means that if one of your remote service is down or return a OGC exception, you will get an error. (see doc here : http://forge.easysdi.org/projects/proxy/wiki/Configuration_with_Joomla!_Interface#Configure-a-new-service-configId)
I mean, if it doesn't, the more you put some distant server, the more the datas are up to date (that's nice..), but the more the service is unstable....

Well, you could also define several PROXY config instead of one "big" with all your remote servers.

Xavier

(1-7/7)