[Geoserver-users] Geoserver want start after rebooting

I’ve just rebooted my Ubuntu 12.04.2 LTS server with TomCat7 and Geoserver 2.2.4 after installing some security patches for the system.

But now Geoserver want start anymore. When I look in catalina.out I see these errors:

INFO: validateJarFile(/var/lib/tomcat7/webapps/geoserver/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
log4j:WARN File option not set for appender [geoserverlogfile].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
27 Feb 09:29:03 WARN [config.CustomEditorConfigurer] - Passing PropertyEditor instances into CustomEditorConfigurer is deprecated: use PropertyEditorRegistrars or PropertyEditor class names instead.
Offending key [org.geotools.util.Version; offending editor instance: org.geoserver.platform.util.VersionPropertyEditor@anonymised.com
Feb 27, 2013 9:29:04 AM org.geoserver.platform.GeoServerExtensions checkContext
SEVERE: Extension lookup occured, but ApplicationContext is unset.

27 Feb 09:29:06 WARN [geotools.factory] - Can’t load a service for category “MathTransformProvider”. Cause is “ServiceConfigurationError: org.geotools.referencing.operation.MathTransformProvider:
Provider (…) Provider could not be instantiated: java.lang.NoClassDefFoundError: javax/media/jai/Warp”.

27 Feb 09:29:12 WARN [support.DisposableBeanAdapter] - Invocation of destroy method failed on bean with name ‘geoServerLoader’: org.springframework.beans.factory.BeanCreationNotAllowedException:
Error creating bean with name ‘GWCLifeCycleHandler’: Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
27 Feb 09:29:12 ERROR [context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcFacade’ defined in URL [jar:file:/var/lib/tomcat7/webapps/geoserver/WEB-INF/lib/gwc-2.2.4.jar!/applicationContext.xml]:
Cannot resolve reference to bean ‘gwcTLDispatcher’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘geoServer’
defined in URL [jar:file:/var/lib/tomcat7/webapps/geoserver/WEB-INF/lib/main-2.2.4.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/media/jai/TileCache
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:18)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
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:722)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘geoServer’ defined in URL [jar:file:/var/lib/tomcat7/webapps/geoserver/WEB-INF/lib/main-2.2.4.jar!/applicationContext.xml]:
Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/media/jai/TileCache
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
… 32 more
Caused by: java.lang.NoClassDefFoundError: javax/media/jai/TileCache
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
at java.lang.Class.getDeclaredMethod(Class.java:1954)
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.getMethod(SerializationMethodInvoker.java:127)
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.supportsReadObject(SerializationMethodInvoker.java:78)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter.isSerializable(SerializableConverter.java:81)
at com.thoughtworks.xstream.converters.reflection.SerializableConverter.canConvert(SerializableConverter.java:77)
at com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:60)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshallField(AbstractReflectionConverter.java:246)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doUnmarshal(AbstractReflectionConverter.java:218)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:162)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:76)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:60)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:137)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:33)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:923)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:909)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:861)
at org.geoserver.config.util.XStreamPersister.load(XStreamPersister.java:507)
at org.geoserver.config.GeoServerLoader.depersist(GeoServerLoader.java:730)
at org.geoserver.config.GeoServerLoader.readConfiguration(GeoServerLoader.java:607)
at org.geoserver.config.DefaultGeoServerLoader.loadGeoServer(DefaultGeoServerLoader.java:68)
at org.geoserver.config.GeoServerLoader.postProcessBeforeInitialization(GeoServerLoader.java:129)
at org.geoserver.config.GeoServerLoaderProxy.postProcessBeforeInitialization(GeoServerLoaderProxy.java:54)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
… 40 more
Caused by: java.lang.ClassNotFoundException: javax.media.jai.TileCache
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
… 69 more
Feb 27, 2013 9:29:12 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart

I have no idea what is going wrong and how I should fix this.

I thought it is always a good idea to install security patches but if these problems are the result I might better not update my system when it is working?

