Hello,
I've been attempting to install GeoFence embedded plugin to Geoserver and
upon start up I receive some exceptions. I'm hoping someone might be able
to help. ;)
I am using:
Tomcat Version 7.0.78
Geoserver Version 2.9.1
The following are my steps that I took to install:
1. I downloaded GeoFence 2.9.x version from
http://ares.opengeo.org/geoserver/2.9.x/community-latest/. Which gave me
the zip named "geoserver-2.9-SNAPSHOT-geofence-server-plugin.zip"
2. I extracted the zip to /path/to/tomcat/webapps/geoserver/WEB-INF/lib.
Note: There are only jars within the zip.
3. I changed the permissions to the correct owner and used 664 access for
those. This step is because I am running a VM and used root to copy them
over. So I made sure I set the permissions back to the owner of tomcat.
4. Restart Tomcat.
Note during the copying over jars, I did overwrite cglib-nodep-2.2.jar
because it is within the zip.
I will post the full log snippet below, but the two exceptions I get are:
1. java.io.FileNotFoundException: for geofence-default-override.properties
2. org.springframework.beans.factory.BeanDefinitionStoreException - could
not resolve placeholder 'servicesUrl'.
I guess my first question is there anything else that should be done
besides dropping the jar files in the lib directory?
If anything else that should be done, please let me know.
Thank you,
-Harley
The following is the log snippet:
INFO: Deploying web application archive
/opt/apache-tomcat-7.0.78/webapps/geoserver.war
Sep 25, 2017 4:42:13 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable
debug logging for this logger for a complete list of JARs that were scanned
but no TLDs were found in them. Skipping unneeded JARs during scanning can
improve startup time and JSP compilation time.
25 Sep 16:42:14 DEBUG [geoserver.global] - Found Java environment variable
GEOSERVER_DATA_DIR to be unset
25 Sep 16:42:14 DEBUG [geoserver.global] - Found Servlet context parameter
GEOSERVER_DATA_DIR to be unset
25 Sep 16:42:14 DEBUG [geoserver.global] - Found System environment
variable GEOSERVER_DATA_DIR to be unset
25 Sep 16:42:14 DEBUG [geoserver.global] - Found Java environment variable
GEOSERVER_DATA_ROOT to be unset
25 Sep 16:42:14 DEBUG [geoserver.global] - Found Servlet context parameter
GEOSERVER_DATA_ROOT to be unset
25 Sep 16:42:14 DEBUG [geoserver.global] - Found System environment
variable GEOSERVER_DATA_ROOT to be unset
25 Sep 16:42:14 INFO [geoserver.global] - Falling back to embedded data
directory: /var/opt/tomcat/webapps/geoserver/data
Sep 25, 2017 4:42:15 PM org.geoserver.platform.GeoServerExtensions
checkContext
WARNING: Extension lookup 'XStreamPersisterInitializer', but
ApplicationContext is unset.
Sep 25, 2017 4:42:15 PM org.geoserver.platform.GeoServerExtensions
checkContext
WARNING: Extension lookup 'ExtensionFilter', but ApplicationContext is
unset.
Sep 25, 2017 4:42:15 PM org.geoserver.platform.GeoServerExtensions
checkContext
WARNING: Extension lookup 'ExtensionProvider', but ApplicationContext is
unset.
Sep 25, 2017 4:42:15 PM org.geoserver.platform.GeoServerExtensions
checkContext
WARNING: Extension lookup 'ExtensionFilter', but ApplicationContext is
unset.
log4j:WARN File option not set for appender [geoserverlogfile].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
25 Sep 16:42:18 INFO [geoserver.global] - Falling back to embedded data
directory: /var/opt/tomcat/webapps/geoserver/data
25 Sep 16:42:18 INFO [geoserver.global] - Falling back to embedded data
directory: /var/opt/tomcat/webapps/geoserver/data
25 Sep 16:42:18 WARN [geoserver.config] - Error reading resource URL
[jar:file:/opt/apache-tomcat-7.0.78/webapps/geoserver/WEB-INF/lib/gs-geofence-server-2.9-SNAPSHOT.jar!/geofence-default-override.properties]
java.io.FileNotFoundException: URL
[jar:file:/opt/apache-tomcat-7.0.78/webapps/geoserver/WEB-INF/lib/gs-geofence-server-2.9-SNAPSHOT.jar!/geofence-default-override.properties]
cannot be resolved to absolute file path because it does not reside in the
file system:
jar:file:/opt/apache-tomcat-7.0.78/webapps/geoserver/WEB-INF/lib/gs-geofence-server-2.9-SNAPSHOT.jar!/geofence-default-override.properties
at org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:218)
at
org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:52)
at org.springframework.core.io.UrlResource.getFile(UrlResource.java:212)
at
org.geoserver.config.SpringResourceAdaptor.relative(SpringResourceAdaptor.java:40)
at
org.geoserver.config.GeoServerPropertyOverrideConfigurer.setLocations(GeoServerPropertyOverrideConfigurer.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.springframework.beans.BeanWrapperImpl$BeanPropertyHandler.setValue(BeanWrapperImpl.java:346)
at
org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:454)
at
org.springframework.beans.AbstractNestablePropertyAccessor.setPropertyValue(AbstractNestablePropertyAccessor.java:280)
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:95)
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1514)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1226)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:154)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:520)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at
org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:23)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
25 Sep 16:42:18 INFO [config.GeoFencePropertyPlaceholderConfigurer] -
Loading properties file from
org.geoserver.config.SpringResourceAdaptor@4196b72f
25 Sep 16:42:18 WARN [config.PropertyOverrideConfigurer] - Could not load
properties from URL
[file:${geofence.dir}/geofence-datasource-ovr.properties]:
${geofence.dir}/geofence-datasource-ovr.properties (No such file or
directory)
25 Sep 16:42:18 INFO [config.GeoServerPropertyOverrideConfigurer] - Loading
properties file from URL
[jar:file:/opt/apache-tomcat-7.0.78/webapps/geoserver/WEB-INF/lib/gs-geofence-server-2.9-SNAPSHOT.jar!/geofence-default-override.properties]
25 Sep 16:42:18 INFO [config.GeoServerPropertyOverrideConfigurer] - Loading
properties file from org.geoserver.config.SpringResourceAdaptor@10d7f443
25 Sep 16:42:18 INFO [config.GeoServerPropertyOverrideConfigurer] - Loading
properties file from org.geoserver.config.SpringResourceAdaptor@4f8e2cc8
25 Sep 16:42:18 WARN [support.XmlWebApplicationContext] - Exception
encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid
bean definition with name 'geofenceConfigurationManager' defined in URL
[jar:file:/opt/apache-tomcat-7.0.78/webapps/geoserver/WEB-INF/lib/gs-geofence-2.9-SNAPSHOT.jar!/applicationContext.xml]:
Could not resolve placeholder 'servicesUrl' in string value
"${servicesUrl}"; nested exception is java.lang.IllegalArgumentException:
Could not resolve placeholder 'servicesUrl' in string value "${servicesUrl}"
25 Sep 16:42:18 ERROR [context.ContextLoader] - Context initialization
failed
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid
bean definition with name 'geofenceConfigurationManager' defined in URL
[jar:file:/opt/apache-tomcat-7.0.78/webapps/geoserver/WEB-INF/lib/gs-geofence-2.9-SNAPSHOT.jar!/applicationContext.xml]:
Could not resolve placeholder 'servicesUrl' in string value
"${servicesUrl}"; nested exception is java.lang.IllegalArgumentException:
Could not resolve placeholder 'servicesUrl' in string value "${servicesUrl}"
at
org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:211)
at
org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties(PropertySourcesPlaceholderConfigurer.java:177)
at
org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:152)
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:284)
at
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:166)
at
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:520)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at
org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:23)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: Could not resolve
placeholder 'servicesUrl' in string value "${servicesUrl}"
at
org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)
at
org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
at
org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:204)
at
org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:178)
at
org.springframework.context.support.PropertySourcesPlaceholderConfigurer$2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:172)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:282)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:204)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:141)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:82)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:172)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:141)
at
org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:82)
at
org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:208)
... 23 more
Sep 25, 2017 4:42:18 PM org.apache.catalina.core.StandardContext
startInternal
SEVERE: One or more listeners failed to start. Full details will be found
in the appropriate container log file
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/opt/apache-tomcat-7.0.78/webapps/geoserver/WEB-INF/lib/log4j-slf4j-impl-2.0.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/opt/apache-tomcat-7.0.78/webapps/geoserver/WEB-INF/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
ERROR StatusLogger Log4j2 could not find a logging implementation. Please
add log4j-core to the classpath. Using SimpleLogger to log to the console...
Sep 25, 2017 4:42:18 PM org.apache.catalina.core.StandardContext
startInternal
SEVERE: Context [/geoserver] startup failed due to previous errors
Sep 25, 2017 4:42:18 PM org.geoserver.GeoserverInitStartupListener
contextDestroyed
INFO: Beginning GeoServer cleanup sequence
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users