Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghijklm.db.entity.RefOnlineShop]
- <!-- Hibernate library -->
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-core</artifactId>
- <version>4.2.0.Final</version>
- </dependency>
- <?xml version='1.0' encoding='utf-8'?>
- <!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
- <hibernate-configuration>
- <session-factory name="sessionFactory">
- <!-- Database connection settings -->
- <property name="connection.driver_class">org.postgresql.Driver</property>
- <property name="connection.url">jdbc:postgresql://localhost:5432/mydb</property>
- <property name="connection.username">myname</property>
- <property name="connection.password">mypwd</property>
- <!-- JDBC connection pool (use the built-in) -->
- <property name="connection.pool_size">1</property>
- <!-- SQL dialect -->
- <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
- <!-- Enable Hibernate's automatic session context management -->
- <property name="current_session_context_class">thread</property>
- <!-- Disable the second-level cache -->
- <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
- <!-- Echo all executed SQL to stdout -->
- <property name="show_sql">true</property>
- <property name="hbm2ddl.auto">validate</property>
- </session-factory>
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
- <hibernate-reverse-engineering>
- <type-mapping>
- <!-- jdbc-type is name for java.sql.Types -->
- <sql-type jdbc-type="BIT" not-null="true" hibernate-type="Boolean" />
- </type-mapping>
- <table-filter match-schema="public" package="de.otto.dacapoi.db.entity" match-name="ref_online_shop" />
- <table-filter match-schema="public" package="de.otto.dacapoi.db.entity" match-name="ref_company" />
- <table schema="public" name="ref_online_shop">
- <primary-key>
- <generator class="sequence-identity">
- <param name="sequence">ref_online_shop_id_seq</param>
- </generator>
- </primary-key>
- </table>
- <table schema="public" name="ref_company">
- <primary-key>
- <generator class="sequence-identity">
- <param name="sequence">ref_company_id_seq</param>
- </generator>
- </primary-key>
- </table>
- </hibernate-reverse-engineering>
- CREATE TABLE public.ref_online_shop
- (
- id bigint NOT NULL DEFAULT nextval('ref_online_shop_id_seq'::regclass),
- name character varying COLLATE pg_catalog."default" NOT NULL,
- company_id bigint NOT NULL,
- valid boolean NOT NULL DEFAULT true,
- CONSTRAINT ref_online_shop_pk PRIMARY KEY (id)
- )
- CREATE TABLE public.ref_company
- (
- id bigint NOT NULL DEFAULT nextval('ref_company_id_seq'::regclass),
- name character varying COLLATE pg_catalog."default" NOT NULL,
- short_name character varying COLLATE pg_catalog."default" NOT NULL,
- country_id bigint NOT NULL,
- cdef_group boolean NOT NULL,
- domains character varying COLLATE pg_catalog."default" NOT NULL,
- valid boolean NOT NULL DEFAULT true,
- CONSTRAINT ref_company_pk PRIMARY KEY (id)
- )
- <!-- Session Factory Declaration -->
- <bean id="SessionFactory"
- class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
- <property name="dataSource" ref="DataSource" />
- <property name="annotatedClasses">
- <list>
- ...
- <value>de.otto.dacapoi.db.entity.RefCompany</value>
- <value>de.otto.dacapoi.db.entity.RefOnlineShop</value>
- <!-- add new entity here -->
- </list>
- </property>
- <property name="hibernateProperties">
- <props>
- <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
- <prop key="hibernate.show_sql">false</prop>
- <!-- prop key="hibernate.current_session_context_class">thread</prop -->
- <prop key="hibernate.hbm2ddl.auto">validate</prop>
- <prop key="cache.provider_class">org.hibernate.cache.NoCacheProvider</prop>
- <prop key="hibernate.jdbc.batch_size">512</prop>
- <prop key="hibernate.generate_statistics">true</prop>
- </props>
- </property>
- </bean>
- <bean id="RefOnlineShopService"
- class="de.otto.dacapoi.service.data.ktable.impl.OnlineShopService">
- <property name="dao" ref="RefOnlineShopDAO" />
- </bean>
- <bean id="RefOnlineShopDAO" class="de.otto.dacapoi.db.dao.data.ktable.impl.OnlineShopDAO">
- <property name="sessionFactory" ref="SessionFactory" />
- </bean>
- <bean id="RefCompanyService" class="de.otto.dacapoi.service.data.ktable.impl.CompanyService">
- <property name="dao" ref="RefCompanyDAO" />
- </bean>
- <bean id="RefCompanyDAO" class="de.otto.dacapoi.db.dao.data.ktable.impl.CompanyDAO">
- <property name="sessionFactory" ref="SessionFactory" />
- </bean>
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmxExporter' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'hibernateStatisticsBean' while setting bean property 'beans' with key [TypedStringValue: value [Hibernate:application=Statistics], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateStatisticsBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'SessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghihklm.db.entity.RefOnlineShop]
- at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
- at java.lang.Thread.run(Unknown Source)
- Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateStatisticsBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'SessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghihklm.db.entity.RefOnlineShop]
- at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
- ... 26 more
- Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghihklm.db.entity.RefOnlineShop]
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
- ... 36 more
- Caused by: org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghihklm.db.entity.RefOnlineShop]
- at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:443)
- ... 43 more
- Aug 29, 2018 10:52:14 AM org.apache.catalina.core.StandardContext listenerStart
- SCHWERWIEGEND: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmxExporter' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'hibernateStatisticsBean' while setting bean property 'beans' with key [TypedStringValue: value [Hibernate:application=Statistics], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateStatisticsBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'SessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghihklm.db.entity.RefOnlineShop]
- at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
- Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateStatisticsBean' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'SessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghihklm.db.entity.RefOnlineShop]
- at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
- ... 26 more
- Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghihklm.db.entity.RefOnlineShop]
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
- ... 36 more
- Caused by: org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghihklm.db.entity.RefOnlineShop]
- at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:443)
- at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:455)
- at org.hibernate.cfg.VerifyFetchProfileReferenceSecondPass.doSecondPass(VerifyFetchProfileReferenceSecondPass.java:60)
- at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1593)
- at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.jav29 Aug 2018 10:52:14 [localhost-startStop-1] INFO [ApplicationStartupListener(contextInitialized : 41)] - DACAPO successfully started...do further initialization
- a:1350)
- at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
- at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1788)
- at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:189)
- at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:350)
- at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:335)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
- at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
- ... 43 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement