Closed suhyun-lim closed 8 years ago
I encountered the same problem.
I can't really help here, your log output is missing critical information. Could you copy the whole stacktrace please?
All error log is here.. but I don't know, this is critical information.
2015-12-29 09:30:09.208 WARN 21044 --- [ restartedMain] ationConfigEmbeddedWeb
ApplicationContext : Exception encountered during context initialization - cance
lling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyEx
ception: Error creating bean with name 'docsController' defined in file [C:\###\sagan\sagan-site\build\classes\main\sagan\docs\suppo
rt\DocsController.class]: Unsatisfied dependency expressed through constructor a
rgument with index 0 of type [sagan.projects.support.ProjectMetadataService]: :
Error creating bean with name 'projectMetadataService' defined in URL [jar:file:
/C:/###/sagan/sagan-common/build/libs/sagan-common.j
ar!/sagan/projects/support/ProjectMetadataService.class]: Unsatisfied dependency
expressed through constructor argument with index 0 of type [sagan.projects.sup
port.ProjectMetadataRepository]: : Error creating bean with name 'projectMetadat
aRepository': Invocation of init method failed; nested exception is java.lang.Il
legalAccessError: class sagan.projects.support.$Proxy116 cannot access its super
interface sagan.projects.support.ProjectMetadataRepository; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'projectMetadataRepository': Invocation of init method failed; nested exc
eption is java.lang.IllegalAccessError: class sagan.projects.support.$Proxy116 c
annot access its superinterface sagan.projects.support.ProjectMetadataRepository
; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyExc
eption: Error creating bean with name 'projectMetadataService' defined in URL [j
ar:file:/C:/###/sagan/sagan-common/build/libs/sagan-
common.jar!/sagan/projects/support/ProjectMetadataService.class]: Unsatisfied de
pendency expressed through constructor argument with index 0 of type [sagan.proj
ects.support.ProjectMetadataRepository]: : Error creating bean with name 'projec
tMetadataRepository': Invocation of init method f
ailed; nested exception is java.lang.IllegalAccessError: class sagan.projects.su
pport.$Proxy116 cannot access its superinterface sagan.projects.support.ProjectM
etadataRepository; nested exception is org.springframework.beans.factory.BeanCre
ationException: Error creating bean with name 'projectMetadataRepository': Invoc
ation of init method failed; nested exception is java.lang.IllegalAccessError: c
lass sagan.projects.support.$Proxy116 cannot access its superinterface sagan.pro
jects.support.ProjectMetadataRepository
2015-12-29 09:30:09.272 WARN 21044 --- [ restartedMain] sagan.SaganApplication
: Error handling failed (Error creating bean with name 'deleg
atingApplicationListener' defined in class path resource [org/springframework/se
curity/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean
PostProcessor before instantiation of bean failed; nested exception is org.sprin
gframework.beans.factory.BeanCreationException: Error creating bean with name 'o
rg.springframework.cache.annotation.ProxyCachingConfiguration': Initialization o
f bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanD
efinitionException: No bean named 'org.springframework.context.annotation.Config
urationClassPostProcessor.importRegistry' is defined)
2015-12-29 09:30:09.290 ERROR 21044 --- [ restartedMain] sagan.SaganApplication
: Application startup failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating
bean with name 'docsController' defined in file [C:\###\sagan\sagan-site\build\classes\main\sagan\docs\support\DocsController.class
]: Unsatisfied dependency expressed through constructor argument with index 0 of
type [sagan.projects.support.ProjectMetadataService]: : Error creating bean wit
h name 'projectMetadataService' defined in URL [jar:file:/C:/###/sagan/sagan-common/build/libs/sagan-common.jar!/sagan/projects/supp
ort/ProjectMetadataService.class]: Unsatisfied dependency expressed through cons
tructor argument with index 0 of type [sagan.projects.support.ProjectMetadataRep
ository]: : Error creating bean with name 'projectMetadataRepository': Invocatio
n of init method failed; nested exception is java.lang.IllegalAccessError: class
sagan.projects.support.$Proxy116 cannot access its superinterface sagan.project
s.support.ProjectMetadataRepository; nested exception is org.springframework.bea
ns.factory.BeanCreationException: Error creating bean with name 'projectMetadata
Repository': Invocation of init method failed; nested exception is java.lang.Ill
egalAccessError: class sagan.projects.support.$Proxy116 cannot access its superi
nterface sagan.projects.support.ProjectMetadataRepository; nested exception is o
rg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating
bean with name 'projectMetadataService' defined in URL [jar:file:/C:/###/sagan/sagan-common/build/libs/sagan-common.jar!/sagan/proje
cts/support/ProjectMetadataService.class]: Unsatisfied dependency expressed thro
ugh constructor argument with index 0 of type [sagan.projects.support.ProjectMet
adataRepository]: : Error creating bean with name 'projectMetadataRepository': I
nvocation of init method failed; nested exception is java.lang.IllegalAccessE r
ror: class sagan.projects.support.$Proxy116 cannot access its superinterface sag
an.projects.support.ProjectMetadataRepository; nested exception is org.springfra
mework.beans.factory.BeanCreationException: Error creating bean with name 'proje
ctMetadataRepository': Invocation of init method failed; nested exception is jav
a.lang.IllegalAccessError: class sagan.projects.support.$Proxy116 cannot access
its superinterface sagan.projects.support.ProjectMetadataRepository
at org.springframework.beans.factory.support.ConstructorResolver.createA
rgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.2.3.RELEASE.jar:4.2.
3.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowir
eConstructor(ConstructorResolver.java:185) ~[spring-beans-4.2.3.RELEASE.jar:4.2.
3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143) ~[spri
ng-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) ~[sprin
g-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans
-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4
.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEAS
E]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.3.RELEA
SE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:302) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEA S
E]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:197) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2
.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finish
BeanFactoryInitialization(AbstractApplicationContext.java:838) ~[spring-context-
4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:537) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.
RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationConte
xt.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.0.RELEASE.j
ar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.
java:752) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.doRun(SpringApplication.ja
va:347) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java
:295) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at sagan.SiteApplication.main(SiteApplication.java:45) [main/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.
0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:62) ~[na:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43) ~[na:1.8.0_45]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_45]
at org.springframework.boot.devtools.restart.RestartLauncher.run(Restart
Launcher.java:49) [spring-boot-devtools-1.3.0.RELEASE.jar:1.3.0.RELEASE]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Err
or creating bean with name 'projectMetadataService' defined in URL [jar:file:/C:
/###/sagan/sagan-common/build/libs/sagan- c
ommon.jar!/sagan/projects/support/ProjectMetadataService.class]: Unsatisfied dep
endency expressed through constructor argument with index 0 of type [sagan.proje
cts.support.ProjectMetadataRepository]: : Error creating bean with name 'project
MetadataRepository': Invocation of init method failed; nested exception is java.
lang.IllegalAccessError: class sagan.projects.support.$Proxy116 cannot access it
s superinterface sagan.projects.support.ProjectMetadataRepository; nested except
ion is org.springframework.beans.factory.BeanCreationException: Error creating b
ean with name 'projectMetadataRepository': Invocation of init method failed; nes
ted exception is java.lang.IllegalAccessError: class sagan.projects.support.$Pro
xy116 cannot access its superinterface sagan.projects.support.ProjectMetadataRep
ository
at org.springframework.beans.factory.support.ConstructorResolver.createA
rgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.2.3.RELEASE.jar:4.2.
3.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.autowir
eConstructor(ConstructorResolver.java:185) ~[spring-beans-4.2.3.RELEASE.jar:4.2.
3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143) ~[spri
ng-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) ~[sprin
g-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans
-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4
.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.3.RELEASE.jar:4. 2
.3.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.3.RELEA
SE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:302) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:197) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.
3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.3.R
ELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.3.REL
EASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolve
AutowiredArgument(ConstructorResolver.java:813) ~[spring-beans-4.2.3.RELEASE.jar
:4.2.3.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createA
rgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.2.3.RELEASE.jar:4.2.
3.RELEASE]
... 22 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creati
ng bean with name 'projectMetadataRepository': Invocation of init method failed;
nested exception is java.lang.IllegalAccessError: class sagan.projects.support.
$Proxy116 cannot access its superinterface sagan.projects.support.ProjectMetadat
aRepository
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) ~[spring-be
ans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBe a
nFactory.java:545) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4
.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEAS
E]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.3.RELEA
SE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:302) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:197) ~[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
findAutowireCandidates(DefaultListableBeanFactory.java:1192) ~[spring-beans-4.2.
3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
doResolveDependency(DefaultListableBeanFactory.java:1116) ~[spring-beans-4.2.3.R
ELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
resolveDependency(DefaultListableBeanFactory.java:1014) ~[spring-beans-4.2.3.REL
EASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.resolve
AutowiredArgument(ConstructorResolver.java:813) ~[spring-beans-4.2.3.RELEASE.jar
:4.2.3.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.createA
rgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.2.3.RELEASE.jar:4.2.
3.RELEASE]
... 36 common frames omitted
Caused by: java.lang.IllegalAccessError: class sagan.projects.support.$Proxy116
cannot access its superinterface sagan.projects.support.ProjectMetadataRepositor
y
at java.lang.reflect.Proxy.defineClass0(Native Method) ~[na:1.8.0_45]
atang.reflect.Proxy.access$300(Proxy.java:228) ~[na:1.8.0_45]
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:642) ~[na:
1.8.0_45]
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557) ~[na:
1.8.0_45]
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230) ~[na:1.8.
0_45]
at java.lang.reflect.WeakCache.get(WeakCache.java:127) ~[na:1.8.0_45]
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419) ~[na:1.8.0_45]
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719) ~[na:1.8.0_4
5]
at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDyna
micAopProxy.java:121) ~[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.
java:109) ~[spring-aop-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.data.repository.core.support.RepositoryFactorySup
port.getRepository(RepositoryFactorySupport.java:208) ~[spring-data-commons-1.11
.1.RELEASE.jar:na]
at org.springframework.data.repository.core.support.RepositoryFactoryBea
nSupport.initAndReturn(RepositoryFactoryBeanSupport.java:251) ~[spring-data-comm
ons-1.11.1.RELEASE.jar:na]
at org.springframework.data.repository.core.support.RepositoryFactoryBea
nSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:237) ~[spring-data
-commons-1.11.1.RELEASE.jar:na]
at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryB
ean.afterPropertiesSet(JpaRepositoryFactoryBean.java:92) ~[spring-data-jpa-1.9.1
.RELEASE.jar:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637) ~[spring
-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574) ~[spring-be
ans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
... 47 common frames omitted
:sagan-site:bootRun FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sagan-site:bootRun'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0\bin\java.exe'' finished with
non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 48.694 secs
I've created the following issue in Spring Boot with a repro project: spring-projects/spring-boot#4857
In the meantime, you can run the application from your IDE by running the SiteApplication
class.
Thanks for this report!
Hi bclozel,
I was thinking to create new ticket but as you are addressing same issue thought you could help. I faced also this particular issue. Now I am trying to run the application from STS. But am not able to create new run configuration for the project. In the run configuration there were no project in the drop down. Could you please assist how exactly to create new config. As per my knowledge by selecting the main class it should show : run as Spring boot which is not happening while selecting SiteApplication.java class.
@bclozel : could you please give the exact class name or interface name where I need to do the modification. Last time I treid to modify some repository interface but that did n't work.
It's been fixed by ddf912664b3913ef3686bdfcd765c4a297e2b1c4, so you can check the modifications in that commit.
I'm trying to build sagan project locally. but getting exception..... build fail...T.T exception message is..