question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Application requires explicit inclusion of fasterxml

See original GitHub issue

So, when I included the section mentioned in the wiki into my pom.xml of my appengine application (Ninja Framework):

    <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt</artifactId>
        <version>0.1</version>
    </dependency>

and ran the application, I got the following stack trace, repeatedly.

[java.net.URLClassLoader$1.run(URLClassLoader.java:366),java.net.URLClassLoader$1.run(URLClassLoader.java:355),java.security.AccessController.doPrivileged(Native Method),java.net.URLClassLoader.findClass(URLClassLoader.java:354),java.lang.ClassLoader.loadClass(ClassLoader.java:425),com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:216),java.lang.ClassLoader.loadClass(ClassLoader.java:358),java.lang.Class.forName0(Native Method),java.lang.Class.forName(Class.java:270),controllers.api.AuthenticationController.get(AuthenticationController.java:49),sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method),sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57),sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43),java.lang.reflect.Method.invoke(Method.java:606),com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:115),ninja.params.ControllerMethodInvoker.invoke(ControllerMethodInvoker.java:56),ninja.FilterChainEnd.next(FilterChainEnd.java:48),ninja.NinjaDefault.onRouteRequest(NinjaDefault.java:82),ninja.servlet.NinjaServletDispatcher.service(NinjaServletDispatcher.java:83),com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:278),com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:268),com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:180),com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:93),com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85),com.googlecode.objectify.cache.AsyncCacheFilter.doFilter(AsyncCacheFilter.java:59),com.googlecode.objectify.ObjectifyFilter.doFilter(ObjectifyFilter.java:49),com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82),com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120),com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:134),com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:131),com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:208),com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:131),org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157),com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74),org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157),com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:127),org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157),com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34),org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157),com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63),org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157),com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43),org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157),com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125),org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157),com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366),com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349),com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116),org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157),org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388),org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216),org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182),org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765),org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418),com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:98),org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152),com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:491),org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152),org.mortbay.jetty.Server.handle(Server.java:326),org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542),org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938),org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755),org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218),org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404),org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409),org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)]

The resolution of this was to manually include the dependency for fasterxml.

    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.4.2</version>
    </dependency>

I’m not sure why this is the case, but wanted to document it here just in case anybody else runs into this in the future.

BTW, This looks like an AWESOME library!

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
komiyakcommented, Jun 12, 2017

@GMSyrimis Perhaps, is the cause of its problem here? https://stackoverflow.com/questions/22467127/error-duplicate-files-during-packaging-of-apk

I solved it with this. exclude 'META-INF/LICENSE'

0reactions
GMSyrimiscommented, Jun 1, 2017

For some reason when using the gradle import I get the following:

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE
  	File1: /Users/gsyrimis/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.8.0/45b426f7796b741035581a176744d91090e2e6fb/jackson-annotations-2.8.0.jar
  	File2: /Users/gsyrimis/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.8.2/80004060cc6f71a027b81e89ef4d74628f824f/jackson-core-2.8.2.jar
  	File3: /Users/gsyrimis/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.8.2/1f12816593c1422be957471c98a80bfbace60fa2/jackson-databind-2.8.2.jar

When I inspected my dependencies it seems that jsonwebtoken is getting all three files, so I’m confused as to why it’s finding duplicates

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NoClassDefFoundError: com/fasterxml/jackson/core ...
I have created a sample Java Project & added required jars. But, when I try to run the project it throws exception. Exception...
Read more >
Developers - Allow overriding of `transient` with explicit inclusion ...
Jackson appears to conflate Java's object serialization configuration with its own by forcing all transient fields to be excluded from any Jackson serialization ......
Read more >
On Jackson CVEs: Don't Panic — Here is what you need to ...
It is better to be explicit about specifying where polymorphism is needed. AVOID using java. lang.
Read more >
MapperFeature (jackson-databind 2.9.5 API) - javadoc.io
Setting that determines what happens if an attempt is made to explicitly "merge" value of a property, where value does not support merging;...
Read more >
DeserializationFeature (jackson-databind 2.9.0 API) - FasterXML
Note that features that do not indicate version of inclusion were available in ... creator property values, unless they are explicitly marked as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found