1. Explore
  2. »
  3. Java Runtime

Java Runtime errors

Core environment and runtime library

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

Top patterns

  1. 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

  2. JNI unable to find native library
    No solution
  3. Empty/Corrupted zip file or file not found in the path provided
    No solution
Error patternsPackagesClassesMethodsExceptions
DescriptionException TypeEntry MethodWeb pages

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

java.lang.OutOfMemoryError
java.util.Arrays.copyOf
1435Web pages
1Solution
OutOfMemoryErrorArrays.copyOf()1435

JNI unable to find native library

java.lang.UnsatisfiedLinkError
java.lang.Runtime.loadLibrary
1412Web pages
UnsatisfiedLinkErrorRuntime.loadLibrary()1412

Empty/Corrupted zip file or file not found in the path provided

java.util.zip.ZipException
java.util.zip.ZipFile.open
1410Web pages
ZipExceptionZipFile.open()1410

Unable to establish connection with server

java.net.ConnectException
sun.nio.ch.SocketChannelImpl.checkConnect
1409Web pages
ConnectExceptionSocketChannelImpl.checkConnect()1409

SecureClassLoader.defineClass() has thrown a NoClassDefFoundError

java.lang.NoClassDefFoundError
2 frames hidden
java.security.SecureClassLoader.defineClass
1408Web pages
NoClassDefFoundErrorSecureClassLoader.defineClass()1408

Trying to write an object to a file/socket that is not serializable

java.io.NotSerializableException
java.io.ObjectOutputStream.writeObject0
1388Web pages
1Solution
NotSerializableExceptionObjectOutputStream.writeObject0()1388

FileInputStream.<init>() has thrown a FileNotFoundException

java.io.FileNotFoundException
2 frames hidden
java.io.FileInputStream.<init>
1385Web pages
FileNotFoundExceptionFileInputStream.<init>()1385

System.loadLibrary() has thrown an UnsatisfiedLinkError

java.lang.UnsatisfiedLinkError
1 frames hidden
java.lang.System.loadLibrary
1371Web pages
1Solution
UnsatisfiedLinkErrorSystem.loadLibrary()1371

ClassLoader.loadClass() has thrown a ClassNotFoundException

java.lang.ClassNotFoundException
2 frames hidden
java.lang.ClassLoader.loadClass
1370Web pages
1Solution
ClassNotFoundExceptionClassLoader.loadClass()1370

SocketChannelImpl.finishConnect() has thrown a ConnectException

java.net.ConnectException
1 frames hidden
sun.nio.ch.SocketChannelImpl.finishConnect
1366Web pages
ConnectExceptionSocketChannelImpl.finishConnect()1366

URLClassLoader.access$100() has thrown an UnsupportedClassVersionError

java.lang.UnsupportedClassVersionError
4 frames hidden
java.net.URLClassLoader.access$100
1364Web pages
UnsupportedClassVersionErrorURLClassLoader.access$100()1364

URLClassLoader$1.run() has thrown an UnsupportedClassVersionError

java.lang.UnsupportedClassVersionError
5 frames hidden
java.net.URLClassLoader$1.run
1356Web pages
UnsupportedClassVersionErrorURLClassLoader$1.run()1356

ZipFile.<init>() has thrown a ZipException

java.util.zip.ZipException
1 frames hidden
java.util.zip.ZipFile.<init>
1344Web pages
ZipExceptionZipFile.<init>()1344

ClassLoader.loadClass() has thrown a ClassNotFoundException

java.lang.ClassNotFoundException
4 frames hidden
java.lang.ClassLoader.loadClass
1310Web pages
ClassNotFoundExceptionClassLoader.loadClass()1310

ClassLoader.loadClass() has thrown a ClassNotFoundException

java.lang.ClassNotFoundException
5 frames hidden
java.lang.ClassLoader.loadClass
1289Web pages
ClassNotFoundExceptionClassLoader.loadClass()1289

The index provided to String's charAt() method is either greater or equal to the size of the String or less than 0

java.lang.StringIndexOutOfBoundsException
java.lang.String.charAt
1285Web pages
1Solution
StringIndexOutOfBoundsExceptionString.charAt()1285

