I have seen this question asked around before and Can't seem to find a solid solution to it. As of now, Google App Engine does not support subclasses of java.util.logging.Logger. I have some code in a java endpoint that is using the Base CRM API (info here: https://github.com/basecrm/basecrm-java) to input contacts into my CRM. This works as expected when using it in a locahost environment for testing, but onc edeployed it does not like the logging that the Base API is doing. Here is the error I am getting from GAE:
java.lang.SecurityException: Google App Engine does not support subclasses of java.util.logging.Logger: com/getbase/http/jersey/HttpClient$Slf4jAdapter
at com.google.appengine.runtime.Request.process-bbdc1f6d27729bc9(Request.java)
at java.lang.ClassLoader.loadClass(ClassLoader.java:375)
at com.getbase.http.jersey.HttpClient.<init>(HttpClient.java:31)
at com.getbase.Client.<init>(Client.java:34)
at com.nicholas.leadsbackend.LeadsServlet.sendToBase(LeadsServlet.java:90)
at com.nicholas.leadsbackend.LeadsServlet.doPost(LeadsServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:453)
at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:460)
at com.google.tracing.CurrentContext.runInContext(CurrentContext.java:293)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:319)
at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:311)
at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:457)
at java.lang.Thread.run(Thread.java:745)
Here is the code in my endpoint that sends to base:
Client client = new Client(new Configuration.Builder()
.accessToken(BASECRM_ACCESS_TOKEN)
.verbose()
.build());
Contact contact = new Contact();
contact.setName(name);
contact.setPhone(phone);
contact.setEmail(email);
contact.setDescription("Make/Model/Year: " + make + "\n" +
"Type of Ad: " + adType);
client.contacts().create(contact);
The API code is very simple code, and is not the issue here. My issue is that the CRM API needs this dependency compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.21'
to work properly or it throws errors.
Please let me know if there is any way to fix this for GAE. I am looking towards other options than GAE as other options might not have strict Logging rules. I understand that this is also a special case scenario since it's an additional API causing me the issue, but any insight will be very helpful. Thanks in advance!