Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using JDK 11 causes NoClassDefFoundError #423

Closed
acet opened this issue Feb 9, 2019 · 1 comment
Closed

Using JDK 11 causes NoClassDefFoundError #423

acet opened this issue Feb 9, 2019 · 1 comment

Comments

@acet
Copy link
Contributor

acet commented Feb 9, 2019

On the same code base using JDK 8 works as expected, but after switching to JDK 11 a NoClassDefFoundError is thrown

Caused by: java.lang.NoClassDefFoundError: javax/activation/MimeType
	at org.zalando.logbook.servlet.RemoteRequest.isFormRequest(RemoteRequest.java:119)
	at org.zalando.logbook.servlet.RemoteRequest.withBody(RemoteRequest.java:100)
	at org.zalando.logbook.DefaultLogbook.write(DefaultLogbook.java:45)
	at org.zalando.logbook.servlet.NormalStrategy.logRequestIfNecessary(NormalStrategy.java:48)
	at org.zalando.logbook.servlet.NormalStrategy.doFilter(NormalStrategy.java:32)
	at org.zalando.logbook.servlet.LogbookFilter.doFilter(LogbookFilter.java:39)
	at org.zalando.logbook.servlet.HttpFilter.doFilter(HttpFilter.java:31)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

Please consider the application at:
https://github.com/acet/logbook_demo_spring_starter
using both JDK 8 and JDK 11

Possible Fix

Include

        <dependency>
            <groupId>com.sun.activation</groupId>
            <artifactId>javax.activation</artifactId>
            <version>1.2.0</version>
        </dependency>

as a dependency in logback-servlet

Context

I use JDK 11 and so I must currently include javax.activation in my dependencies currently to work around this

@whiskeysierra
Copy link
Collaborator

Fix released as 1.13.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants