daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Apr 27th, 2018 124 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. java.lang.IllegalStateException: Failed to load ApplicationContext
  2. at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:94)
  3. at org.springframework.test.context.DefaultTestContext.getApplicationContext(DefaultTestContext.java:72)
  4. at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:117)
  5. at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)
  6. at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:212)
  7. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:200)
  8. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:252)
  9. at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
  10. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:254)
  11. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:217)
  12. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:83)
  13. at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
  14. at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
  15. at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
  16. at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
  17. at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
  18. at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
  19. at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:68)
  20. at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
  21. at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
  22. at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
  23. at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
  24. at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
  25. at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
  26. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  27. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  28. at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
  29. Caused by: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.setFilterChainProxySecurityConfigurer(org.springframework.security.config.annotation.ObjectPostProcessor,java.util.List) throws java.lang.Exception; nested exception is org.springframework.beans.factory.BeanExpressionException: Expression parsing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.security.core.userdetails.UserDetailsService com.brevleq.consami.config.SecurityConfiguration.userDetailsService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDetailsService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.brevleq.consami.repository.UserRepository com.brevleq.consami.security.UserDetailsService.userRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Cannot create inner bean '(inner bean)#1f481ec3' 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)#1f481ec3': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/brevleq/consami/config/DatabaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:config/liquibase/changelog/20150328154659_changelog.xml::1427568441617-1::hudson (generated):
  30.  Reason: liquibase.exception.DatabaseException: org.h2.jdbc.JdbcSQLException: Constraint "IDX_USER_LOGIN" not found; SQL statement:
  31. ALTER TABLE PUBLIC.t_user DROP CONSTRAINT idx_user_login [90057-183]
  32. at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)
  33. at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474)
  34. at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
  35. at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
  36. at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
  37. at org.springframework.boot.test.SpringApplicationContextLoader.loadContext(SpringApplicationContextLoader.java:98)
  38. at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:68)
  39. at org.springframework.test.context.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:86)
  40. ... 28 more
  41.    
  42. <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">
  43.   <changeSet author="hudson (generated)" id="1427568441617-1">
  44.     <dropUniqueConstraint constraintName="idx_user_login" tableName="t_user"/>
  45.   </changeSet>
  46.   <changeSet author="hudson (generated)" id="1427568441617-2">
  47.     <dropUniqueConstraint constraintName="login" tableName="t_user"/>
  48.   </changeSet>
  49.   <changeSet author="hudson (generated)" id="1427568441617-3">
  50.     <dropColumn columnName="login" tableName="t_user"/>
  51.   </changeSet>
  52.   <changeSet author="hudson (generated)" id="1427568441617-4">
  53.     <addNotNullConstraint columnDataType="varchar(50)" columnName="email" tableName="T_USER"/>
  54.   </changeSet>
  55. </databaseChangeLog>
  56.    
  57. <column name="report_id" type="bigint">
  58.     <constraints unique="true" uniqueConstraintName="visit_report_id_key"/>
  59. </column>
  60.    
  61. <changeSet author="hudson (generated)" id="1427568441617-1">
  62.   <dropUniqueConstraint constraintName="idx_user_login" tableName="t_user"/>
  63. </changeSet>
  64. <changeSet author="hudson (generated)" id="1427568441617-2">
  65.   <dropUniqueConstraint constraintName="login" tableName="t_user"/>
  66. </changeSet>
  67.    
  68. <changeSet author="hudson (generated)" id="1427568441617-3">
  69.   <dropColumn columnName="login" tableName="t_user"/>
  70. </changeSet>
  71.    
  72. <addNotNullConstraint columnDataType="varchar(50)" columnName="email" tableName="T_USER"/>
  73.    
  74. <jdbc:embedded-database id="dataSource" type="H2">
  75.  <jdbc:script location="classpath:db-schema.sql"/>
  76.  <jdbc:script location="classpath:db-test-data.sql"/>
  77. </jdbc:embedded-database>
  78.    
  79. @Bean(destroyMethod = "shutdown")
  80. public EmbeddedDatabase dataSource() {
  81.   return new EmbeddedDatabaseBuilder().
  82.         setType(EmbeddedDatabaseType.H2).
  83.         addScript("db-schema.sql").
  84.         addScript("db-test-data.sql").
  85.         build();
  86. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top