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

Pushing stacktrace failed on JDK17 #12

Closed
sis-yoshiday opened this issue Feb 16, 2022 · 5 comments
Closed

Pushing stacktrace failed on JDK17 #12

sis-yoshiday opened this issue Feb 16, 2022 · 5 comments

Comments

@sis-yoshiday
Copy link

Hi

This problem is not directly with airbrake-logback, but with gson, which airbrake-logback depends on.

Please refer below issue.
google/gson#1979

Current workaround is adding --add-opens java.base/java.lang=ALL-UNNAMED to jvm startup argument.

@rand3920
Copy link

are you using this fix for the

"Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected java.nio.channels.FileChannel() accessible: module java.base does not "opens java.nio.channels" to unnamed module @1ecb984a"

error? @sis-yoshiday

@sis-yoshiday
Copy link
Author

@rand3920
In out case, stacktrace is below.
error is occurred when OkSender serialize Throwable object.

12:39:48,004 |-ERROR in io.airbrake.logback.AirbrakeAppender[AIRBRAKE] - Appender [AIRBRAKE] failed to append. java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @341baa56
	at java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @341baa56
	at 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at 	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at 	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
	at 	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
	at 	at com.google.gson.internal.reflect.UnsafeReflectionAccessor.makeAccessible(UnsafeReflectionAccessor.java:44)
	at 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:159)
	at 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
	at 	at com.google.gson.Gson.getAdapter(Gson.java:489)
	at 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
	at 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
	at 	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
	at 	at com.google.gson.Gson.getAdapter(Gson.java:489)
	at 	at com.google.gson.Gson.toJson(Gson.java:727)
	at 	at com.google.gson.Gson.toJson(Gson.java:714)
	at 	at com.google.gson.Gson.toJson(Gson.java:669)
	at 	at com.google.gson.Gson.toJson(Gson.java:649)
	at 	at io.airbrake.javabrake.OkSender.noticeJson(OkSender.java:70)
	at 	at io.airbrake.javabrake.OkSender.buildRequest(OkSender.java:57)
	at 	at io.airbrake.javabrake.OkAsyncSender.send(OkAsyncSender.java:44)
	at 	at io.airbrake.javabrake.Notifier.send(Notifier.java:68)
	at 	at io.airbrake.logback.AirbrakeAppender.send(AirbrakeAppender.java:117)
	at 	at io.airbrake.logback.AirbrakeAppender.append(AirbrakeAppender.java:73)
	at 	at io.airbrake.logback.AirbrakeAppender.append(AirbrakeAppender.java:19)
	at 	at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:82)
	at 	at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51)
	at 	at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:270)
	at 	at ch.qos.logback.classic.Logger.callAppenders(Logger.java:257)
	at 	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421)
	at 	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
	at 	at ch.qos.logback.classic.Logger.error(Logger.java:538)

@sumitjoshi1989
Copy link
Contributor

The earlier issue has been solved in the currently released version. Have a look.

@sis-yoshiday
Copy link
Author

@sumitjoshi1989
thanks, but 0.1.2 is released ?
I can't found it from maven central repository.
https://mvnrepository.com/artifact/io.airbrake/logback

this probrem reproduce at io.airbrake:logback:0.1.1

@mmcdaris
Copy link
Member

mmcdaris commented Oct 3, 2023

Sorry the release to mvnrepository slipped by us. It is live there now. Please let us know if you have any issues upgrading.

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

4 participants