Thanks,

Paul

Paul Meems
Release manager, configuration manager
and forum moderator of MapWindow GIS.
www.mapwindow.org

Owner of MapWindow.nl - Support for
Dutch speaking users.
www.mapwindow.nl

On Wed, Feb 27, 2013 at 10:36 AM, Paul Meems <bontepaarden@anonymised.com> wrote:

I’ve just rebooted my Ubuntu 12.04.2 LTS server with TomCat7 and Geoserver 2.2.4 after installing some security patches for the system.

But now Geoserver want start anymore. When I look in catalina.out I see these errors:

INFO: validateJarFile(/var/lib/tomcat7/webapps/geoserver/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
log4j:WARN File option not set for appender [geoserverlogfile].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
27 Feb 09:29:03 WARN [config.CustomEditorConfigurer] - Passing PropertyEditor instances into CustomEditorConfigurer is deprecated: use PropertyEditorRegistrars or PropertyEditor class names instead.
Offending key [org.geotools.util.Version; offending editor instance: org.geoserver.platform.util.VersionPropertyEditor@anonymised.com
Feb 27, 2013 9:29:04 AM org.geoserver.platform.GeoServerExtensions checkContext
SEVERE: Extension lookup occured, but ApplicationContext is unset.

27 Feb 09:29:06 WARN [geotools.factory] - Can’t load a service for category “MathTransformProvider”. Cause is “ServiceConfigurationError: org.geotools.referencing.operation.MathTransformProvider:
Provider (…) Provider could not be instantiated: java.lang.NoClassDefFoundError: javax/media/jai/Warp”.

This suggests the JAI jar is no more in the classpath.
Here is a possible way to get there:

  • you installed native JAI in the JDK, and removed it from GeoServer
  • the JDK got upgraded, so the native JAI is no more installed into it, and it’s not in GeoServer either
    → boom

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Thanks Andrea,

Reinstalling native JAI again solved this issue.

After reading your explanation it makes sense, earlier I wouldn’t have thought about it :wink:

···


Paul

Paul Meems
Release manager, configuration manager
and forum moderator of MapWindow GIS.
www.mapwindow.org

Owner of MapWindow.nl - Support for
Dutch speaking users.
www.mapwindow.nl

2013/2/27 Andrea Aime <andrea.aime@anonymised.com>

On Wed, Feb 27, 2013 at 10:36 AM, Paul Meems <bontepaarden@anonymised.com> wrote:

I’ve just rebooted my Ubuntu 12.04.2 LTS server with TomCat7 and Geoserver 2.2.4 after installing some security patches for the system.

But now Geoserver want start anymore. When I look in catalina.out I see these errors:

INFO: validateJarFile(/var/lib/tomcat7/webapps/geoserver/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
log4j:WARN File option not set for appender [geoserverlogfile].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
27 Feb 09:29:03 WARN [config.CustomEditorConfigurer] - Passing PropertyEditor instances into CustomEditorConfigurer is deprecated: use PropertyEditorRegistrars or PropertyEditor class names instead.
Offending key [org.geotools.util.Version; offending editor instance: org.geoserver.platform.util.VersionPropertyEditor@anonymised.com
Feb 27, 2013 9:29:04 AM org.geoserver.platform.GeoServerExtensions checkContext
SEVERE: Extension lookup occured, but ApplicationContext is unset.

27 Feb 09:29:06 WARN [geotools.factory] - Can’t load a service for category “MathTransformProvider”. Cause is “ServiceConfigurationError: org.geotools.referencing.operation.MathTransformProvider:
Provider (…) Provider could not be instantiated: java.lang.NoClassDefFoundError: javax/media/jai/Warp”.

This suggests the JAI jar is no more in the classpath.
Here is a possible way to get there:

  • you installed native JAI in the JDK, and removed it from GeoServer
  • the JDK got upgraded, so the native JAI is no more installed into it, and it’s not in GeoServer either
    → boom

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it