Postgisdialect not found despite having it in pom, lib and persistence.xml

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Postgisdialect not found despite having it in pom, lib and persistence.xml

One Sho
I have also posted the issue here:  http://stackoverflow.com/questions/17585916/postgis-dialect-not-found-despite-being-in-pom-xml-libs-and-in-persistence-xml.

One thing that i'm curious about is if  this line in the persistence.xml could be the problem : <provider>org.hibernate.ejb.HibernatePersistence</provider>



I am unable to use postgisDialect in my hibernate-spatial app. Below is the stacktrace
 

    [WARN] Failed startup of context com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload@177e923{/,C:\javawjhaty\projl\target\geomajas-puregwt-showcase-1.0.0-SNAPSHOT}
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'poiCategDAO': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext2.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:341)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
            at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
            at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
            at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
            at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
            at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
            at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.Server.doStart(Server.java:222)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
            at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
            at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
            at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
            at com.google.gwt.dev.DevMode.main(DevMode.java:311)
      
        Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext2.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.orm.jpa.EntityManagerFactoryUtils.findEntityManagerFactory(EntityManagerFactoryUtils.java:98)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:510)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:492)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:656)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:629)
            at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:338)
            ... 31 more
        Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:924)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
            at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:59)
            at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
            at org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:92)
            at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
            ... 45 more
        Caused by: org.hibernate.HibernateException: Dialect class not found: org.hibernate.dialect.postgis.PostgisDialect
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:76)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:64)
            at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:146)
            at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
            at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1797)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1755)
            at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
            ... 52 more
        Caused by: org.hibernate.service.classloading.spi.ClassLoadingException: Unable to load class [org.hibernate.dialect.postgis.PostgisDialect]
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:149)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)
            ... 61 more
        Caused by: java.lang.ClassNotFoundException: Could not load requested class : org.hibernate.dialect.postgis.PostgisDialect
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:296)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:247)
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:146)
            ... 62 more
           [WARN] Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'poiCategDAO': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext2.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory:
        java.lang.ClassNotFoundException: Could not load requested class : org.hibernate.dialect.postgis.PostgisDialect
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:296)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:247)
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:146)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:64)
            at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:146)
            at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
            at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1797)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1755)
            at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
            at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:59)
            at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
            at org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:92)
            at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.orm.jpa.EntityManagerFactoryUtils.findEntityManagerFactory(EntityManagerFactoryUtils.java:98)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:510)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:492)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:656)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:629)
            at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:338)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
            at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
            at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
            at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
            at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
            at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
            at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.Server.doStart(Server.java:222)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
            at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
            at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
            at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
            at com.google.gwt.dev.DevMode.main(DevMode.java:311)

My persistence.xml. Also i am curious why  there is no need to define classes in the persistence.xml but that is the last of my concerns right now


    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
        version="2.0">
   
        <persistence-unit name="ProjPUnit"
            transaction-type="RESOURCE_LOCAL">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
   
            <properties>
                <property name="hibernate.hbm2ddl.auto" value="update" />
                <property name="hibernate.show_sql" value="true" />
               
                <!-- H2 DB -->
                <property name="hibernate.dialect" value="org.hibernate.dialect.postgis.PostgisDialect" />
                <property name="hibernate.connection.driver_class" value="org.postgresql.Driver" />
                <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5440/app" />
                <property name="hibernate.connection.username" value="postgres" />
                <property name="hibernate.connection.password" value="123456" />
   
                <property name="hibernate.c3p0.min_size" value="5" />
                <property name="hibernate.c3p0.max_size" value="20" />
                <property name="hibernate.c3p0.timeout" value="300" />
                <property name="hibernate.c3p0.max_statements" value="50" />
                <property name="hibernate.c3p0.idle_test_period" value="3000" />
            </properties>
        </persistence-unit>
    </persistence>

