El módulo de impresión (printing) de GeoServer 2.5.x no funciona con capas WMS seguras

La extensión de impresión de GeoServer 2.5.1 no imprime capas seguras, sólo las capas públicas. Este problema será corregido en la versión 2.6 de GeoServer, por lo pronto podemos hacer lo siguiente para solucionar el problema.

Descargue la nueva versión de la librería  print-lib (print-lib-2.0.0.jar) de  aquí.

Pare el servidor de aplicaciones donde está instalado el GeoServer (tomcat, glassfish, jetty, etc.).

Elimine la versión actual de esa librería que se encuentra dentro de la aplicación GeoServer:

../WEB-INF/lib/print-lib-1.2-20101018133712.jar

así como la librería pvalsecc-0.9.2.jar en esa misma ubicación.

Copie el archivo jar de la versión 2.0 descargado anteriormente al mismo directorio nombrado anteriormente.

Hay que hacer unas modificaciones al archivo web.xml de GeoServer:

../WEB-INF/web.xml

Localice esta sección en el archivo anterior:

    <!-- pick up all spring application contexts -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*:/applicationContext.xml classpath*:/applicationSecurityContext.xml</param-value>
    </context-param>

Cambie esa sección de modo que quede así:

    <!-- pick up all spring application contexts -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*:/applicationContext.xml classpath*:/applicationSecurityContext.xml classpath*:/mapfish-spring-application-context.xml</param-value>
    </context-param>

Reinicie el servidor de aplicaciones y es todo, ya se podrán imprimir las capas seguras publicadas por Geoserver.

¡Saludos!

GeoExplorer no sube o carga archivos a Geoserver instalado de forma indpendiente

Después de instalar el código fuente y construir una versión distribuible de GeoExplorer la aplicación desarrollada por Boundless (antes OpenGeo) y que viene integrada con la Suite OpenGeo, en el servidor de aplicaciones donde tengo instalada la versión independiente de Geoserver (prefiero tener los componentes instalados independientemente y no la Suite de OpenGeo), me encontré con algunos problemas que fui resolviendo poco a poco.

Había que instalar varias extensiones que no vienen por defecto en Geoserver como son la extensión de impresión, del servicio de catálogos y la de importación entre otras. Una vez instalado todo al momento de querer importar un archivo zip (para cargar shapefiles hay que comprimirlos en archivos zip o tar.gz o en algunos otros formatos de compresión permitidos por la aplicación) simplemente no los cargaba y mandaba el error de carga pero no indicaba el porqué. Los archivos log de Geoserver y el del servidor de aplicaciones no mostraban error.

Al buscar errores en el Geoexplorer (está hecha con javascript) con la ayuda de las herramientas de desarrollo de Google Chrome, me di cuenta que la llamada al servicio mandaba una excepción java de que no encontraba una clase. La clase no encontrada era una qu etenía que ver con la librería java commons-vfs-1.0.

Una vez descargada ese archivo jar con dicha librería e instalarla en el directorio lib de Geoserver y reiniciando el servidor de aplicaciones, se solucionó el problema. Ahora puedo cargar archivos compactados con archivos shapefiles sin problemas a Geoserver.

Supongo que la extensión de importación (importer) debería incluir ese archivo .jar, pero no es así, desconozco el motivo.

Geoexplorer

 

¡Saludos!

 

Geoserver no funciona correctamente sobre Apache TomEE.

Tristemente me doy cuenta que el servidor de mapas Geoserver 2.5 no trabaja correctamente si está instalado en el Servidor de Aplicaciones TomEE Plus 1.6.

Parecía que todo trabajaba bien hasta seleccionar el servicio WFS en el menú del administrador, en lugar de mostrar la pantalla de administración del servicio, aparece el siguiente error:

