Java Runtime errors

Core environment and runtime library

https://java.com
Solution coverage:
Summary coverage:

Top patterns

  1. ArrayList.rangeCheck() has thrown an IndexOutOfBoundsException
    No solution
  2. JVM ran out of heap space while trying to create a copy of an existing array

    In Eclipse : go to Run --> Run Configurations --> then select the project under maven build --> then select the tab "JRE" --> then enter -Xmx1024m.

    This should increase the memory heap for all the builds/projects. The above memory size is 1 GB.

    Check the source of this solution for more info

  3. ArrayList.RangeCheck() has thrown an IndexOutOfBoundsException
    No solution

DescriptionException TypeEntry MethodWeb pages

ArrayList.rangeCheck() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.rangeCheck
2137Web pages
IndexOutOfBoundsExceptionArrayList.rangeCheck2137

JVM ran out of heap space while trying to create a copy of an existing array

java.lang.OutOfMemoryError
java.util.Arrays.copyOf
1386Web pages
1Solution
OutOfMemoryErrorArrays.copyOf1386

ArrayList.RangeCheck() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.ArrayList.RangeCheck
1167Web pages
IndexOutOfBoundsExceptionArrayList.RangeCheck1167

ArrayList$Itr.checkForComodification() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.ArrayList$Itr.checkForComodification
965Web pages
1Solution
ConcurrentModificationExceptionArrayList$Itr.checkForComodification965

HashMap$HashIterator.nextEntry() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.HashMap$HashIterator.nextEntry
956Web pages
ConcurrentModificationExceptionHashMap$HashIterator.nextEntry956

Hashtable.put() has thrown a NullPointerException

java.lang.NullPointerException
java.util.Hashtable.put
693Web pages
1Solution
NullPointerExceptionHashtable.put693

ResourceBundle.throwMissingResourceException() has thrown a MissingResourceException

java.util.MissingResourceException
java.util.ResourceBundle.throwMissingResourceException
631Web pages
MissingResourceExceptionResourceBundle.throwMissingResourceException631

Vector.elementAt() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.Vector.elementAt
605Web pages
ArrayIndexOutOfBoundsExceptionVector.elementAt605

Scanner.throwFor() has thrown an InputMismatchException

java.util.InputMismatchException
java.util.Scanner.throwFor
556Web pages
InputMismatchExceptionScanner.throwFor556

AbstractList$Itr.checkForComodification() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.AbstractList$Itr.checkForComodification
555Web pages
ConcurrentModificationExceptionAbstractList$Itr.checkForComodification555

Scanner.throwFor() has thrown a NoSuchElementException

java.util.NoSuchElementException
java.util.Scanner.throwFor
515Web pages
NoSuchElementExceptionScanner.throwFor515

HashMap$HashIterator.nextNode() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.HashMap$HashIterator.nextNode
448Web pages
ConcurrentModificationExceptionHashMap$HashIterator.nextNode448

ResourceBundle.getObject() has thrown a MissingResourceException

java.util.MissingResourceException
java.util.ResourceBundle.getObject
391Web pages
MissingResourceExceptionResourceBundle.getObject391

ArrayList.elementData() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.ArrayList.elementData
380Web pages
1Solution
ArrayIndexOutOfBoundsExceptionArrayList.elementData380

Arrays.copyOfRange() has thrown an OutOfMemoryError

java.lang.OutOfMemoryError
java.util.Arrays.copyOfRange
353Web pages
OutOfMemoryErrorArrays.copyOfRange353

Objects.requireNonNull() has thrown a NullPointerException

java.lang.NullPointerException
java.util.Objects.requireNonNull
298Web pages
NullPointerExceptionObjects.requireNonNull298

ServiceLoader.fail() has thrown a ServiceConfigurationError

java.util.ServiceConfigurationError
java.util.ServiceLoader.fail
278Web pages
ServiceConfigurationErrorServiceLoader.fail278

Scanner.nextLine() has thrown a NoSuchElementException

java.util.NoSuchElementException
java.util.Scanner.nextLine
266Web pages
NoSuchElementExceptionScanner.nextLine266

Random.nextInt() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
java.util.Random.nextInt
265Web pages
IllegalArgumentExceptionRandom.nextInt265

StringTokenizer.nextToken() has thrown a NoSuchElementException

java.util.NoSuchElementException
java.util.StringTokenizer.nextToken
253Web pages
NoSuchElementExceptionStringTokenizer.nextToken253

Properties$LineReader.readLine() has thrown a NullPointerException

