A Shortcut is a brief introduction to a very specific topic in IT. The aim of a shortcut is to get the reader to the point and give them an overview on a specific topic. A Shortcut should be able to read within one day. Readers can dig deeper into a specific topic by reading more shortcuts and combining them to a “complete” Book. A Shortcut is targeted for E-Books on Platforms such as Amazon Kindle or Apple’s iPad.
I recently came across a significant problem with Google AppEngine 1.7.2 and Jersey. Whenever I tried to implement my Webservice, I got a 500 error. There was nothing really wrong with the code. So i took a look at the Logs in the Google AppEngine Dashboard and found the following exception:
//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js //
Uncaught exception from servlet java.lang.IncompatibleClassChangeError: Implementing class at com.google.appengine.runtime.Request.process-642025ace6e60966(Request.java) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:634) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at com.sun.jersey.api.core.ScanningResourceConfig.init(ScanningResourceConfig.java:68) at com.sun.jersey.api.core.PackagesResourceConfig.init(PackagesResourceConfig.java:110) at com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:76) at com.sun.jersey.api.core.PackagesResourceConfig.<init>(PackagesResourceConfig.java:87) at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:641) at com.sun.jersey.spi.container.servlet.WebComponent.createResourceConfig(WebComponent.java:619) at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:199) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:307) at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:470) at javax.servlet.GenericServlet.init(GenericServlet.java:212) at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440) at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at com.google.tracing.TraceContext$TraceContextRunnable.runInContext(TraceContext.java:452) at com.google.tracing.TraceContext$TraceContextRunnable$1.run(TraceContext.java:458) at com.google.tracing.TraceContext.runInContext(TraceContext.java:698) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:336) at com.google.tracing.TraceContext$AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:328) at com.google.tracing.TraceContext$TraceContextRunnable.run(TraceContext.java:456) at java.lang.Thread.run(Thread.java:679)
This exception is caused by compatibility issues between asm-4.0.jar and asm-3.1.jar. With the new Version of AppEngine, asm-4.0.jar is used and it is not compatible with Jersey, which relies on asm-3.1.jar. To make Jersey still work on GAE 1.7, you have to remove the dependency on asm-4.0.jar.
[widgets_on_pages id=”sb”]
To remove the dependency, simply right-click on the referenced library "asm-4.0.jar", select "Build Path" and click on "Remove from Build Path". You also have to remove the file physically.
However, now that you changed that, you will still run into other problems. Datanucleus 2.0 relies on asm-4.0.jar and now that we removed the dependency, we can't use it any more. Therefore, it is necessary to switch to Version 1.0. You can do this simply by right-clicking on the project - select "Google" - "App Engine Settings". In this dialog, simply switch to Version 1.0 and you are ready to go (again)
Interesting links
Here are some interesting links for you! Enjoy your stay :)Pages
- All about Data in the Cloud
- Apache Hadoop Tutorial
- Apache Hive Tutorial
- Apache Spark Tutorial
- Big Data for Business
- Big Data Tutorial
- Data Governance Tutorial
- Data Science speaker
- Data Science speaker
- E-Book
- Froggy – Support
- International Keynote speaker
- Learn Data Science free
- Machine Learning Tutorial
- Mario Meir-Huber
- Partners and Friends
- Privacy Policy
- Python for Spark Tutorial
- Spark MLlib Tutorial
- Subscribe
- Tutorials – Learn Data Science
- Working with Data in Python Tutorial
Categories
- Amazon
- Amazon Web Services for .NET Developers
- apache hive
- Apache spark
- architecture
- Big Data
- big data
- Big Data
- Big Data and Business
- big data management
- Big Data News
- Big Data Technologies
- Books and Shortcuts
- Business
- Cloud Computing: Praxisratgeber und Einstiegsstrategien
- Data
- data governance
- Data Science
- Hadoop
- Headlines
- How-Tos
- Interviews
- Machine Learning
- microsoft
- News
- open source
- python
- Ressource Automation
- Tutorials
- Tutorials
- Uncategorized
Archive
- October 2021
- June 2021
- March 2021
- February 2021
- August 2020
- June 2020
- May 2020
- April 2020
- February 2020
- January 2020
- November 2019
- October 2019
- September 2019
- August 2019
- July 2019
- June 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- October 2018
- August 2018
- July 2018
- March 2018
- June 2017
- May 2017
- March 2017
- February 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- July 2014
- June 2014
- May 2014
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012