Advertisement
Guest User

Untitled

a guest
Aug 29th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.94 KB | None | 0 0
  1. org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghijklm.db.entity.RefOnlineShop]
  2.  
  3. <!-- Hibernate library -->
  4.  
  5. <dependency>
  6. <groupId>org.hibernate</groupId>
  7. <artifactId>hibernate-core</artifactId>
  8. <version>4.2.0.Final</version>
  9. </dependency>
  10.  
  11. <?xml version='1.0' encoding='utf-8'?>
  12. <!DOCTYPE hibernate-configuration PUBLIC
  13. "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  14. "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
  15.  
  16. <hibernate-configuration>
  17. <session-factory name="sessionFactory">
  18. <!-- Database connection settings -->
  19. <property name="connection.driver_class">org.postgresql.Driver</property>
  20. <property name="connection.url">jdbc:postgresql://localhost:5432/mydb</property>
  21. <property name="connection.username">myname</property>
  22. <property name="connection.password">mypwd</property>
  23.  
  24. <!-- JDBC connection pool (use the built-in) -->
  25. <property name="connection.pool_size">1</property>
  26.  
  27. <!-- SQL dialect -->
  28. <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
  29.  
  30. <!-- Enable Hibernate's automatic session context management -->
  31. <property name="current_session_context_class">thread</property>
  32.  
  33. <!-- Disable the second-level cache -->
  34. <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
  35.  
  36. <!-- Echo all executed SQL to stdout -->
  37. <property name="show_sql">true</property>
  38.  
  39. <property name="hbm2ddl.auto">validate</property>
  40.  
  41. </session-factory>
  42.  
  43. <?xml version="1.0" encoding="UTF-8"?>
  44. <!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
  45.  
  46. <hibernate-reverse-engineering>
  47.  
  48. <type-mapping>
  49. <!-- jdbc-type is name for java.sql.Types -->
  50. <sql-type jdbc-type="BIT" not-null="true" hibernate-type="Boolean" />
  51. </type-mapping>
  52.  
  53. <table-filter match-schema="public" package="de.otto.dacapoi.db.entity" match-name="ref_online_shop" />
  54. <table-filter match-schema="public" package="de.otto.dacapoi.db.entity" match-name="ref_company" />
  55.  
  56.  
  57. <table schema="public" name="ref_online_shop">
  58. <primary-key>
  59. <generator class="sequence-identity">
  60. <param name="sequence">ref_online_shop_id_seq</param>
  61. </generator>
  62. </primary-key>
  63. </table>
  64.  
  65. <table schema="public" name="ref_company">
  66. <primary-key>
  67. <generator class="sequence-identity">
  68. <param name="sequence">ref_company_id_seq</param>
  69. </generator>
  70. </primary-key>
  71. </table>
  72.  
  73. </hibernate-reverse-engineering>
  74.  
  75. CREATE TABLE public.ref_online_shop
  76. (
  77. id bigint NOT NULL DEFAULT nextval('ref_online_shop_id_seq'::regclass),
  78. name character varying COLLATE pg_catalog."default" NOT NULL,
  79. company_id bigint NOT NULL,
  80. valid boolean NOT NULL DEFAULT true,
  81. CONSTRAINT ref_online_shop_pk PRIMARY KEY (id)
  82. )
  83.  
  84. CREATE TABLE public.ref_company
  85. (
  86. id bigint NOT NULL DEFAULT nextval('ref_company_id_seq'::regclass),
  87. name character varying COLLATE pg_catalog."default" NOT NULL,
  88. short_name character varying COLLATE pg_catalog."default" NOT NULL,
  89. country_id bigint NOT NULL,
  90. cdef_group boolean NOT NULL,
  91. domains character varying COLLATE pg_catalog."default" NOT NULL,
  92. valid boolean NOT NULL DEFAULT true,
  93. CONSTRAINT ref_company_pk PRIMARY KEY (id)
  94. )
  95.  
  96. <!-- Session Factory Declaration -->
  97. <bean id="SessionFactory"
  98. class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
  99. <property name="dataSource" ref="DataSource" />
  100. <property name="annotatedClasses">
  101. <list>
  102. ...
  103. <value>de.otto.dacapoi.db.entity.RefCompany</value>
  104. <value>de.otto.dacapoi.db.entity.RefOnlineShop</value>
  105. <!-- add new entity here -->
  106. </list>
  107. </property>
  108. <property name="hibernateProperties">
  109. <props>
  110. <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
  111. <prop key="hibernate.show_sql">false</prop>
  112. <!-- prop key="hibernate.current_session_context_class">thread</prop -->
  113. <prop key="hibernate.hbm2ddl.auto">validate</prop>
  114. <prop key="cache.provider_class">org.hibernate.cache.NoCacheProvider</prop>
  115. <prop key="hibernate.jdbc.batch_size">512</prop>
  116. <prop key="hibernate.generate_statistics">true</prop>
  117. </props>
  118. </property>
  119. </bean>
  120.  
  121.  
  122. <bean id="RefOnlineShopService"
  123. class="de.otto.dacapoi.service.data.ktable.impl.OnlineShopService">
  124. <property name="dao" ref="RefOnlineShopDAO" />
  125. </bean>
  126. <bean id="RefOnlineShopDAO" class="de.otto.dacapoi.db.dao.data.ktable.impl.OnlineShopDAO">
  127. <property name="sessionFactory" ref="SessionFactory" />
  128. </bean>
  129.  
  130. <bean id="RefCompanyService" class="de.otto.dacapoi.service.data.ktable.impl.CompanyService">
  131. <property name="dao" ref="RefCompanyDAO" />
  132. </bean>
  133. <bean id="RefCompanyDAO" class="de.otto.dacapoi.db.dao.data.ktable.impl.CompanyDAO">
  134. <property name="sessionFactory" ref="SessionFactory" />
  135. </bean>
  136.  
  137. 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]
  138. at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
  139. at java.lang.Thread.run(Unknown Source)
  140. 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]
  141. at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
  142. ... 26 more
  143. 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]
  144. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
  145. ... 36 more
  146. Caused by: org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghihklm.db.entity.RefOnlineShop]
  147. at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:443)
  148. ... 43 more
  149. Aug 29, 2018 10:52:14 AM org.apache.catalina.core.StandardContext listenerStart
  150. SCHWERWIEGEND: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
  151. 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]
  152. at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
  153. 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]
  154. at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
  155. ... 26 more
  156. 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]
  157. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
  158. ... 36 more
  159. Caused by: org.hibernate.MappingException: property [refCompany] not found on entity [ab.cdef.ghihklm.db.entity.RefOnlineShop]
  160. at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:443)
  161. at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:455)
  162. at org.hibernate.cfg.VerifyFetchProfileReferenceSecondPass.doSecondPass(VerifyFetchProfileReferenceSecondPass.java:60)
  163. at org.hibernate.cfg.Configuration.originalSecondPassCompile(Configuration.java:1593)
  164. 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
  165. a:1350)
  166. at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737)
  167. at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1788)
  168. at org.springframework.orm.hibernate4.LocalSessionFactoryBuilder.buildSessionFactory(LocalSessionFactoryBuilder.java:189)
  169. at org.springframework.orm.hibernate4.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:350)
  170. at org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:335)
  171. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
  172. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
  173. ... 43 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement