[Geoserver-users] Layer can be accessed through WFS but WMS fails..

Dear all,

The subject of this post is the same as another post (from gisaalter Aug 08, 2007; 05:48pm) because I have the same problem that was described at that moment: I have two layers loaded in geoserver (through postgis tables), they are fetched correctly via WFS but they are not found with WMS requests.
The difference with the old post is that I am using geoserver 1.5.3 instead of an old version.

I have two installations in different machines, both running in Debian and geoserver inside a Tomcat 5.0.28. In one of them it works properly, in the other it doesn't. Could it have something to do with the environment?.

I would appreciate some help. Thanks in advance.
Regards,

  Héctor.

***** This is the log when the server starts (is the last ATTENTION message normal?) :

INFO: Installation d'une application pour le chemin de contexte /geoserver depuis l'URL file:/home/gmv/safe/apps/tomcat-5.0.28/webapps/geoserver
----------------------------------
- GEOSERVER_DATA_DIR: /home/gmv/safe/apps/tomcat-5.0.28/webapps/geoserver/data
----------------------------------
0 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - logging level is CONFIG
3 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - maxFeatures is 1000000
3 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - numDecimals returning is 8
4 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - charSet is UTF-8
7 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - reading srsXmlStyle: [srsXmlStyle: null]
8 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - No baseMap groups defined yet
9 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loading configuration file: /home/gmv/safe/apps/tomcat-5.0.28/webapps/geoserver/data/catalog.xml
106 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - added namespace xmlns:safe="http://www.safe-eu.org", isDefault=false
107 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - added namespace xmlns:sf="http://www.openplans.org/spearfish", isDefault=false
107 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - added namespace xmlns:it.geosolutions="http://www.geo-solutions.it", isDefault=false
107 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - added namespace xmlns:topp="http://www.openplans.org/topp", isDefault=true
108 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - added namespace xmlns:sde="http://geoserver.sf.net", isDefault=false
108 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - added namespace xmlns:nurc="http://www.nurc.nato.int", isDefault=false
109 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - added namespace xmlns:tiger="http://www.census.gov", isDefault=false
109 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - added namespace xmlns:cite="http://www.opengeospatial.net/cite", isDefault=false
111 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded datastore safeGIS
113 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style giant_polygon
113 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style capitals
114 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style simple_streams
114 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style tiger_roads
114 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style poly_landmarks
115 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style green
115 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style simple_roads
115 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style dem
130 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style population
130 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style line
131 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style raster
131 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style polygon
131 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style point
132 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style poi
132 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loaded style cite_lakes
134 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loading configuration file: home/gmv/safe/apps/tomcat-5.0.28/webapps/geoserver/data/featureTypes/safeGIS_event/info.xml
141 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - added featureType event
142 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Decoding file name: safeGIS:::event
142 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Loading configuration file: /home/gmv/safe/apps/tomcat-5.0.28/webapps/geoserver/data/featureTypes/safeGIS_location/info.xml
145 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - added featureType location
145 [CONFIG] org.vfny.geoserver.global.xml.XMLConfigReader - Decoding file name: safeGIS:::location
12 oct. 2007 09:18:52 java.util.prefs.FileSystemPreferences$7 run
ATTENTION: Prefs file removed in background /home/gmv/.java/.userPrefs/org/geotools/referencing/wkt/prefs.xml

***** This is what it says when performning a wmsCapabilities request from the browser:

626667 [INFO] org.vfny.geoserver.servlets.AbstractService - handling request: GetCapabilities [service: WMS, version: 1.1.1]
626904 [CONFIG] org.vfny.geoserver.wms.responses.helpers.JAISupport - Supported JAIMapResponse's MIME Types: [image/jpeg]
627696 [INFO] org.vfny.geoserver.servlets.AbstractService - Service handled