ValidatePipe.copyImage() has thrown a ClassCastException

java.lang.ClassCastException
6 frames hidden
sun.java2d.pipe.ValidatePipe.copyImage
1275Web pages
ClassCastExceptionValidatePipe.copyImage()1275

SunGraphics2D.drawImage() has thrown a ClassCastException

java.lang.ClassCastException
8 frames hidden
sun.java2d.SunGraphics2D.drawImage
1271Web pages
ClassCastExceptionSunGraphics2D.drawImage()1271

Connection no longer available while trying to read from socket

java.net.SocketException
1 frames hidden
java.net.SocketInputStream.read
1197Web pages
1Solution
SocketExceptionSocketInputStream.read()1197

Class not found in classpath, for the class referenced in Class.forName() method

java.lang.NoClassDefFoundError
java.lang.Class.forName0
1196Web pages
NoClassDefFoundErrorClass.forName0()1196

Error in MySql query syntax

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
sun.reflect.NativeConstructorAccessorImpl.newInstance0
1189Web pages
MySQLSyntaxErrorExceptionNativeConstructorAccessorImpl.newInstance0()1189

ClassLoader.defineClass() has thrown a NoClassDefFoundError

java.lang.NoClassDefFoundError
1 frames hidden
java.lang.ClassLoader.defineClass
1184Web pages
NoClassDefFoundErrorClassLoader.defineClass()1184

Socket.connect() has thrown a ConnectException

java.net.ConnectException
6 frames hidden
java.net.Socket.connect
1178Web pages
ConnectExceptionSocket.connect()1178

Index provided to the ArrayList method is either greater or equal to size of the list or less than 0

java.lang.IndexOutOfBoundsException
java.util.ArrayList.RangeCheck
1177Web pages
IndexOutOfBoundsExceptionArrayList.RangeCheck()1177

FileInputStream.open() has thrown a FileNotFoundException

java.io.FileNotFoundException
1 frames hidden
java.io.FileInputStream.open
1162Web pages
FileNotFoundExceptionFileInputStream.open()1162

NativeConstructorAccessorImpl.newInstance() has thrown a MySQLSyntaxErrorException

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
1 frames hidden
sun.reflect.NativeConstructorAccessorImpl.newInstance
1152Web pages
MySQLSyntaxErrorExceptionNativeConstructorAccessorImpl.newInstance()1152

File/Directory does not exist in the provided path

java.io.FileNotFoundException
2 frames hidden
java.io.FileInputStream.<init>
1150Web pages
1Solution
FileNotFoundExceptionFileInputStream.<init>()1150

URL not properly encoded or incorrect URL format

java.net.MalformedURLException
java.net.URL.<init>
1145Web pages
MalformedURLExceptionURL.<init>()1145

Class.forName() has thrown a NoClassDefFoundError

java.lang.NoClassDefFoundError
1 frames hidden
java.lang.Class.forName
1144Web pages
1Solution
NoClassDefFoundErrorClass.forName()1144

DelegatingConstructorAccessorImpl.newInstance() has thrown a MySQLSyntaxErrorException

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
2 frames hidden
sun.reflect.DelegatingConstructorAccessorImpl.newInstance
1137Web pages
MySQLSyntaxErrorExceptionDelegatingConstructorAccessorImpl.newInstance()1137

URLClassLoader.defineClass() has thrown a NoClassDefFoundError

java.lang.NoClassDefFoundError
3 frames hidden
java.net.URLClassLoader.defineClass
1130Web pages
NoClassDefFoundErrorURLClassLoader.defineClass()1130

Class.forName0() has thrown a ClassNotFoundException

java.lang.ClassNotFoundException
7 frames hidden
java.lang.Class.forName0
1126Web pages
ClassNotFoundExceptionClass.forName0()1126

Constructor.newInstance() has thrown a MySQLSyntaxErrorException

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException
3 frames hidden
java.lang.reflect.Constructor.newInstance
1122Web pages
MySQLSyntaxErrorExceptionConstructor.newInstance()1122