The pom.xml


                 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  
        <modelVersion>4.0.0</modelVersion>
        <groupId>ne</groupId>
        <artifactId>projl</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <packaging>war</packaging>
        <name>TApp</name>
        <description>Test</description>
        <url>http://www.example.com/</url>
   
        <dependencyManagement>
            <dependencies>
    <!-- nothing -->
            </dependencies>
        </dependencyManagement>
   
        <dependencies>
            <dependency>
                <groupId>hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>1.8.0.1</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
                <version>2.9.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.2</version>
                <scope>compile</scope>
            </dependency>
   
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
   
   
   
    <!-- xt-->
   
   
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-spatial</artifactId>
                <version>4.0-M1</version>
            </dependency>
   
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.2.2.Final</version>
        </dependency>
        <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.2.2.Final</version>
    </dependency>
   
    <!-- xt -->           
            <dependency>
                <groupId>org.postgis</groupId>
                <artifactId>postgis-jdbc</artifactId>
                 <version>1.5.2</version> 
            </dependency>
            <dependency>
                <groupId>postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>8.4-702.jdbc3</version>
            </dependency>
            <dependency>
                <groupId>com.jolbox</groupId>
                <artifactId>bonecp</artifactId>
                <version>0.7.1-rc3</version>
            </dependency>
   
            <!-- Google dependencies -->
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-user</artifactId>
                <version>${gwt-version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-servlet</artifactId>
                <version>${gwt-version}</version>
                <scope>runtime</scope>
            </dependency>
   
            <!-- External GWT libraries -->
            <dependency>
                <groupId>com.google.code.gwt-dnd</groupId>
                <artifactId>gwt-dnd</artifactId>
                <version>3.1.0</version>
            </dependency>
   
            <!-- logging dependencies, delegate all to slf4j and use logback -->
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.1.1</version>
            </dependency>
   
            <!-- SLF4J -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.6.6</version>
            </dependency>
   
            <!-- Apache log4j -->
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
            </dependency>
           
   
                <dependency>
                <groupId>org.spring4gwt</groupId>
                <artifactId>spring4gwt</artifactId>
                <version>0.0.1</version>
                <scope>system</scope>
                <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/spring4gwt-0.0.1.jar</systemPath>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
                <version>2.12.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-server</artifactId>
                <version>2.12.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
   
        <build>
            <plugins>
   
               
   
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>2.5.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-user</artifactId>
                            <version>${gwt-version}</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-dev</artifactId>
                            <version>${gwt-version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <module>ne.projl.Appm</module>
                        <runTarget>index.html</runTarget>
                        <disableCastChecking>true</disableCastChecking>
                        <disableClassMetadata>true</disableClassMetadata>
                        <extraJvmArgs>-Xmx1024M -Xss1024k</extraJvmArgs>
                        <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
                        <copyWebapp>true</copyWebapp>
                    </configuration>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>clean</id>
                            <phase>clean</phase>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
   
    <!--        
            </plugins>
        </build>
   
        <profiles>
            <!-- m2eclipse with embedded jetty -->
            <profile>
                <id>m2e</id>
                <activation>
                    <property>
                        <name>m2e.version</name>
                    </property>
                </activation>
                <dependencies>
                    <dependency>
                        <groupId>org.geomajas</groupId>
                        <artifactId>geomajas-jetty-runner</artifactId>
                        <version>1.0.0</version>
                    </dependency>
                    <dependency>
                        <groupId>com.google.gwt</groupId>
                        <artifactId>gwt-dev</artifactId>
                        <version>${gwt-version}</version>
                        <scope>provided</scope>
                    </dependency>
                </dependencies>
                <properties>
                    <gwt.compiler.skip>true</gwt.compiler.skip>
                </properties>
            </profile>
            <profile>
                <id>skipGwt</id>
                <activation>
                    <property>
                        <name>skipGwt</name>
                    </property>
                </activation>
                <properties>
                    <gwt.compiler.skip>true</gwt.compiler.skip>
                </properties>
            </profile>
   
            <profile>
                <id>selenium-tests</id>
                <activation>
                    <property>
                        <name>!skipSelenium</name>
                    </property>
                </activation>
                <build>
                    <plugins>
                        <!-- Run the application using "mvn jetty:run" -->
   
                    </plugins>
                </build>
            </profile>
        </profiles>
   
    <repositories>
            <repository>
                <id>Geomajas</id>
                <name>Geomajas repository</name>
                <url>http://maven.geomajas.org/</url>
            </repository>
   
            <!-- uncomment if you want to use Geomajas snapshots, comment for faster builds -->
             
            <repository>
                <id>Geomajas-latest</id>
                <name>Geomajas snapshot repository</name>
                <url>http://apps.geomajas.org/nexus/content/groups/latest</url>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
             
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>Geomajas</id>
                <name>Geomajas repository</name>
                <url>http://maven.geomajas.org/</url>
            </pluginRepository>
        </pluginRepositories>
       
        <properties>
            <gwt-version>2.5.1</gwt-version>
            <gwt.compiler.skip>false</gwt.compiler.skip>
            <springframeworkVersion>3.0.5.RELEASE</springframeworkVersion>
    <!--         <basedir></basedir> -->
        </properties>
   
    </project>


_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Postgisdialect not found despite having it in pom, lib and persistence.xml

jan.demoerloose
The full class name is org.hibernate.spatial.dialect.postgis.PostgisDialect.
On 11/07/2013 8:40, One Sho wrote:

One thing that i'm curious about is if  this line in the persistence.xml could be the problem : <provider>org.hibernate.ejb.HibernatePersistence</provider>



I am unable to use postgisDialect in my hibernate-spatial app. Below is the stacktrace
 

    [WARN] Failed startup of context com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload@177e923{/,C:\javawjhaty\projl\target\geomajas-puregwt-showcase-1.0.0-SNAPSHOT}
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'poiCategDAO': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext2.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:341)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
            at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
            at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
            at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
            at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
            at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
            at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.Server.doStart(Server.java:222)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
            at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
            at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
            at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
            at com.google.gwt.dev.DevMode.main(DevMode.java:311)
      
        Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext2.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.orm.jpa.EntityManagerFactoryUtils.findEntityManagerFactory(EntityManagerFactoryUtils.java:98)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:510)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:492)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:656)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:629)
            at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:338)
            ... 31 more
        Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:924)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
            at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:59)
            at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
            at org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:92)
            at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
            ... 45 more
        Caused by: org.hibernate.HibernateException: Dialect class not found: org.hibernate.dialect.postgis.PostgisDialect
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:76)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:64)
            at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:146)
            at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
            at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1797)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1755)
            at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
            ... 52 more
        Caused by: org.hibernate.service.classloading.spi.ClassLoadingException: Unable to load class [org.hibernate.dialect.postgis.PostgisDialect]
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:149)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)
            ... 61 more
        Caused by: java.lang.ClassNotFoundException: Could not load requested class : org.hibernate.dialect.postgis.PostgisDialect
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:296)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:247)
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:146)
            ... 62 more
           [WARN] Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'poiCategDAO': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext2.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory:
        java.lang.ClassNotFoundException: Could not load requested class : org.hibernate.dialect.postgis.PostgisDialect
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:296)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:247)
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:146)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:64)
            at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:146)
            at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
            at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1797)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1755)
            at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
            at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:59)
            at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
            at org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:92)
            at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.orm.jpa.EntityManagerFactoryUtils.findEntityManagerFactory(EntityManagerFactoryUtils.java:98)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:510)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:492)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:656)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:629)
            at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:338)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
            at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
            at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
            at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
            at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
            at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
            at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.Server.doStart(Server.java:222)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
            at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
            at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
            at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
            at com.google.gwt.dev.DevMode.main(DevMode.java:311)