org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = srsNameStyle]]
	at org.apache.wicket.Component.renderComponent(Component.java:2725)
	at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
	at org.apache.wicket.Component.render(Component.java:2517)
	at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
	at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
	at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:696)
	at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
	at org.apache.wicket.Component.renderComponent(Component.java:2686)
	at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
	at org.apache.wicket.Component.render(Component.java:2517)
	at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
	at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
	at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
	at org.apache.wicket.Component.renderComponent(Component.java:2686)
	at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
	at org.apache.wicket.Component.render(Component.java:2517)
	at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
	at org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66)
	at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
	at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1444)
	at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
	at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
	at org.apache.wicket.Component.renderComponent(Component.java:2686)
	at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
	at org.apache.wicket.Component.render(Component.java:2517)
	at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
	at org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73)
	at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
	at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1444)
	at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
	at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
	at org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1995)
	at org.apache.wicket.Component.renderComponent(Component.java:2686)
	at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
	at org.apache.wicket.Component.render(Component.java:2517)
	at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
	at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
	at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
	at org.apache.wicket.Component.renderComponent(Component.java:2686)
	at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
	at org.apache.wicket.Component.render(Component.java:2517)
	at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
	at org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66)
	at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
	at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1444)
	at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
	at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
	at org.apache.wicket.Component.renderComponent(Component.java:2686)
	at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
	at org.apache.wicket.Component.render(Component.java:2517)
	at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
	at org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73)
	at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
	at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1444)
	at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
	at org.apache.wicket.Page.onRender(Page.java:1575)
	at org.apache.wicket.Component.render(Component.java:2517)
	at org.apache.wicket.Page.renderPage(Page.java:913)
	at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
	at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
	at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
	at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
	at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
	at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
	at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
	at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)
	at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:70)
	at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:70)
	at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
	at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
	at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
	at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
	at org.geoserver.security.filter.GeoServerUserNamePasswordAuthenticationFilter.doFilter(GeoServerUserNamePasswordAuthenticationFilter.java:115)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
	at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)
	at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)
	at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.lang.SerializationException: java.lang.ClassNotFoundException: org.geoserver.wfs.WFSInfo$Version
	at org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:166)
	at org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:193)
	at org.apache.commons.lang.SerializationUtils.clone(SerializationUtils.java:81)
	at org.geoserver.catalog.impl.ModificationProxyCloner.clone(ModificationProxyCloner.java:117)
	at org.geoserver.catalog.impl.ModificationProxyCloner.cloneMap(ModificationProxyCloner.java:220)
	at org.geoserver.catalog.impl.ModificationProxy.invoke(ModificationProxy.java:122)
	at com.sun.proxy.$Proxy104.getGML(Unknown Source)
	at org.geoserver.wfs.web.WFSAdminPage$1.load(WFSAdminPage.java:73)
	at org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:120)
	at org.apache.wicket.model.CompoundPropertyModel.getObject(CompoundPropertyModel.java:64)
	at org.apache.wicket.model.AbstractPropertyModel.getTarget(AbstractPropertyModel.java:193)
	at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:114)
	at org.apache.wicket.Component.getDefaultModelObject(Component.java:1720)
	at org.apache.wicket.markup.html.form.FormComponent.getModelObject(FormComponent.java:1670)
	at org.apache.wicket.markup.html.form.AbstractSingleSelectChoice.getModelValue(AbstractSingleSelectChoice.java:162)
	at org.apache.wicket.markup.html.form.FormComponent.getValue(FormComponent.java:896)
	at org.apache.wicket.markup.html.form.AbstractChoice.onComponentTagBody(AbstractChoice.java:353)
	at org.apache.wicket.Component.renderComponent(Component.java:2686)
	... 160 more
Caused by: java.lang.ClassNotFoundException: org.geoserver.wfs.WFSInfo$Version
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:270)
	at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:625)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
	at java.io.ObjectInputStream.readEnum(ObjectInputStream.java:1725)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
	at org.apache.commons.lang.SerializationUtils.deserialize(SerializationUtils.java:163)
	... 177 more

 

Investigando por ahí vi que al parecer es un conflicto entre las versiones de las librerías commons-lang que vienen con el TomEE y las que trae la aplicación Geoserver. Por lo pronto migré al servidor de aplicaciones Tomcat, que aunque no es un servidor JEE  completo me sirve por el momento.

Si alguien tiene la forma de solucionar este problema, bienvenida la solución.

¡Saludos!