Will version 0.2.3 of javabrake compile under java 8?
Closed this issue · 8 comments
Hello,
I just tried upgrading to the latest version of javabrake (0.2.3) and am encountering the error below.
I did some googling and discovered that the problem is because the code was compiled with Java 11, but we are still using Java 8.
Can I obtain a version of Airbrake that was compiled with Java 8?
If not, we could pull your code and compile our own WAR, provided that the code does not depend on Java 11. Do you know the answer to that?
Thanks.
You are able to clone the repo and build it in a version that works for you. NOTE: There is the risk that java 8 has something which is superseded in Java 11.
Unfortunately, we (currently) don’t publish versions of our package built with diff versions of the JDK
@landydan thanks for reporting this. Can you please try v0.2.4
? It was built with Java 8 so I suspect that will solve the issue for you. Please let us know how it goes. 👍
Thank you for you help.
It appears that version 0.2.4 is working. I'll just need to do a bit more testing.
One thing: When I ran our app initially with the wrong Airbrake credentials, I saw a GSON error in the logs at startup time.
It looks like the bad credentials caused an "Access Denied" message in XML format, but the code is trying to parse this as json?
Here's the error:
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.google.gson.Gson.fromJson(Gson.java:689)
at io.airbrake.javabrake.PollTask.run(PollTask.java:69)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:165)
... 7 more
parse error on:
AccessDenied
Access Denied1HNCWW7DWFTG2SQ3tzUk2bf8OAHNDvbo9nTNxeyJMsI8TZe7nRazVX9vSM3hTTJUhUJWchO2gsj5XmTjhLhoYwUUfHM=
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
Tagging @mmcdaris In case you missed the above response from Dan
@scottsbaldwin see above
@nthatcher-airbrake noted. From what was reported, @landydan is able to use the new version ok. There is a side effect if there is a credential problem, but that isn't impacting this situation now. We will add this to our backlog and look at later.
Correct -- the issue reported here is not a problem for me, I was only passing it on for your information.
Thanks for your help.
Access Denied issue is handled