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.

java.lang.ExceptionInInitializerError on Samsung Devices with Android 5.x

See original GitHub issue

It seems that ical4j version 2.0.0 causes the following crash on Samsung devices with Android 5.x.x, it is related to the ServiceLoader usage. Ideas?

Fatal Exception: java.lang.ExceptionInInitializerError
       at net.fortuna.ical4j.model.Calendar.(SourceFile)
       at net.fortuna.ical4j.model.Calendar.(SourceFile)
       at net.fortuna.ical4j.data.CalendarBuilder$ContentHandlerImpl.startCalendar(SourceFile:307)
       at net.fortuna.ical4j.data.CalendarParserImpl.parse(SourceFile:119)
       at net.fortuna.ical4j.data.CalendarBuilder.build(SourceFile:198)
       at net.fortuna.ical4j.data.CalendarBuilder.build(SourceFile:178)
       at net.fortuna.ical4j.data.CalendarBuilder.build(SourceFile:165)
       ...
Caused by java.util.NoSuchElementException
       at java.util.ServiceLoader$ServiceIterator.next(ServiceLoader.java:210)
       at net.fortuna.ical4j.validate.AbstractCalendarValidatorFactory.(SourceFile)
       at net.fortuna.ical4j.model.Calendar.(SourceFile)
       at net.fortuna.ical4j.model.Calendar.(SourceFile)
       at net.fortuna.ical4j.data.CalendarBuilder$ContentHandlerImpl.startCalendar(SourceFile:307)
       at net.fortuna.ical4j.data.CalendarParserImpl.parse(SourceFile:119)
       at net.fortuna.ical4j.data.CalendarBuilder.build(SourceFile:198)
       at net.fortuna.ical4j.data.CalendarBuilder.build(SourceFile:178)
       at net.fortuna.ical4j.data.CalendarBuilder.build(SourceFile:165)
       ...

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
benfortunacommented, Apr 24, 2017

The reason that 1.0.7 isn’t affected is that it doesn’t use service loader to loader the factories. It appears service loader is the problem so we’ll be looking to replace it completely to resolve this issue.

1reaction
rnevetcommented, Jan 17, 2017

That does sound weird, actually this is crashing on a production app with many daily users the reports only indicate Samsung devices with Android 5.X. I did manage to reproduce it myself on an Galaxy S4 with Android 5.0.1, is there something additional I can test for?

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.ExceptionInInitializerError when button is clicked
I have built apk and instaled that one on my S5, it crashes too when I click on the button, so the code...
Read more >
Coroutine: delay() crashes Samsung android 5.0 devices with ...
Coroutine: delay() crashes Samsung android 5.0 devices with Fatal Exception: java.lang.ExceptionInInitializerError.
Read more >
ExceptionInInitializerError - Android Developers
Constructs a new ExceptionInInitializerError class by saving a reference to the Throwable object thrown for later retrieval by the getException() method.
Read more >
Getting Started - Samsung Developers
Verify that your development system meets the requirements specified by the Android System Requirements. Set up your Java environment:.
Read more >
Re: java.lang.UnsatisfiedLinkError crash on startup for some ...
It once happened to me after pushing the app to the phone via usb (during the normal everyday development process). I got the...
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