My persistence.xml. Also i am curious why  there is no need to define classes in the persistence.xml but that is the last of my concerns right now


    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
        version="2.0">
   
        <persistence-unit name="ProjPUnit"
            transaction-type="RESOURCE_LOCAL">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
   
            <properties>
                <property name="hibernate.hbm2ddl.auto" value="update" />
                <property name="hibernate.show_sql" value="true" />
               
                <!-- H2 DB -->
                <property name="hibernate.dialect" value="org.hibernate.dialect.postgis.PostgisDialect" />
                <property name="hibernate.connection.driver_class" value="org.postgresql.Driver" />
                <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5440/app" />
                <property name="hibernate.connection.username" value="postgres" />
                <property name="hibernate.connection.password" value="123456" />
   
                <property name="hibernate.c3p0.min_size" value="5" />
                <property name="hibernate.c3p0.max_size" value="20" />
                <property name="hibernate.c3p0.timeout" value="300" />
                <property name="hibernate.c3p0.max_statements" value="50" />
                <property name="hibernate.c3p0.idle_test_period" value="3000" />
            </properties>
        </persistence-unit>
    </persistence>

The pom.xml


                 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  
        <modelVersion>4.0.0</modelVersion>
        <groupId>ne</groupId>
        <artifactId>projl</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <packaging>war</packaging>
        <name>TApp</name>
        <description>Test</description>
        <url>http://www.example.com/</url>
   
        <dependencyManagement>
            <dependencies>
    <!-- nothing -->
            </dependencies>
        </dependencyManagement>
   
        <dependencies>
            <dependency>
                <groupId>hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>1.8.0.1</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
                <version>2.9.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.2</version>
                <scope>compile</scope>
            </dependency>
   
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
   
   
   
    <!-- xt-->
   
   
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-spatial</artifactId>
                <version>4.0-M1</version>
            </dependency>
   
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.2.2.Final</version>
        </dependency>
        <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.2.2.Final</version>
    </dependency>
   
    <!-- xt -->           
            <dependency>
                <groupId>org.postgis</groupId>
                <artifactId>postgis-jdbc</artifactId>
                 <version>1.5.2</version> 
            </dependency>
            <dependency>
                <groupId>postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>8.4-702.jdbc3</version>
            </dependency>
            <dependency>
                <groupId>com.jolbox</groupId>
                <artifactId>bonecp</artifactId>
                <version>0.7.1-rc3</version>
            </dependency>
   
            <!-- Google dependencies -->
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-user</artifactId>
                <version>${gwt-version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-servlet</artifactId>
                <version>${gwt-version}</version>
                <scope>runtime</scope>
            </dependency>
   
            <!-- External GWT libraries -->
            <dependency>
                <groupId>com.google.code.gwt-dnd</groupId>
                <artifactId>gwt-dnd</artifactId>
                <version>3.1.0</version>
            </dependency>
   
            <!-- logging dependencies, delegate all to slf4j and use logback -->
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.1.1</version>
            </dependency>
   
            <!-- SLF4J -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.6.6</version>
            </dependency>
   
            <!-- Apache log4j -->
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
            </dependency>
           
   
                <dependency>
                <groupId>org.spring4gwt</groupId>
                <artifactId>spring4gwt</artifactId>
                <version>0.0.1</version>
                <scope>system</scope>
                <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/spring4gwt-0.0.1.jar</systemPath>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
                <version>2.12.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-server</artifactId>
                <version>2.12.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
   
        <build>
            <plugins>
   
               
   
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>2.5.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-user</artifactId>
                            <version>${gwt-version}</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-dev</artifactId>
                            <version>${gwt-version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <module>ne.projl.Appm</module>
                        <runTarget>index.html</runTarget>
                        <disableCastChecking>true</disableCastChecking>
                        <disableClassMetadata>true</disableClassMetadata>
                        <extraJvmArgs>-Xmx1024M -Xss1024k</extraJvmArgs>
                        <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
                        <copyWebapp>true</copyWebapp>
                    </configuration>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>clean</id>
                            <phase>clean</phase>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
   
    <!--        
            </plugins>
        </build>
   
        <profiles>
            <!-- m2eclipse with embedded jetty -->
            <profile>
                <id>m2e</id>
                <activation>
                    <property>
                        <name>m2e.version</name>
                    </property>
                </activation>
                <dependencies>
                    <dependency>
                        <groupId>org.geomajas</groupId>
                        <artifactId>geomajas-jetty-runner</artifactId>
                        <version>1.0.0</version>
                    </dependency>
                    <dependency>
                        <groupId>com.google.gwt</groupId>
                        <artifactId>gwt-dev</artifactId>
                        <version>${gwt-version}</version>
                        <scope>provided</scope>
                    </dependency>
                </dependencies>
                <properties>
                    <gwt.compiler.skip>true</gwt.compiler.skip>
                </properties>
            </profile>
            <profile>
                <id>skipGwt</id>
                <activation>
                    <property>
                        <name>skipGwt</name>
                    </property>
                </activation>
                <properties>
                    <gwt.compiler.skip>true</gwt.compiler.skip>
                </properties>
            </profile>
   
            <profile>
                <id>selenium-tests</id>
                <activation>
                    <property>
                        <name>!skipSelenium</name>
                    </property>
                </activation>
                <build>
                    <plugins>
                        <!-- Run the application using "mvn jetty:run" -->
   
                    </plugins>
                </build>
            </profile>
        </profiles>
   
    <repositories>
            <repository>
                <id>Geomajas</id>
                <name>Geomajas repository</name>
                <url>http://maven.geomajas.org/</url>
            </repository>
   
            <!-- uncomment if you want to use Geomajas snapshots, comment for faster builds -->
             
            <repository>
                <id>Geomajas-latest</id>
                <name>Geomajas snapshot repository</name>
                <url>http://apps.geomajas.org/nexus/content/groups/latest</url>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
             
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>Geomajas</id>
                <name>Geomajas repository</name>
                <url>http://maven.geomajas.org/</url>
            </pluginRepository>
        </pluginRepositories>
       
        <properties>
            <gwt-version>2.5.1</gwt-version>
            <gwt.compiler.skip>false</gwt.compiler.skip>
            <springframeworkVersion>3.0.5.RELEASE</springframeworkVersion>
    <!--         <basedir></basedir> -->
        </properties>
   
    </project>



_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users


_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users
Reply | Threaded
Open this post in threaded view
|

Re: Postgisdialect not found despite having it in pom, lib and persistence.xml

One Sho
Nice to bump into you Jan.  Thank you, problem solved.



From: Jan De Moerloose <[hidden email]>
To: [hidden email]
Sent: Thursday, 11 July 2013, 09:02
Subject: Re: [hibernatespatial-users] Postgisdialect not found despite having it in pom, lib and persistence.xml

The full class name is org.hibernate.spatial.dialect.postgis.PostgisDialect.
On 11/07/2013 8:40, One Sho wrote:

One thing that i'm curious about is if  this line in the persistence.xml could be the problem : <provider>org.hibernate.ejb.HibernatePersistence</provider>



I am unable to use postgisDialect in my hibernate-spatial app. Below is the stacktrace
 

    [WARN] Failed startup of context com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload@177e923{/,C:\javawjhaty\projl\target\geomajas-puregwt-showcase-1.0.0-SNAPSHOT}
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'poiCategDAO': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext2.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:341)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
            at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
            at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
            at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
            at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
            at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
            at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.Server.doStart(Server.java:222)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
            at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
            at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
            at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
            at com.google.gwt.dev.DevMode.main(DevMode.java:311)
      
        Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext2.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.orm.jpa.EntityManagerFactoryUtils.findEntityManagerFactory(EntityManagerFactoryUtils.java:98)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:510)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:492)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:656)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:629)
            at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:338)
            ... 31 more
        Caused by: javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:924)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
            at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:59)
            at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
            at org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:92)
            at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
            ... 45 more
        Caused by: org.hibernate.HibernateException: Dialect class not found: org.hibernate.dialect.postgis.PostgisDialect
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:76)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:64)
            at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:146)
            at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
            at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1797)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1755)
            at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
            ... 52 more
        Caused by: org.hibernate.service.classloading.spi.ClassLoadingException: Unable to load class [org.hibernate.dialect.postgis.PostgisDialect]
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:149)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)
            ... 61 more
        Caused by: java.lang.ClassNotFoundException: Could not load requested class : org.hibernate.dialect.postgis.PostgisDialect
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:296)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:247)
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:146)
            ... 62 more
           [WARN] Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'poiCategDAO': Injection of persistence dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext2.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: ProjPUnit] Unable to build EntityManagerFactory:
        java.lang.ClassNotFoundException: Could not load requested class : org.hibernate.dialect.postgis.PostgisDialect
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader.findClass(ClassLoaderServiceImpl.java:296)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:247)
            at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:146)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.constructDialect(DialectFactoryImpl.java:73)
            at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:64)
            at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:146)
            at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
            at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
            at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1797)
            at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1755)
            at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
            at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
            at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:59)
            at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63)
            at org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:92)
            at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.orm.jpa.EntityManagerFactoryUtils.findEntityManagerFactory(EntityManagerFactoryUtils.java:98)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findNamedEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:510)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findEntityManagerFactory(PersistenceAnnotationBeanPostProcessor.java:492)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.resolveEntityManager(PersistenceAnnotationBeanPostProcessor.java:656)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor$PersistenceElement.getResourceToInject(PersistenceAnnotationBeanPostProcessor.java:629)
            at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
            at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
            at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessPropertyValues(PersistenceAnnotationBeanPostProcessor.java:338)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
            at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
            at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
            at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
            at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
            at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
            at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
            at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
            at org.mortbay.jetty.Server.doStart(Server.java:222)
            at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
            at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
            at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
            at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1093)
            at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:836)
            at com.google.gwt.dev.DevMode.main(DevMode.java:311)