java.lang.NullPointerException
java.util.Properties$LineReader.readLine
253Web pages
NullPointerExceptionProperties$LineReader.readLine253

Stack.peek() has thrown an EmptyStackException

java.util.EmptyStackException
java.util.Stack.peek
239Web pages
EmptyStackExceptionStack.peek239

Trying to access element at index outside the bounds of the ArrayList

java.lang.IndexOutOfBoundsException
java.util.ArrayList.get
225Web pages
1Solution
IndexOutOfBoundsExceptionArrayList.get225

TimSort.mergeLo() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
java.util.TimSort.mergeLo
196Web pages
IllegalArgumentExceptionTimSort.mergeLo196

LinkedList$ListItr.checkForComodification() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.LinkedList$ListItr.checkForComodification
189Web pages
ConcurrentModificationExceptionLinkedList$ListItr.checkForComodification189

AbstractList.add() has thrown an UnsupportedOperationException

java.lang.UnsupportedOperationException
java.util.AbstractList.add
179Web pages
UnsupportedOperationExceptionAbstractList.add179

Hashtable.get() has thrown a NullPointerException

java.lang.NullPointerException
java.util.Hashtable.get
175Web pages
NullPointerExceptionHashtable.get175

TimSort.mergeHi() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
java.util.TimSort.mergeHi
168Web pages
IllegalArgumentExceptionTimSort.mergeHi168

Calling get() method on an empty Optional object

java.util.NoSuchElementException
java.util.Optional.get
167Web pages
1Solution
NoSuchElementExceptionOptional.get167

LinkedHashMap$LinkedHashIterator.nextEntry() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.LinkedHashMap$LinkedHashIterator.nextEntry
166Web pages
ConcurrentModificationExceptionLinkedHashMap$LinkedHashIterator.nextEntry166

Formatter$FormatSpecifier.failConversion() has thrown an IllegalFormatConversionException

java.util.IllegalFormatConversionException
java.util.Formatter$FormatSpecifier.failConversion
155Web pages
IllegalFormatConversionExceptionFormatter$FormatSpecifier.failConversion155

AbstractList$Itr.next() has thrown a NoSuchElementException

java.util.NoSuchElementException
java.util.AbstractList$Itr.next
149Web pages
NoSuchElementExceptionAbstractList$Itr.next149

Vector.get() has thrown an ArrayIndexOutOfBoundsException

java.lang.ArrayIndexOutOfBoundsException
java.util.Vector.get
148Web pages
ArrayIndexOutOfBoundsExceptionVector.get148

ArrayList.addAll() has thrown a NullPointerException

java.lang.NullPointerException
java.util.ArrayList.addAll
139Web pages
NullPointerExceptionArrayList.addAll139

Timer.sched() has thrown an IllegalStateException

java.lang.IllegalStateException
java.util.Timer.sched
132Web pages
IllegalStateExceptionTimer.sched132

StringTokenizer.<init>() has thrown a NullPointerException

java.lang.NullPointerException
java.util.StringTokenizer.<init>
132Web pages
NullPointerExceptionStringTokenizer.<init>132

ArrayList$Itr.next() has thrown a NoSuchElementException

java.util.NoSuchElementException
java.util.ArrayList$Itr.next
132Web pages
NoSuchElementExceptionArrayList$Itr.next132

Trying to call setTime() on a null Calendar object

java.lang.NullPointerException
java.util.Calendar.setTime
121Web pages
1Solution
NullPointerExceptionCalendar.setTime121

AbstractList.remove() has thrown an UnsupportedOperationException

java.lang.UnsupportedOperationException
java.util.AbstractList.remove
118Web pages
UnsupportedOperationExceptionAbstractList.remove118

TreeMap$PrivateEntryIterator.nextEntry() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.TreeMap$PrivateEntryIterator.nextEntry
114Web pages
ConcurrentModificationExceptionTreeMap$PrivateEntryIterator.nextEntry114

LinkedList.checkElementIndex() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.LinkedList.checkElementIndex
113Web pages
IndexOutOfBoundsExceptionLinkedList.checkElementIndex113

Collections$EmptyList.get() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
java.util.Collections$EmptyList.get
109Web pages
IndexOutOfBoundsExceptionCollections$EmptyList.get109

Arrays.asList() has thrown a NullPointerException

java.lang.NullPointerException
1 frames hidden
java.util.Arrays.asList
107Web pages
NullPointerExceptionArrays.asList107

Formatter.checkText() has thrown an UnknownFormatConversionException

