Hi everyone!
I have been stuck with this for the better part of a day already. I
am trying to use geofence with a nightly 10.x geoserver with JDBCConfig
and JDBCStore. Everything went fine until I unzipped the geofence war to
the webapps folder and restarted tomcat.
I get a java.lang.NoSuchMethodError telling me that
getSharedCacheMode does not exist when trying to load GeoFence after
unzipping geofence.war to tomcat8 webapps folder.
I tried different versions of geofence with the same results:
release-v3.2.1-geofence-war.zip
<http://ares.boundlessgeo.com/geofence/3.2.x/release-v3.2.1-geofence-war.zip>
geofence-3.2.x-latest-war.zip
<http://ares.boundlessgeo.com/geofence/3.2.x/geofence-3.2.x-latest-war.zip>
release-v3.1.0-geofence-war.zip
<http://ares.boundlessgeo.com/geofence/3.1.x/release-v3.1.0-geofence-war.zip>
geofence-master-latest-war.zip
<http://ares.boundlessgeo.com/geofence/master/geofence-master-latest-war.zip>
I have searched the web and it looks like it has something to do
with the JPA (Java Persistence API) version, and that JPA 2.0 is
required, and I have the following files in place:
/var/lib/tomcat8/webapps/geofence/WEB-INF/lib/search-jpa-hibernate-1.1.0.jar
/var/lib/tomcat8/webapps/geofence/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar
As of now I am clueless about how to fix this. Please help me out!
I have included what I think is the relevant error message below.
Best,
Daniel
*******************************
From catalina.out:
18:21:40,577 ERROR ContextLoader:351 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'geofenceEntityManagerFactory' defined in URL
[jar:file:/var/lib/tomcat8/webapps/geofence/WEB-INF/lib/geofence-persistence-3.3-SNAPSHOT.jar!/applicationContext-geofenceDatasource.xml]:
Invocation of init method failed; nested exception is
java.lang.NoSuchMethodError:
javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
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:197)
at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:829)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
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.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:939)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1812)
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:745)
Caused by: java.lang.NoSuchMethodError:
javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:636)
at
org.springframework.orm.jpa.vendor.SpringHibernateEjbPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateEjbPersistenceProvider.java:50)
at
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:319)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
... 25 more
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users