什么依赖包含DecoratingProxy?

时间:2016-04-12 22:34:26

标签: java spring facebook-graph-api

我已经完全使用了Spring Social Facebook应用程序。 几天前,我已将库更新到最新版本,现在我无法启动应用程序。

 :: Spring Boot ::             (v1.4.0.M1)

2016-04-12 23:13:45.101  INFO 29219 --- [           main] com.example.Main                           : Starting Main on user with PID 29219 (/home/user/IdeaProjects/example/build/classes/main started by user in /home/user/IdeaProjects/example)
2016-04-12 23:13:45.105  INFO 29219 --- [           main] com.example.Main                           : No active profile set, falling back to default profiles: default
2016-04-12 23:13:48.847  WARN 29219 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionRepository' defined in BeanDefinition defined in class path resource [org/springframework/social/config/annotation/SocialConfiguration.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/DecoratingProxy
2016-04-12 23:13:48.862 ERROR 29219 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'connectionRepository' defined in BeanDefinition defined in class path resource [org/springframework/social/config/annotation/SocialConfiguration.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/DecoratingProxy
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:753) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.4.0.M1.jar:1.4.0.M1]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:768) [spring-boot-1.4.0.M1.jar:1.4.0.M1]
    at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:362) [spring-boot-1.4.0.M1.jar:1.4.0.M1]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) [spring-boot-1.4.0.M1.jar:1.4.0.M1]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1183) [spring-boot-1.4.0.M1.jar:1.4.0.M1]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1172) [spring-boot-1.4.0.M1.jar:1.4.0.M1]
    at com.example.Main.main(Main.java:15) [main/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
    at com.intellij.uiDesigner.snapShooter.SnapShooter.main(SnapShooter.java:59) [uiDesigner.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) [idea_rt.jar:na]
Caused by: java.lang.NoClassDefFoundError: org/springframework/core/DecoratingProxy
    at org.springframework.aop.framework.AopProxyUtils.completeProxiedInterfaces(AopProxyUtils.java:121) ~[spring-aop-4.3.0.RC1.jar:4.3.0.RC1]
    at org.springframework.aop.framework.JdkDynamicAopProxy.getProxy(JdkDynamicAopProxy.java:120) ~[spring-aop-4.3.0.RC1.jar:4.3.0.RC1]
    at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:109) ~[spring-aop-4.3.0.RC1.jar:4.3.0.RC1]
    at org.springframework.aop.scope.ScopedProxyFactoryBean.setBeanFactory(ScopedProxyFactoryBean.java:111) ~[spring-aop-4.3.0.RC1.jar:4.3.0.RC1]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1597) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1565) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.2.5.RELEASE.jar:4.2.5.RELEASE]
    ... 25 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.core.DecoratingProxy
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_77]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_77]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_77]
    ... 32 common frames omitted


Process finished with exit code 1

依赖项的重要部分:

compile 'org.springframework.social:spring-social:+'
compile 'org.springframework.social:spring-social-facebook:+'
compile 'org.springframework.boot:spring-boot-starter-social-facebook:+'
compile 'org.springframework:springloaded:+'
compile 'org.springframework.boot:spring-boot-starter-web:+'
compile 'org.springframework.boot:spring-boot-starter-jetty:+'

当我删除spring社交facebook依赖项时,应用程序启动没有问题。 当我在application.properties中注释掉spring.social.facebook.appId和#spring.social.facebook.appSecret时,问题也在启动(但当然没有任何与facebook相关的工作)。

我需要添加什么依赖来解决: 引起:java.lang.ClassNotFoundException:org.springframework.core.DecoratingProxy

1 个答案:

答案 0 :(得分:2)

最后,我什么也没做,大约7天后又有了一个库更新。解决了这个问题。