Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
3,475
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.43 KB | None | 0 0
  1. @Configuration
  2. @EnableAutoConfiguration
  3. @EnableJpaRepositories(
  4. basePackages = {"net.elyland.pipe.repositories.router"},
  5. entityManagerFactoryRef = "routerEntityManagerFactory",
  6. transactionManagerRef = "routerTransactionManager")
  7. @EnableTransactionManagement
  8. @PropertySource("classpath:application.properties")
  9. @ComponentScan(basePackages = {"net.elyland.pipe.domain.router"})
  10. public class RouterRepositoryConfiguration {
  11.  
  12. @Bean(name = "routerDataSource")
  13. @ConfigurationProperties(prefix = "router.datasource")
  14. public DataSource routerDataSource() {
  15. return DataSourceBuilder
  16. .create()
  17. .build();
  18. }
  19.  
  20. @PersistenceContext(unitName = "routerPU")
  21. @Bean(name = "routerEntityManagerFactory")
  22. public LocalContainerEntityManagerFactoryBean routerEntityManagerFactory(EntityManagerFactoryBuilder builder, @Qualifier("routerDataSource")DataSource routerDataSource) {
  23. return builder
  24. .dataSource(routerDataSource)
  25. .properties(hibernateProperties())
  26. .packages(Ip.class, Net.class, Provider.class, QueueRule.class, QueueType.class,RemoteIp.class,Subnet.class,TrafficQueue.class)
  27. .persistenceUnit("routerPU")
  28. .build();
  29. }
  30.  
  31. @Bean(name = "routerTransactionManager")
  32. public PlatformTransactionManager mysqlTransactionManager(@Qualifier("routerEntityManagerFactory") EntityManagerFactory entityManagerFactory) {
  33. return new JpaTransactionManager(entityManagerFactory);
  34. }
  35.  
  36. private Map hibernateProperties() {
  37.  
  38. Resource resource = new ClassPathResource("routerHibernate.properties");
  39.  
  40. try {
  41. Properties properties = PropertiesLoaderUtils.loadProperties(resource);
  42.  
  43. return properties.entrySet().stream()
  44. .collect(Collectors.toMap(
  45. e -> e.getKey().toString(),
  46. e -> e.getValue())
  47. );
  48. } catch (IOException e) {
  49. return new HashMap();
  50. }
  51. }
  52. }
  53.  
  54. @Configuration
  55. @EnableAutoConfiguration
  56. @EnableJpaRepositories(
  57. basePackageClasses = {SshUser.class, User.class, Role.class},
  58. basePackages = {"net.elyland.pipe.domain.admin"},
  59. entityManagerFactoryRef = "adminEntityManager" ,
  60. transactionManagerRef = "adminTransactionManager"
  61. )
  62. @EnableTransactionManagement
  63. @PropertySource({ "classpath:application.properties" })
  64. public class AdminRepositoryConfiguration {
  65.  
  66. @Primary
  67. @Bean(name = "adminDataSource")
  68. @ConfigurationProperties(prefix = "admin.datasource")
  69.  
  70. public DataSource adminDataSource() {
  71. System.out.println("Create datasource Admin");
  72. return DataSourceBuilder
  73. .create()
  74. .build();
  75. }
  76.  
  77. @Primary
  78. @Bean(name = "adminEntityManager")
  79. public LocalContainerEntityManagerFactoryBean adminEntityManager(EntityManagerFactoryBuilder builder, @Qualifier("adminDataSource") DataSource adminDataSource) {
  80. return builder
  81. .dataSource(adminDataSource)
  82. .properties(hibernateProperties())
  83. .packages(User.class, LocalIp.class, CommandLog.class, PipeSize.class, Role.class,Rule.class,Server.class,SshUser.class)
  84. .persistenceUnit("adminPU")
  85. .build();
  86. }
  87.  
  88. @Primary
  89. @Bean(name = "adminTransactionManager")
  90. public PlatformTransactionManager adminTransactionManager(@Qualifier("adminEntityManager") EntityManagerFactory entityManagerFactory) {
  91. return new JpaTransactionManager(entityManagerFactory);
  92. }
  93.  
  94. private Map hibernateProperties() {
  95.  
  96. Resource resource = new ClassPathResource("hibernate.properties");
  97.  
  98. try {
  99. Properties properties = PropertiesLoaderUtils.loadProperties(resource);
  100.  
  101. return properties.entrySet().stream()
  102. .collect(Collectors.toMap(
  103. e -> e.getKey().toString(),
  104. e -> e.getValue())
  105. );
  106. } catch (IOException e) {
  107. return new HashMap();
  108. }
  109. }
  110. }
  111.  
  112. @Repository
  113. @Transactional("adminTransactionManager")
  114. public interface SshUserRepository extends JpaRepository<SshUser, Integer> {
  115. SshUser findByUsername(String username);
  116. }
  117.  
  118. @Repository
  119. @Transactional("routerTransactionManager")
  120. public interface SubnetRepository extends JpaRepository<Subnet, Integer> {
  121. public Subnet findByAddress(Integer address);
  122. public Subnet findByMask(Integer mask);
  123. }
  124.  
  125. admin.datasource.url= jdbc:mysql://192.168.10.3:3306/pipe?autoReconnect=true&useSSL=false
  126. admin.datasource.username=user
  127. admin.datasource.password=pass
  128. admin.datasource.driverClassName=com.mysql.jdbc.Driver
  129.  
  130. router.datasource.url= jdbc:mysql://192.168.10.3:3306/router?autoReconnect=true&useSSL=false
  131. router.datasource.username=user
  132. router.datasource.password=pass
  133. router.datasource.driverClassName=com.mysql.jdbc.Driver
  134.  
  135. #spring.jpa.show-sql = true
  136. hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
  137. hibernate.hbm2ddl.auto=create-drop
  138.  
  139. ***************************
  140. APPLICATION FAILED TO START
  141. ***************************
  142.  
  143. Description:
  144.  
  145. Field userRepository in net.elyland.pipe.services.UserDetailsServiceImpl required a bean named 'entityManagerFactory' that could not be found.
  146.  
  147.  
  148. Action:
  149.  
  150. Consider defining a bean named 'entityManagerFactory' in your configuration.
  151.  
  152. . ____ _ __ _ _
  153. /\ / ___'_ __ _ _(_)_ __ __ _
  154. ( ( )___ | '_ | '_| | '_ / _` |
  155. \/ ___)| |_)| | | | | || (_| | ) ) ) )
  156. ' |____| .__|_| |_|_| |___, | / / / /
  157. =========|_|==============|___/=/_/_/_/
  158. :: Spring Boot :: (v1.5.1.RELEASE)
  159.  
  160. 2017-07-07 18:52:18.774 INFO 11870 --- [ main] n.e.pipe.SpringBootMvcJspApplication : Starting SpringBootMvcJspApplication on adm-imaterynko with PID 11870 (/home/imaterynko/SVN/sysadm/javawebdev/pipe/target/classes started by imaterynko in /home/imaterynko/SVN/sysadm/javawebdev/pipe)
  161. 2017-07-07 18:52:18.780 INFO 11870 --- [ main] n.e.pipe.SpringBootMvcJspApplication : No active profile set, falling back to default profiles: default
  162. 2017-07-07 18:52:18.859 INFO 11870 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6a472554: startup date [Fri Jul 07 18:52:18 EEST 2017]; root of context hierarchy
  163. 2017-07-07 18:52:20.485 INFO 11870 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'remoteIpRepository' with a different definition: replacing [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
  164. 2017-07-07 18:52:20.487 INFO 11870 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'providerRepository' with a different definition: replacing [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
  165. 2017-07-07 18:52:20.488 INFO 11870 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'netRepository' with a different definition: replacing [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
  166. 2017-07-07 18:52:20.491 INFO 11870 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'queueTypeRepository' with a different definition: replacing [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
  167. 2017-07-07 18:52:20.492 INFO 11870 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'ipRepository' with a different definition: replacing [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
  168. 2017-07-07 18:52:20.494 INFO 11870 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'subnetRepository' with a different definition: replacing [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
  169. 2017-07-07 18:52:20.497 INFO 11870 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'queueRuleRepository' with a different definition: replacing [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
  170. 2017-07-07 18:52:20.504 INFO 11870 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'trafficQueueRepository' with a different definition: replacing [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
  171. 2017-07-07 18:52:21.046 INFO 11870 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration' of type [class org.springframework.boot.autoconfigure.validation.ValidationAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  172. 2017-07-07 18:52:21.110 INFO 11870 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'validator' of type [class org.springframework.validation.beanvalidation.LocalValidatorFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  173. 2017-07-07 18:52:21.158 INFO 11870 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [class org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$ee2486b5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  174. 2017-07-07 18:52:21.170 INFO 11870 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'objectPostProcessor' of type [class org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  175. 2017-07-07 18:52:21.172 INFO 11870 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@678040b3' of type [class org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  176. 2017-07-07 18:52:21.180 INFO 11870 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [class org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$12f92967] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  177. 2017-07-07 18:52:21.193 INFO 11870 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'methodSecurityMetadataSource' of type [class org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  178. 2017-07-07 18:52:21.203 INFO 11870 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$5576be7b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
  179. 2017-07-07 18:52:21.537 INFO 11870 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
  180. 2017-07-07 18:52:21.551 INFO 11870 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
  181. 2017-07-07 18:52:21.552 INFO 11870 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.11
  182. 2017-07-07 18:52:22.039 INFO 11870 --- [ost-startStop-1] org.apache.jasper.servlet.TldScanner : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  183. 2017-07-07 18:52:22.042 INFO 11870 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
  184. 2017-07-07 18:52:22.042 INFO 11870 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3185 ms
  185. 2017-07-07 18:52:22.239 INFO 11870 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
  186. 2017-07-07 18:52:22.240 INFO 11870 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
  187. 2017-07-07 18:52:22.241 INFO 11870 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Filter characterEncodingFilter was not registered (possibly already registered?)
  188. 2017-07-07 18:52:22.241 INFO 11870 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
  189. Create datasource Admin
  190. 2017-07-07 18:52:22.894 INFO 11870 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'adminPU'
  191. 2017-07-07 18:52:22.912 INFO 11870 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
  192. name: adminPU
  193. ...]
  194. 2017-07-07 18:52:22.971 INFO 11870 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.0.11.Final}
  195. 2017-07-07 18:52:22.973 INFO 11870 --- [ main] org.hibernate.cfg.Environment : HHH000205: Loaded properties from resource hibernate.properties: {hibernate.dialect=org.hibernate.dialect.MySQL5Dialect, hibernate.bytecode.use_reflection_optimizer=false, hibernate.hbm2ddl.auto=create-drop}
  196. 2017-07-07 18:52:22.974 INFO 11870 --- [ main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist
  197. 2017-07-07 18:52:23.007 INFO 11870 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
  198. 2017-07-07 18:52:23.210 INFO 11870 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
  199. 2017-07-07 18:52:23.673 INFO 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000227: Running hbm2ddl schema export
  200. 2017-07-07 18:52:23.685 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table command_log drop foreign key FKo5wo2sqahur6v6uym1t2sjken
  201. 2017-07-07 18:52:23.685 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'pipe.command_log' doesn't exist
  202. 2017-07-07 18:52:23.688 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table host drop foreign key FK9hlhx55t325whiraf8newuxcv
  203. 2017-07-07 18:52:23.688 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'pipe.host' doesn't exist
  204. 2017-07-07 18:52:23.689 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table rule drop foreign key FKeuk4g8c1yhpjno3suq3syen02
  205. 2017-07-07 18:52:23.690 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'pipe.rule' doesn't exist
  206. 2017-07-07 18:52:23.691 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table rule drop foreign key FKtria2gmd5ghsirwucl003p935
  207. 2017-07-07 18:52:23.691 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'pipe.rule' doesn't exist
  208. 2017-07-07 18:52:23.693 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table rule drop foreign key FKsoy6c2wf2ahd7y2awnfabuxkc
  209. 2017-07-07 18:52:23.694 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'pipe.rule' doesn't exist
  210. 2017-07-07 18:52:23.695 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table user drop foreign key FKn82ha3ccdebhokx3a8fgdqeyy
  211. 2017-07-07 18:52:23.695 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'pipe.user' doesn't exist
  212. 2017-07-07 18:52:24.183 INFO 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000230: Schema export complete
  213. 2017-07-07 18:52:24.238 INFO 11870 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'adminPU'
  214. 2017-07-07 18:52:24.300 INFO 11870 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'routerPU'
  215. 2017-07-07 18:52:24.301 INFO 11870 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
  216. name: routerPU
  217. ...]
  218. 2017-07-07 18:52:24.386 INFO 11870 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
  219. 2017-07-07 18:52:24.476 INFO 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000227: Running hbm2ddl schema export
  220. 2017-07-07 18:52:24.478 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table ip drop foreign key FKnunykfm5kyqpk69fu78rm690t
  221. 2017-07-07 18:52:24.478 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'router.ip' doesn't exist
  222. 2017-07-07 18:52:24.479 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table ip drop foreign key FK3fkkinqulfhgjo6c7gu8ptu8f
  223. 2017-07-07 18:52:24.479 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'router.ip' doesn't exist
  224. 2017-07-07 18:52:24.481 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table ip drop foreign key FK4txj00furhr0boqimj1s0loa1
  225. 2017-07-07 18:52:24.481 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'router.ip' doesn't exist
  226. 2017-07-07 18:52:24.483 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table queue_rule drop foreign key FK5bm4nnopngcrglm6od8m97yhh
  227. 2017-07-07 18:52:24.483 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'router.queue_rule' doesn't exist
  228. 2017-07-07 18:52:24.485 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table queue_rule drop foreign key FKohmfk4krumgcaa75kxnfxcwfv
  229. 2017-07-07 18:52:24.485 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'router.queue_rule' doesn't exist
  230. 2017-07-07 18:52:24.486 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table queue_rule drop foreign key FKtc36dnb4iulun0yn72wqrybf4
  231. 2017-07-07 18:52:24.486 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'router.queue_rule' doesn't exist
  232. 2017-07-07 18:52:24.487 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table queue_rule drop foreign key FK3t8l9ho5h9g7soqrk94h3van0
  233. 2017-07-07 18:52:24.487 ERROR 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : Table 'router.queue_rule' doesn't exist
  234. 2017-07-07 18:52:25.003 INFO 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000230: Schema export complete
  235. 2017-07-07 18:52:25.007 INFO 11870 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'routerPU'
  236. 2017-07-07 18:52:25.124 WARN 11870 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfiguration': Unsatisfied dependency expressed through field 'userDetailsService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDetailsServiceImpl': Unsatisfied dependency expressed through field 'userRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Cannot create inner bean '(inner bean)#693f2213' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#693f2213': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' available
  237. 2017-07-07 18:52:25.124 INFO 11870 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'routerPU'
  238. 2017-07-07 18:52:25.124 INFO 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000227: Running hbm2ddl schema export
  239. 2017-07-07 18:52:25.523 INFO 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000230: Schema export complete
  240. 2017-07-07 18:52:25.526 INFO 11870 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'adminPU'
  241. 2017-07-07 18:52:25.526 INFO 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000227: Running hbm2ddl schema export
  242. 2017-07-07 18:52:25.920 INFO 11870 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000230: Schema export complete
  243. 2017-07-07 18:52:25.925 WARN 11870 --- [ main] o.s.boot.SpringApplication : Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' available)
  244. 2017-07-07 18:52:25.985 ERROR 11870 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
  245.  
  246. ***************************
  247. APPLICATION FAILED TO START
  248. ***************************
  249.  
  250. Description:
  251.  
  252. Field userRepository in net.elyland.pipe.services.UserDetailsServiceImpl required a bean named 'entityManagerFactory' that could not be found.
  253.  
  254.  
  255. Action:
  256.  
  257. Consider defining a bean named 'entityManagerFactory' in your configuration.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement