Error while deploying spring boot application on standard app engine

1,111 views
Skip to first unread message

vishakh...@arrk-gcp.co.uk

unread,
Oct 16, 2017, 10:10:44 AM10/16/17
to Google App Engine
Hi ,
I am getting below error while deploying sprint boot-AngularJS monolith application on google standard app engine.


[INFO] GCLOUD: Caused by:
[INFO] GCLOUD: org.springframework.aop.framework.AopConfigException: Unable to instantiate proxy using Objenesis, and regular proxy instantiation via default constructor fails as well; nested exception is java.lang.InstantiationException: org.springframework.boot.autoconfigure.web.HttpMessageConverters$$EnhancerBySpringCGLIB$$3ba87c15
[INFO] GCLOUD: at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:76)
[INFO] GCLOUD: at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:201)
[INFO] GCLOUD: at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:109)
[INFO] GCLOUD: at

I have attached entire stacktrace file with this email. Spring boot version is 1.5.4 and Java version is 8.

I found old issue raised for this https://github.com/spring-projects/spring-boot/issues/9615. It is closed but It's weird that still I am facing the same issue.

Do anyone has any idea why we are facing this issue? Let me know if you need more details. 

Regards,

Vishakha
error.txt

Brian de Alwis

unread,
Oct 16, 2017, 1:03:26 PM10/16/17
to google-a...@googlegroups.com
That bug report (https://github.com/spring-projects/spring-boot/issues/9615) is *for* version 1.5.4.  I believe you'll find it fixed in subsequent versions of Spring Boot.

See the following project for a working sample app:

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/0cea8630-241b-4db9-92fa-8c988740791c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<error.txt>

Kenworth (Google Cloud Platform)

unread,
Oct 16, 2017, 1:06:40 PM10/16/17
to Google App Engine
Thank you @Brian

This Spring issue was closed with the following excerpts from GitHub

People from the future:
Note the problem was resolved, and it amounts to spring controls logging, the plugin looks for logs. To unblock this, one just needs to prevent Java util logging being redirected to slf4j. This is addressed in the comments below.


Origional bug report:

  • Cloud Tools for Eclipse Version: 1.2.0.201706082053
  • OS: Linux 4.10.0-21-generic
  • Java Version: 1.8.0_131

Eclipse doesn't realise when a spring boot application is started.


Expected result: eclipse shows the project as started.
Actual result: eclipse shows the project as starting. However you can navigate to endpoints and see the application running correctly. And the application logs indicate that the server has started.


Replication steps:
Add spring-boot-starter-web as a dependency.
Add a SpringBootServletInitializer
Run/Debug as an appEngine project.

package com.example;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;

@SpringBootApplication
public class Example extends SpringBootServletInitializer {

public Example() {
System.out.println("hello from example");
}

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
System.out.println("----INIT");
SpringApplicationBuilder result = application.sources(Example.class);
System.out.println("----END INIT");
return application;
}
}



The workaround should be fixed in Spring 4.3.10 


If you are still affected after implementing the workaround, please feel free to comment on the GitHub links maintained by the Spring experts.

vishakh...@arrk-gcp.co.uk

unread,
Dec 12, 2017, 8:59:27 AM12/12/17
to Google App Engine
Thanks a lot Kenworth. Upgrade to Spring boot version resolved the issue. 

Now we are facing issue with performance. Is there a way to identify problem areas. Any tool I can use to find out the exact pain area?

Another issue is we are not able to use automatic scaling due to deadlineexceededexception. We are using basic scaling which takes time when application boot up for first time request. Is there a way I can keep at least one instance running to avoid delay for first request?  

I too facing issue during the basic scaling of instances. After scaling app server is not able to get JDBC connections. I am not able to get any logs from stackdriver for this issue. How can I trace this issue? Can I reproduce same issue on local?

Regards,

Vishakha
Reply all
Reply to author
Forward
0 new messages