______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
puede contener informacion clasificada por su emisor como confidencial
en el marco de su Sistema de Gestion de Seguridad de la
Informacion siendo para uso exclusivo del destinatario, quedando
prohibida su divulgacion copia o distribucion a terceros sin la
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje
erroneamente, se ruega lo notifique al remitente y proceda a su borrado.
Gracias por su colaboracion.
______________________
This message including any attachments may contain confidential
information, according to our Information Security Management System,
and intended solely for a specific individual to whom they are addressed.
Any unauthorised copy, disclosure or distribution of this message
is strictly forbidden. If you have received this transmission in error,
please notify the sender immediately and delete it.
______________________

Héctor Hugo Pérez Alonso ha scritto:

Dear all,
The subject of this post is the same as another post (from gisaalter Aug 08, 2007; 05:48pm) because I have the same problem that was described at that moment: I have two layers loaded in geoserver (through postgis tables), they are fetched correctly via WFS but they are not found with WMS requests.
The difference with the old post is that I am using geoserver 1.5.3 instead of an old version.

I have two installations in different machines, both running in Debian and geoserver inside a Tomcat 5.0.28. In one of them it works properly, in the other it doesn't. Could it have something to do with the environment?.

Can you give me some more information? What can you see in the
GeoServer logs when the WMS request fails?

Usually this happens because of some styling or geometric issue
that does not affect the WFS encoder but kills the java2d renderer,
yet without a log it's hard to tell.

A dump of the table in sql or shapefile format would be useful too.
Cheers
Andrea

Hi Andrea,

Thanks for answering so quick. Sorry if before there was not enough information, but I didn't really see any other information because the WMS requests don't fail. They just end as if everything was normal and return the results without layers. The geoserver.log is empty (even if I had set the "logging to file" property).

However, I have started from the beginning creating the two layers from the geoserver web interface and the problem seems to be there, although no error message is displayed in the page. The message below is what it throws in the catalina.out when I create a new feature type "location" associated to a new datastore and namespace. I attach the info.xml created by geoserver for this feature type.

Please, tell me any other useful information that I could provide to you.

Thanks.
Rgeards,

  Héctor.

**** Error in catalina.out:

33288 [INFO] org.vfny.geoserver.servlets.AbstractService - Service handled
form connection params { loose bbox=true, user="user", passwd="passwd", estimated extent=false, wkb enabled=true, host="localhost", schema="public", port=5432, database="test", dbtype=
"postgis"}
typeNames : ("binaries", "casedeclaration", "casedeclarationcasediagnosticmakersmedicalactormedcases", "environlaboratorytest", "environmentalsample", "event", "humanlaboratorytest", "humans
ample", "location", "medicalactor", "medicalactoractor", "medicalactorroles", "organization", "patient", "role")
java.lang.NullPointerException
        at org.vfny.geoserver.action.data.DataFeatureTypesNewAction.execute(DataFeatureTypesNewAction.java:90)
        at org.vfny.geoserver.action.ConfigAction.execute(ConfigAction.java:102)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:103)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
        at java.lang.Thread.run(Thread.java:595)
rest based on schemaBase: gml:AbstractFeatureType

Concerning the geoserver logs, the only geoserver.log that I see is the geoserver/logs/geoserver.log and it is empty (I have enabled the file logging option, but it is still empty). What I have sent to you in the last mail is the content of the catalina.out. Please tell me

-----Mensaje original-----
De: Andrea Aime [mailto:aaime@anonymised.com]
Enviado el: viernes, 12 de octubre de 2007 9:44
Para: Héctor Hugo Pérez Alonso
CC: geoserver-users@lists.sourceforge.net
Asunto: Re: [Geoserver-users] Layer can be accessed through WFS but WMS fails..

Héctor Hugo Pérez Alonso ha scritto:

Dear all,

The subject of this post is the same as another post (from gisaalter Aug 08, 2007; 05:48pm) because I have the same problem that was described at that moment: I have two layers loaded in geoserver (through postgis tables), they are fetched correctly via WFS but they are not found with WMS requests.
The difference with the old post is that I am using geoserver 1.5.3 instead of an old version.

I have two installations in different machines, both running in Debian and geoserver inside a Tomcat 5.0.28. In one of them it works properly, in the other it doesn't. Could it have something to do with the environment?.

Can you give me some more information? What can you see in the GeoServer logs when the WMS request fails?