My persistence.xml. Also i am curious why  there is no need to define classes in the persistence.xml but that is the last of my concerns right now


    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
        version="2.0">
   
        <persistence-unit name="ProjPUnit"
            transaction-type="RESOURCE_LOCAL">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
   
            <properties>
                <property name="hibernate.hbm2ddl.auto" value="update" />
                <property name="hibernate.show_sql" value="true" />
               
                <!-- H2 DB -->
                <property name="hibernate.dialect" value="org.hibernate.dialect.postgis.PostgisDialect" />
                <property name="hibernate.connection.driver_class" value="org.postgresql.Driver" />
                <property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5440/app" />
                <property name="hibernate.connection.username" value="postgres" />
                <property name="hibernate.connection.password" value="123456" />
   
                <property name="hibernate.c3p0.min_size" value="5" />
                <property name="hibernate.c3p0.max_size" value="20" />
                <property name="hibernate.c3p0.timeout" value="300" />
                <property name="hibernate.c3p0.max_statements" value="50" />
                <property name="hibernate.c3p0.idle_test_period" value="3000" />
            </properties>
        </persistence-unit>
    </persistence>

The pom.xml


                 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  
        <modelVersion>4.0.0</modelVersion>
        <groupId>ne</groupId>
        <artifactId>projl</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <packaging>war</packaging>
        <name>TApp</name>
        <description>Test</description>
        <url>http://www.example.com/</url>
   
        <dependencyManagement>
            <dependencies>
    <!-- nothing -->
            </dependencies>
        </dependencyManagement>
   
        <dependencies>
            <dependency>
                <groupId>hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>1.8.0.1</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
                <version>2.9.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.2</version>
                <scope>compile</scope>
            </dependency>
   
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-tx</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-orm</artifactId>
                <version>${springframeworkVersion}</version>
            </dependency>
   
   
   
    <!-- xt-->
   
   
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-spatial</artifactId>
                <version>4.0-M1</version>
            </dependency>
   
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>4.2.2.Final</version>
        </dependency>
        <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.2.2.Final</version>
    </dependency>
   
    <!-- xt -->           
            <dependency>
                <groupId>org.postgis</groupId>
                <artifactId>postgis-jdbc</artifactId>
                 <version>1.5.2</version> 
            </dependency>
            <dependency>
                <groupId>postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>8.4-702.jdbc3</version>
            </dependency>
            <dependency>
                <groupId>com.jolbox</groupId>
                <artifactId>bonecp</artifactId>
                <version>0.7.1-rc3</version>
            </dependency>
   
            <!-- Google dependencies -->
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-user</artifactId>
                <version>${gwt-version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt-servlet</artifactId>
                <version>${gwt-version}</version>
                <scope>runtime</scope>
            </dependency>
   
            <!-- External GWT libraries -->
            <dependency>
                <groupId>com.google.code.gwt-dnd</groupId>
                <artifactId>gwt-dnd</artifactId>
                <version>3.1.0</version>
            </dependency>
   
            <!-- logging dependencies, delegate all to slf4j and use logback -->
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.1.1</version>
            </dependency>
   
            <!-- SLF4J -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>1.6.6</version>
            </dependency>
   
            <!-- Apache log4j -->
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
            </dependency>
           
   
                <dependency>
                <groupId>org.spring4gwt</groupId>
                <artifactId>spring4gwt</artifactId>
                <version>0.0.1</version>
                <scope>system</scope>
                <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/spring4gwt-0.0.1.jar</systemPath>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
                <version>2.12.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-server</artifactId>
                <version>2.12.0</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
   
        <build>
            <plugins>
   
               
   
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>2.5.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-user</artifactId>
                            <version>${gwt-version}</version>
                        </dependency>
                        <dependency>
                            <groupId>com.google.gwt</groupId>
                            <artifactId>gwt-dev</artifactId>
                            <version>${gwt-version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <module>ne.projl.Appm</module>
                        <runTarget>index.html</runTarget>
                        <disableCastChecking>true</disableCastChecking>
                        <disableClassMetadata>true</disableClassMetadata>
                        <extraJvmArgs>-Xmx1024M -Xss1024k</extraJvmArgs>
                        <hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
                        <copyWebapp>true</copyWebapp>
                    </configuration>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>clean</id>
                            <phase>clean</phase>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
   
    <!--        
            </plugins>
        </build>
   
        <profiles>
            <!-- m2eclipse with embedded jetty -->
            <profile>
                <id>m2e</id>
                <activation>
                    <property>
                        <name>m2e.version</name>
                    </property>
                </activation>
                <dependencies>
                    <dependency>
                        <groupId>org.geomajas</groupId>
                        <artifactId>geomajas-jetty-runner</artifactId>
                        <version>1.0.0</version>
                    </dependency>
                    <dependency>
                        <groupId>com.google.gwt</groupId>
                        <artifactId>gwt-dev</artifactId>
                        <version>${gwt-version}</version>
                        <scope>provided</scope>
                    </dependency>
                </dependencies>
                <properties>
                    <gwt.compiler.skip>true</gwt.compiler.skip>
                </properties>
            </profile>
            <profile>
                <id>skipGwt</id>
                <activation>
                    <property>
                        <name>skipGwt</name>
                    </property>
                </activation>
                <properties>
                    <gwt.compiler.skip>true</gwt.compiler.skip>
                </properties>
            </profile>
   
            <profile>
                <id>selenium-tests</id>
                <activation>
                    <property>
                        <name>!skipSelenium</name>
                    </property>
                </activation>
                <build>
                    <plugins>
                        <!-- Run the application using "mvn jetty:run" -->
   
                    </plugins>
                </build>
            </profile>
        </profiles>
   
    <repositories>
            <repository>
                <id>Geomajas</id>
                <name>Geomajas repository</name>
                <url>http://maven.geomajas.org/</url>
            </repository>
   
            <!-- uncomment if you want to use Geomajas snapshots, comment for faster builds -->
             
            <repository>
                <id>Geomajas-latest</id>
                <name>Geomajas snapshot repository</name>
                <url>http://apps.geomajas.org/nexus/content/groups/latest</url>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
             
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>Geomajas</id>
                <name>Geomajas repository</name>
                <url>http://maven.geomajas.org/</url>
            </pluginRepository>
        </pluginRepositories>
       
        <properties>
            <gwt-version>2.5.1</gwt-version>
            <gwt.compiler.skip>false</gwt.compiler.skip>
            <springframeworkVersion>3.0.5.RELEASE</springframeworkVersion>
    <!--         <basedir></basedir> -->
        </properties>
   
    </project>



_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users


_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users



_______________________________________________
hibernatespatial-users mailing list
[hidden email]
http://www.hibernatespatial.org/cgi-bin/mailman/listinfo/hibernatespatial-users