Spring Boot (Legacy) with GAE - Autowiring

21 views
Skip to first unread message

Rey Pader via StackOverflow

unread,
Jun 25, 2015, 7:28:05 AM6/25/15
to google-appengin...@googlegroups.com

I'm trying to make spring-boot-legacy:1.0.1.RELEASE & spring-boot-starter-parent:1.1.8.RELEASE with GAE 1.9.19. However, upon running via mvn appengine:devserver, I get the following error that prevents the app from running:

[INFO] java.lang.NoClassDefFoundError: java.lang.reflect.Parameter is a restricted class. Please see the Google  App Engine developer's guide for more details.
[INFO]  at com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:52)
[INFO]  at org.springframework.core.StandardReflectionParameterNameDiscoverer.getParameterNames(StandardReflectionParameterNameDiscoverer.java:53)
[INFO]  at org.springframework.core.PrioritizedParameterNameDiscoverer.getParameterNames(PrioritizedParameterNameDiscoverer.java:65)
[INFO]  at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:182)
[INFO]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1115)
[INFO]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
[INFO]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
[INFO]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
[INFO]  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
[INFO]  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
[INFO]  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
[INFO]  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
[INFO]  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
[INFO]  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
[INFO]  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
[INFO]  at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
[INFO]  at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)

From what I understand, Spring uses reflection to auto-wire dependencies but it seems certain classes in the java.lang.reflect package are restricted. Any ideas on how to make this work?



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/31049004/spring-boot-legacy-with-gae-autowiring

Igor Artamonov via StackOverflow

unread,
Jun 25, 2015, 9:08:07 AM6/25/15
to google-appengin...@googlegroups.com

java.lang.reflect.Parameter is used by Spring under Java 8. So you have to downgrade to Java 7 to stop using it. Another reason for this is that Google Appengine doesn't have support for Java 8, only Java 7. So you need it anyway.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/31049004/spring-boot-legacy-with-gae-autowiring/31051111#31051111

Igor Artamonov via StackOverflow

unread,
Jun 27, 2015, 10:18:05 AM6/27/15
to google-appengin...@googlegroups.com

java.lang.reflect.Parameter is used by Spring under Java 8. So you have to downgrade to Java 7 to avoid it. Another reason for this is that Google Appengine doesn't have support for Java 8, only Java 7. So you need it anyway.

Reply all
Reply to author
Forward
0 new messages