Questions tagged [runtimeexception]

RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Virtual Machine.

RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Virtual Machine.

1062 questions
21
votes
1 answer

How to resolve this java.lang.RuntimeException?

The Google Developer Console shows that my app has received two of the same errors in the past month, but this RuntimeException doesn't specify a class or file for which the error stems from. There's nothing specific that I can see. Below are the…
4u53r
  • 717
  • 1
  • 7
  • 17
20
votes
4 answers

Handling RuntimeExceptions in Java

Can anyone explain how to handle the Runtime Exceptions in Java?
RKCY
  • 4,095
  • 14
  • 61
  • 97
20
votes
3 answers

Unmarshalling errors in Android app with custom parcelable classes

For my Android application, I get several unmarshalling errors although I think I've done everything that is needed to properly save and load objects via Parcelables. Can you tell me what's wrong with my code? Error 1: java.lang.RuntimeException:…
caw
  • 30,999
  • 61
  • 181
  • 291
19
votes
4 answers

Getting elasticsearch "can not run as root" error after upgrading from SonarQube 6.5 to 6.6. Nothing else changed

Getting elasticsearch "can not run as root" error after upgrading from SonarQube 6.5 to 6.6. Nothing else changed. CentOS release 6.8 (Final) Java(TM) SE Runtime Environment (build 1.8.0_101-b13) java.lang.RuntimeException: can not run elasticsearch…
18
votes
1 answer

Throw RuntimeException inside Stream with Optional.orElseThrow

The following code works fine: Stream.of("key1", "key2") .map(key -> { SomeObject foo = service.find(key); if (foo == null) { throw new RuntimeException("No entity found with key: " + key); } return foo; }) …
Journeycorner
  • 2,474
  • 3
  • 19
  • 43
17
votes
2 answers

Custom notification: java.lang.RuntimeException: bad array lengths

I'm trying to use custom notifications in my Android application using Google's sample from here (section Creating a Custom Notification Layout). Since I'm using this exact code I got a RuntimeException every few times a notification is fired. My…
user1026605
  • 1,633
  • 4
  • 22
  • 58
17
votes
2 answers

Camera java.lang.RuntimeException: setParameters failed

I have created a custom camera app using this source code, but on few devices (like on High Resolution Devices) I am getting: RuntimeException setParameters failed I am facing this exception, due to this: params.setPictureSize(1200, 900); And I…
Sonali
  • 783
  • 4
  • 11
  • 26
16
votes
1 answer

List of Spring Runtime Exceptions

Does anyone know where I can find a list of Spring's (3.0.x) runtime exceptions? I'm talking about exceptions like DataRetrievalFailureException; there's a whole set of these runtime exceptions that you can throw.
Vivin Paliath
  • 94,126
  • 40
  • 223
  • 295
16
votes
2 answers

long SVG Asset file error : R is not a valid verb. Failure occurred at position 2 of path: STRING_TOO_LARGE

I'm having some problems with Android Studio at the moment because I recently started using "Vector Assets". I've done absolutely everything necessary to display them correctly in my application (using the app:srcCompat="" in the xml, android…
16
votes
7 answers

Checked vs Unchecked exception

What does the following quote mean? With an unchecked exception, however, the compiler doesn't force client programmers either to catch the exception or declare it in a throws clause. In fact, client programmers may not even know that the exception…
Laawanya
  • 241
  • 1
  • 3
  • 8
16
votes
2 answers

RuntimeException: Could not dispatch event @ otto

we have an issue in our current app-version with the EventHandler from otto. We get a RuntimeException in our crash-log, with following description: "Reason: java.lang.RuntimeException: Could not dispatch event: …
iFoukis
  • 274
  • 1
  • 2
  • 11
15
votes
3 answers

Why is catching a RuntimeException not considered a good programming practice?

Why is catching a RuntimeException using catch(Throwable exc) {} not considered a good programming practice? What is the right way to handle RuntimeExceptions? Also, why does catch(Exception exc) {} not catch RuntimeException? How is this behavior…
SPS
  • 183
  • 1
  • 2
  • 10
15
votes
2 answers

Why does android logcat not show the stack trace for a runtime exception?

An android application that I am currently developing was crashing (fixed that), due to what should have raised an IndexOutOfBoundsException. I was accessing a string in the doInBackground method of a class that extends AyncTask, from the variable…
14
votes
2 answers

kafka AdminClient API Timed out waiting for node assignment

I'm new to Kafka and am trying to use the AdminClient API to manage the Kafka server running on my local machine. I have it setup exactly the same as in the quick start section of the Kafka documentation. The only difference being that I have not…
Spazoide
  • 163
  • 1
  • 6
14
votes
4 answers

Why NullPointerException is a runtime exception and RemoteException not?

A possible reason because a NullPointerException is a runtime exception is because every method can throw it, so every method would need to have a "throws NullPointerException", and would be ugly. But this happens with RemoteException. And a…
The Student
  • 27,520
  • 68
  • 161
  • 264
1 2
3
70 71