Usually this happens because of some styling or geometric issue that does not affect the WFS encoder but kills the java2d renderer, yet without a log it's hard to tell.

A dump of the table in sql or shapefile format would be useful too.
Cheers
Andrea

______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
puede contener informacion clasificada por su emisor como confidencial
en el marco de su Sistema de Gestion de Seguridad de la
Informacion siendo para uso exclusivo del destinatario, quedando
prohibida su divulgacion copia o distribucion a terceros sin la
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje
erroneamente, se ruega lo notifique al remitente y proceda a su borrado.
Gracias por su colaboracion.
______________________
This message including any attachments may contain confidential
information, according to our Information Security Management System,
and intended solely for a specific individual to whom they are addressed.
Any unauthorised copy, disclosure or distribution of this message
is strictly forbidden. If you have received this transmission in error,
please notify the sender immediately and delete it.
______________________

info.xml (694 Bytes)

Héctor Hugo Pérez Alonso ha scritto:

Hi Andrea,

Thanks for answering so quick. Sorry if before there was not enough information, but I didn't really see any other information because the WMS requests don't fail. They just end as if everything was normal and return the results without layers. The geoserver.log is empty (even if I had set the "logging to file" property).

However, I have started from the beginning creating the two layers from the geoserver web interface and the problem seems to be there, although no error message is displayed in the page. The message below is what it throws in the catalina.out when I create a new feature type "location" associated to a new datastore and namespace. I attach the info.xml created by geoserver for this feature type.

Please, tell me any other useful information that I could provide to you.

Hmm... that error is not fatal, but it occurs only if GeoServer could not find a geometry column in the feature type you're trying to register.
Are you sure the table you're dealing with has:
1) a geometric column
2) the geometric column is registered in geometry_columns in postgis?

If there is no geometry column it's no wonder WFS works but WMS does not (no geometry -> nothing to depict).

Cheers
Andrea

Of course, Andrea, you are right. That's the problem.
The database tables creation had finished ok, but I didn't notice that the geometry columns creation had failed.
Thanks very much for your help,

  Héctor.

-----Mensaje original-----
De: Andrea Aime [mailto:aaime@anonymised.com]
Enviado el: viernes, 12 de octubre de 2007 10:54
Para: Héctor Hugo Pérez Alonso
CC: geoserver-users@lists.sourceforge.net
Asunto: Re: [Geoserver-users] Layer can be accessed through WFS but WMS fails..

Héctor Hugo Pérez Alonso ha scritto:

Hi Andrea,

Thanks for answering so quick. Sorry if before there was not enough information, but I didn't really see any other information because the WMS requests don't fail. They just end as if everything was normal and return the results without layers. The geoserver.log is empty (even if I had set the "logging to file" property).

However, I have started from the beginning creating the two layers from the geoserver web interface and the problem seems to be there, although no error message is displayed in the page. The message below is what it throws in the catalina.out when I create a new feature type "location" associated to a new datastore and namespace. I attach the info.xml created by geoserver for this feature type.

Please, tell me any other useful information that I could provide to you.

Hmm... that error is not fatal, but it occurs only if GeoServer could not find a geometry column in the feature type you're trying to register.
Are you sure the table you're dealing with has:
1) a geometric column
2) the geometric column is registered in geometry_columns in postgis?

If there is no geometry column it's no wonder WFS works but WMS does not (no geometry -> nothing to depict).

Cheers
Andrea

______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
puede contener informacion clasificada por su emisor como confidencial
en el marco de su Sistema de Gestion de Seguridad de la
Informacion siendo para uso exclusivo del destinatario, quedando
prohibida su divulgacion copia o distribucion a terceros sin la
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje
erroneamente, se ruega lo notifique al remitente y proceda a su borrado.
Gracias por su colaboracion.
______________________
This message including any attachments may contain confidential
information, according to our Information Security Management System,
and intended solely for a specific individual to whom they are addressed.
Any unauthorised copy, disclosure or distribution of this message
is strictly forbidden. If you have received this transmission in error,
please notify the sender immediately and delete it.
______________________