java.util.UnknownFormatConversionException
java.util.Formatter.checkText
102Web pages
UnknownFormatConversionExceptionFormatter.checkText102

TreeMap.compare() has thrown a ClassCastException

java.lang.ClassCastException
java.util.TreeMap.compare
101Web pages
ClassCastExceptionTreeMap.compare101

Formatter.format() has thrown a MissingFormatArgumentException

java.util.MissingFormatArgumentException
java.util.Formatter.format
100Web pages
MissingFormatArgumentExceptionFormatter.format100

LinkedHashMap$LinkedHashIterator.nextNode() has thrown a ConcurrentModificationException

java.util.ConcurrentModificationException
java.util.LinkedHashMap$LinkedHashIterator.nextNode
91Web pages
ConcurrentModificationExceptionLinkedHashMap$LinkedHashIterator.nextNode91

HashMap$HashIterator.nextEntry() has thrown a NoSuchElementException

java.util.NoSuchElementException
java.util.HashMap$HashIterator.nextEntry
90Web pages
NoSuchElementExceptionHashMap$HashIterator.nextEntry90

EventObject.<init>() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
java.util.EventObject.<init>
87Web pages
IllegalArgumentExceptionEventObject.<init>87

Properties.loadConvert() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
java.util.Properties.loadConvert
79Web pages
IllegalArgumentExceptionProperties.loadConvert79
Package namePatterns foundSolution coverageSummary coverage
java.lang40155
java.io3870
java.awt3607
java.util.concurrent3491
java.lang.reflect3454
sun.reflect2108
java.util2071
java.net2067
javax.swing1378
java.security854
javax.naming842
java.sql689
sun.net.www.protocol.http688
sun.net.www.protocol.https681
sun.nio.ch457
java.util.zip289
sun.rmi.server287
java.nio.file261
java.util.regex260
sun.rmi.transport.tcp259
com.sun.jndi.ldap243
com.sun.org.apache.xerces.internal.impl235
com.sun.org.apache.xerces.internal.parsers221
javax.swing.plaf.basic217
sun.net.www.http217
java.util.stream180
sun.misc179
java.util.logging153
com.sun.org.apache.xerces.internal.jaxp151
java.nio148
java.util.jar142
javax.swing.text141
sun.launcher138
java.beans137
java.text133
javax.imageio130
sun.rmi.registry127
javax.management.remote.rmi116
javax.security.auth.login115
javax.net.ssl114
java.rmi114
com.sun.org.apache.xalan.internal.xsltc.trax110
sun.nio.cs110
java.awt.image104
javax.security.auth98
sun.rmi.transport97
java.nio.channels95
sun.instrument92
java.util.concurrent.locks88
java.awt.event86
Package nameClass namePatterns foundSolution coverageSummary coverage
java.utilTimerThread375
java.utilArrays164
java.utilArrayList161
java.utilHashMap126
java.utilCollections69
java.utilTreeMap66
java.utilResourceBundle63
java.utilAbstractCollection62
java.utilLinkedList61
java.utilScanner52
java.utilVector47
java.utilHashSet46
java.utilAbstractList39
java.utilTreeSet32
java.utilHashtable31
java.utilProperties30
java.utilFormatter28
java.utilServiceLoader$125
java.utilTimSort24
java.utilTimer23
java.utilOptional20
java.utilCalendar20
java.utilAbstractList$Itr19
java.utilComparableTimSort18
java.utilServiceLoader$LazyIterator17
java.utilLinkedHashMap17
java.utilDate15
java.utilTimeZone15
java.utilAbstractMap15
java.utilCollections$UnmodifiableCollection$114
java.utilServiceLoader13
java.utilCollections$UnmodifiableList12
java.utilWeakHashMap12
java.utilCollections$UnmodifiableCollection12
java.utilGregorianCalendar12
java.utilLocale11
java.utilFormatter$FormatSpecifier10
java.utilUUID10
java.utilStringTokenizer10
java.utilArrayList$Itr10
java.utilSubList9
java.utilArrayList$SubList9
java.utilHashMap$KeyIterator8
java.utilLinkedHashMap$LinkedHashIterator8
java.utilArrayDeque8
java.utilStack7
java.utilLinkedList$ListItr7
java.utilBitSet7
java.utilHashMap$HashIterator7
java.utilCollections$UnmodifiableMap7
Package nameClass nameMethod namePatterns foundSolution coverage
java.utilTimerThreadrun368
java.utilArraysmergeSort69
java.utilArrayssort53
java.utilCollectionssort42
java.utilResourceBundlegetBundle25
java.utilHashMapput24
java.utilFormatterformat24
java.utilAbstractCollectiontoArray22
java.utilArrayList<init>22
java.utilServiceLoader$1next21
java.utilHashSetadd20
java.utilArrayListreadObject20
java.utilHashMapwriteObject19
java.utilTimSortsort18
java.utilAbstractCollectionaddAll17
java.utilArrayListadd16
java.utilArrayListwriteObject15
java.utilHashMapreadObject15
java.utilHashMap<init>14
java.utilComparableTimSortsort14
java.utilTimer<init>13
java.utilArrayscopyOf13
java.utilAbstractListadd13
java.utilCollections$UnmodifiableCollection$1next13
java.utilTreeMapget12
java.utilPropertiesload12
java.utilArrayListaddAll12
java.utilTreeMapput12
java.utilResourceBundlefindBundle12
java.utilOptionalifPresent11
java.utilAbstractList$Itrnext11
java.utilTreeSetadd11
java.utilResourceBundlegetString10
java.utilHashtableput10
java.utilHashSet<init>10
java.utilServiceLoader$LazyIteratornext10
java.utilArrayListtoArray10
java.utilArrayListget9
java.utilHashMapget9
java.utilArrayListremove9
java.utilCollections$UnmodifiableListget9
java.utilScanner<init>9
java.utilTimerThreadmainLoop8
java.utilScannernextInt8
java.utilArrayscopyOfRange8
java.utilPropertiesgetProperty8
java.utilHashSetiterator8
java.utilTreeMapgetEntry8
java.utilVector<init>7
java.utilLinkedListremove7
Package nameClass nameMethod nameException TypePatterns foundSolution coverage
java.utilTimerThreadrunIllegalStateException38
java.utilTimerThreadrunNullPointerException30
java.utilArraysmergeSortNullPointerException26
java.utilCollectionssortIllegalArgumentException21
java.utilArraysmergeSortNoSuchMethodError19
java.utilArrayssortNullPointerException18
java.utilHashMapwriteObjectNotSerializableException16
java.utilTimerThreadrunRuntimeException16
java.utilArrayssortIllegalArgumentException15
java.utilTimerThreadrunIOException15
java.utilServiceLoader$1nextServiceConfigurationError15
java.utilTimerThreadrunNoClassDefFoundError14
java.utilTimerThreadrunFileNotFoundException12
java.utilArraysmergeSortClassCastException12
java.utilCollections$UnmodifiableCollection$1nextConcurrentModificationException11
java.utilResourceBundlegetBundleMissingResourceException11
java.utilHashMapputOutOfMemoryError11
java.utilTimerThreadrunClassNotFoundException9
java.utilTimerThreadrunSQLException9
java.utilAbstractCollectiontoArrayConcurrentModificationException9
java.utilArrayssortClassCastException9
java.utilHashSetaddOutOfMemoryError8
java.utilArrayList<init>ConcurrentModificationException8
java.utilArrayListaddOutOfMemoryError8
java.utilTimer<init>OutOfMemoryError8
java.utilArrayListwriteObjectNotSerializableException8
java.utilTimerThreadrunIllegalArgumentException8
java.utilTimSortsortNullPointerException7
java.utilTimerThreadrunAnimatorBase$UncaughtAnimatorException7
java.utilTimerThreadrunException7
java.utilCollectionssortUnsupportedOperationException6
java.utilResourceBundlegetStringMissingResourceException6
java.utilFormatterformatIllegalFormatConversionException6
java.utilFormatterformatUnknownFormatConversionException6
java.utilTimerThreadrunOpenAS2Exception6
java.utilTimerThreadrunConnectException6
java.utilTreeMapputNullPointerException6
java.utilTreeMapgetNullPointerException6
java.utilCollectionsmaxNoSuchElementException6
java.utilArrayList<init>OutOfMemoryError5
java.utilHashSetaddStackOverflowError5
java.utilOptionalifPresentMissingPropertyException5
java.utilTimerThreadrunWrappedException5
java.utilArrayListremoveIndexOutOfBoundsException5
java.utilTreeSetaddAllNullPointerException5
java.utilTimerThreadrunIASDeploymentException5
java.utilCollections$UnmodifiableListgetIndexOutOfBoundsException5
java.utilHashMapgetStackOverflowError5
java.utilArrayListaddAllOutOfMemoryError5
java.utilComparableTimSortsortIllegalArgumentException5