Class.forName() has thrown a ClassNotFoundException

java.lang.ClassNotFoundException
8 frames hidden
java.lang.Class.forName
1122Web pages
ClassNotFoundExceptionClass.forName()1122

URL.<init>() has thrown a MalformedURLException

java.net.MalformedURLException
1 frames hidden
java.net.URL.<init>
1104Web pages
MalformedURLExceptionURL.<init>()1104

SocketInputStream.read() has thrown a SocketTimeoutException

java.net.SocketTimeoutException
1 frames hidden
java.net.SocketInputStream.read
1080Web pages
SocketTimeoutExceptionSocketInputStream.read()1080

ArrayList.get() has thrown an IndexOutOfBoundsException

java.lang.IndexOutOfBoundsException
1 frames hidden
java.util.ArrayList.get
1075Web pages
IndexOutOfBoundsExceptionArrayList.get()1075

ClassLoader.defineClassCond() has thrown an UnsupportedClassVersionError

java.lang.UnsupportedClassVersionError
1 frames hidden
java.lang.ClassLoader.defineClassCond
1070Web pages
UnsupportedClassVersionErrorClassLoader.defineClassCond()1070

Runtime.loadLibrary0() has thrown an UnsatisfiedLinkError

java.lang.UnsatisfiedLinkError
3 frames hidden
java.lang.Runtime.loadLibrary0
1068Web pages
UnsatisfiedLinkErrorRuntime.loadLibrary0()1068

ClassLoader.defineClass() has thrown an UnsupportedClassVersionError

java.lang.UnsupportedClassVersionError
2 frames hidden
java.lang.ClassLoader.defineClass
1064Web pages
UnsupportedClassVersionErrorClassLoader.defineClass()1064

System.loadLibrary() has thrown an UnsatisfiedLinkError

java.lang.UnsatisfiedLinkError
4 frames hidden
java.lang.System.loadLibrary
1060Web pages
UnsatisfiedLinkErrorSystem.loadLibrary()1060

SecureClassLoader.defineClass() has thrown a NoClassDefFoundError

java.lang.NoClassDefFoundError
2 frames hidden
java.security.SecureClassLoader.defineClass
1054Web pages
NoClassDefFoundErrorSecureClassLoader.defineClass()1054

Multiple threads trying to modify ArrayList at the same time or trying to modify ArrayList while iterating over it

java.util.ConcurrentModificationException
java.util.ArrayList$Itr.checkForComodification
1045Web pages
1Solution
ConcurrentModificationExceptionArrayList$Itr.checkForComodification()1045

Unable to find suitable driver to create connection with database server

java.sql.SQLException
java.sql.DriverManager.getConnection
1043Web pages
1Solution
SQLExceptionDriverManager.getConnection()1043

Port already in use

java.net.BindException
java.net.PlainSocketImpl.socketBind
1032Web pages
BindExceptionPlainSocketImpl.socketBind()1032

NativeMethodAccessorImpl.invoke() has thrown an InvocationTargetException

java.lang.reflect.InvocationTargetException
1 frames hidden
sun.reflect.NativeMethodAccessorImpl.invoke
1030Web pages
1Solution
InvocationTargetExceptionNativeMethodAccessorImpl.invoke()1030

DriverManager.getConnection() has thrown a SQLException

java.sql.SQLException
1 frames hidden
java.sql.DriverManager.getConnection
980Web pages
SQLExceptionDriverManager.getConnection()980

Trying to modify a HashMap directly while iterating over it

java.util.ConcurrentModificationException
java.util.HashMap$HashIterator.nextEntry
964Web pages
1Solution
ConcurrentModificationExceptionHashMap$HashIterator.nextEntry()964

ProcessBuilder/Runtime unable to create process

java.io.IOException
1 frames hidden
java.lang.ProcessImpl.<init>
961Web pages
IOExceptionProcessImpl.<init>()961

Failed to start native process

java.io.IOException
2 frames hidden
java.lang.ProcessImpl.start
958Web pages
IOExceptionProcessImpl.start()958
Nothing to list here.
Nothing to list here.
Nothing to list here.
Nothing to list here.