ERROR - java.lang.IllegalArgumentException - Possible Causes of IllegalArgumentException

Exception Thrown By:Cause
ClassMethod
AbstractScriptEngine public Bindings
getBindings(int scope)
if the value of scope is
invalid for the type the protected context field
AlphaComposite public AlphaComposite
derive(int rule)
if rule is
not one of the following: CLEAR, SRC, DST, SRC_OVER, DST_OVER, SRC_IN, DST_IN, SRC_OUT, DST_OUT, SRC_ATOP, DST_ATOP, or XOR
AlphaComposite public AlphaComposite
derive(float alpha)
if alpha
is less than 0
Array public static int
getLength(Object array)
if the object
argument is not an
AsyncBoxView public float
getMinimumSpan(int axis)
for an
invalid axis type
AsyncBoxView public float
getMaximumSpan(int axis)
for an
invalid axis type
AsynchronousSocketChannel public abstract Future
read(ByteBuffer dst)
If the
buffer is read only
AttachmentPart public abstract void
setDataHandler(DataHandler dataHandler)
if there was a
problem with the specified DataHandler object.
AttachmentPart public void
setContentId(String contentId)
if there was
a problem with the specified content
AttachmentPart public void
setContentLocation(String contentLocation)
if there was a problem with the
specified content location.
AttachmentPart public void
setContentType(String contentType)
if there was a
problem with the specified content type.
AttachmentUnmarshaller public abstract byte[]
getAttachmentAsByteArray(String cid)
if the attachment for
the given cid is not found
AttributeList public List
asList()
if this AttributeList contains an
element that is not an Attribute.
Attributes2Impl public boolean
isSpecified(String qName)
When thesupplied name
does not identify an attribute
BandCombineOp public final Rectangle2D
getBounds2D(Raster src)
If the number of bands in
the source is incompatible with the matrix.create
Base64.Decoder public byte[]
decode(String src)
if src is
not in valid Base64
Base64.Decoder public ByteBuffer
decode(ByteBuffer buffer)
if src is
not in valid Base64 scheme.wrappublic 
BasicTextAreaUI public Dimension
getMinimumSize(JComponent c)
if invalid
value is passed
BorderLayout public Component
getLayoutComponent(Object constraints)
if the constraint object isnot
one of the nine specified constants
BreakIterator public int
preceding(int offset)
if the specified offset is less than the
first text boundary or greater than the last text boundary
BreakIterator public boolean
isBoundary(int offset)
if the specified offset is less than the
first text boundary or greater than the last text boundary
Buffer public final Buffer
limit(int newLimit)
If the
preconditions on newPosition do not hold
ByteBuffer public static ByteBuffer
allocate(int capacity)
If the
capacity is a negative
CharsetDecoder public final CharsetDecoder
replaceWith(String newReplacement)
If the preconditions on
the parameter do not hold
CharsetDecoder public final CharsetDecoder
onMalformedInput
(CodingErrorAction newAction)
If the precondition on
the parameter does not hold
CharsetDecoder public final CharsetDecoder
onUnmappableCharacter
(CodingErrorAction newAction)
If the precondition on
the parameter does not hold
Choice public void
remove(String item)
if the item doesn't
exist in the choice menu
Choice public void
select(int pos)
if the specifiedposition is greater than
thenumber of items or less than zero
Cipher public final void
updateAAD(byte[] src)
if the src
byte array is null
Cipher public final void
updateAAD(ByteBuffer src)
if the
src ByteBuffer is null
Collator public void
setStrength(int newStrength)
If the new strength
value is not one of PRIMARY
Collator public void
setDecomposition
(int decompositionMode)
If the given value
is not a valid decomposition mode
ColorSpace public String
getName(int idx)
if idx is less than
0 or greater than num 1
ColorSpace public float
getMinValue(int component)
if component is less than
0 or greater than num 1
ColorSpace public float
getMaxValue(int component)
if component is less than
0 or greater than num 1
Component public Set
getFocusTraversalKeys(int id)
if id is
not one of KeyboardFocusManager
Component public boolean
areFocusTraversalKeysSet(int id)
if id is
not one of KeyboardFocusManager
CounterMonitor public void
setThreshold(Number value)
The specified threshold is null or
the threshold value is less than zero.
CounterMonitor public void
setOffset(Number value)
The specified offset is null or
the offset value is less than zero.
CounterMonitor public void
setModulus(Number value)
The specified modulus is null or
the modulus value is less than zero
Cursor public static Cursor
getPredefinedCursor(int type)
if the specified
cursor type is invalidget
CyclicBarrier public CyclicBarrier(int
parties)
if parties
is less than 1
DataBuffer public static int
getDataTypeSize(int type)
if type is less
than zero or greater than
DatagramPacket public void
setSocketAddress(SocketAddress address)
if address is
null or is a
DatagramPacket public void
setLength(int length)
if the length is negative of if the
length is greater than the packet's data buffer length
DatatypeConverter public static boolean
parseBoolean(String lexicalXSDBoolean)
if string parameter does not conform to
lexical value space defined in XML Schema Part 2
DatatypeConverter public static byte
parseByte(String lexicalXSDByte)
if string parameter does not conform to
lexical value space defined in XML Schema Part 2
DatatypeConverter public static Calendar
parseDateTime
(String lexicalXSDDateTime)
if string parameter does not conform to
lexical value space defined in XML Schema Part 2
DatatypeConverter public static byte[]
parseBase64Binary
(String lexicalXSDBase64Binary)
if string parameter does not conform to
lexical value space defined in XML Schema Part 2
DatatypeConverter public static byte[]
parseHexBinary
(String lexicalXSDHexBinary)
if string parameter does not conform to
lexical value space defined in XML Schema Part 2
DatatypeConverter public static Calendar
parseTime(String lexicalXSDTime)
if string parameter does not conform to
lexical value space defined in XML Schema Part 2
DatatypeConverter public static Calendar
parseDate(String lexicalXSDDate)
if string parameter does not conform to
lexical value space defined in XML Schema Part 2
Date public int
getHours()
if this
method is invoked
Date public int
getMinutes()
if this
method is invoked
Date public int
getSeconds()
if this
method is invoked
Date public void
setHours(int i)
if this
method is invoked
Date public void
setMinutes(int i)
if this
method is invoked
Date public void
setSeconds(int i)
if this
method is invoked
DateFormatSymbols public void
setZoneStrings
(String[][] newZoneStrings)
if the length
of any row in newZoneStrings is less than 5
DefaultMutableTreeNode public int
getIndex(TreeNode aChild)
if a order enumeration
of this node's children
Deflater public void
setLevel(int level)
if the
compression level is invalid
Endpoint public abstract void
publish(Object serverContext)
If the provided server context is not supported by the
implementation or turnsout to be unusable in conjunction with the endpoint's binding.
Endpoint public void
publish(HttpContext serverContext)
If the provided server context is not supported by the
implementation or turnsout to be unusable in conjunction with the endpoint's binding.
Enum public static T[] values() if the specified enum type
has no constant with the specified name
EnumSet public static >
EnumSet copyOf(Collection c)
if c is not an
EnumSet instance and contains no elements
EventReaderDelegate public Object
getProperty(String name)
if the
property is not supported.
File public boolean
setLastModified(long time)
If the
argument is negative
FileSystem public abstract PathMatcher
getPathMatcher
(String syntaxAndPattern)
If the parameter
does not take the form
FileSystemProvider public abstract FileSystem
getFileSystem(URI uri)
If the pre conditions
for the uri parameter aren't met.
FileSystemProvider public abstract Path
getPath(URI uri)
If the URI scheme does not identify this
provider or other preconditions on the uri parameter do not hold.
ForkJoinPool public ForkJoinPool(int
parallelism)
if parallelism less
than or equal to zero.
Frame public Frame(GraphicsConfiguration
gc)
if gc is
not from a screen device.
GridLayout public void
setRows(int rows)
if the value of both
rows and cols is set to zero
GridLayout public void
setColumns(int cols)
if the value of both
rows and cols is set to zero
HashMap public HashMap(int
initialCapacity)
if the
initial capacity is negative
HashSet public HashSet(int
initialCapacity)
if the initial
capacity is less than zero
Hashtable public Hashtable(int
initialCapacity)
if the initial
capacity is lessthan zero
HttpCookie public static List
parse(String header)
if header string violates the cookie
specification's syntax orthe cookie name contains illegal characters.
HttpCookie public void
setVersion(int v)
if v is
neither 0 nor 1
HttpsURLConnection public static void
setDefaultHostnameVerifier
(HostnameVerifier v)
if the
HostnameVerifierparameter is null.
HttpsURLConnection public void
setHostnameVerifier
(HostnameVerifier v)
if the
HostnameVerifierparameter is null
HttpsURLConnection public static void
setDefaultSSLSocketFactory
(SSLSocketFactory sf)
if the
SSLSocketFactoryparameter is null.
HttpsURLConnection public void
setSSLSocketFactory
(SSLSocketFactory sf)
if the
SSLSocketFactoryparameter is null.
ICC_ColorSpace public float
getMinValue(int component)
if component is less than
0 or greater than num 1
ICC_ColorSpace public float
getMaxValue(int component)
if component is less than
0 or greater than num 1
IDN public static String
toASCII(String input)
if the input string
doesn't conform to RFC 3490 specificationto
Image public void
setAccelerationPriority(float priority)
if priority is less
than zero or greater than 1
ImageTypeSpecifier public ImageTypeSpecifier
(RenderedImage
image)
if the
argument is null
ImmutableDescriptor public ImmutableDescriptor(String...
fields)
if the
parameter is null
ImmutableDescriptor public static ImmutableDescriptor
union(Descriptor... descriptors)
if two Descriptors contain the
same field name with different associated values
JDBCType public static JDBCType
valueOf(int type)
if this enum type has
no constant with the specified Types value
JDialog public JDialog(Window
owner)
if the owner is not
an instance of Dialog or FrameIllegalArgumentE
JFrame public JFrame(GraphicsConfiguration
gc)
if gc is
not froma screen device.
JScrollBar public void
setOrientation(int orientation)
if orientation is
not one of VERTICAL
JScrollPane public void
setVerticalScrollBarPolicy(int policy)
if policyis not one
of the legal values shown above
JScrollPane public void
setHorizontalScrollBarPolicy(int policy)
if policyis not one
of the legal values shown above
JSlider public void
setOrientation(int orientation)
if orientation is
not one of VERTICAL
JSlider public Hashtable
createStandardLabels(int increment)
if increment is
less than orequal to zero
JSplitPane public void
setOrientation(int orientation)
if orientation
is not one of
JSplitPane public void
setResizeWeight(double value)
if value is
< 0 or > 1
JSplitPane public void
setDividerLocation
(double proportionalLocation)
if the specified location
is < 0or > 1.0
JSplitPane public boolean
isValidateRoot()
if the constraintsobject does
not match an existing component
JTabbedPane public void
setTabPlacement(int tabPlacement)
if tab placement value
isn't oneof the above valid values
JTextArea public void
setRows(int rows)
if rows
is less than 0
JTextArea public void
setColumns(int columns)
if columns
is less than 0
JTextComponent public final void
setDropMode(DropMode dropMode)
if the drop
mode is unsupported or null
JTextComponent public void
moveCaretPosition(int pos)
if the value supplied for position is less
than zero or greater than the component's text length
JTextComponent public void
setCaretPosition(int position)
if the value supplied for position is less
than zero or greater than the component's text lengthget
JTextComponent public String
getSelectedText()
if the selection doesn'thave a valid
mapping into the document for some reason
JTextPane public final void
setEditorKit(EditorKit kit)
if kit
is not a
JTree public final void
setDropMode(DropMode dropMode)
if the drop
mode is unsupported or null
JapaneseEra public static JapaneseEra
valueOf(String japaneseEra)
if there is
not JapaneseEra with the specified
JobAttributes public void
setCopies(int copies)
if copies is
less thanor equal to 0set
Kernel public final float[]
getKernelData(float[] data)
if data is less
than the size of this
Label public void
setAlignment(int alignment)
if an improper
value foralignment is given
LinkedHashMap public LinkedHashMap(int
initialCapacity)
if the initial capacity is negativeordered LinkedHashMap instance
with the default initial capacity (16) and load factor (0
LinkedHashSet public LinkedHashSet(int
initialCapacity)
if the initial
capacity is lessthan zero
List public void
remove(String item)
if the item
doesn't exist in the list
Locale public String
getExtension(char key)
if key
is not well formed
Locale public String
getUnicodeLocaleType(String key)
if the key
is not well formed
MBeanServerNotificationFilter public void
enableObjectName
(ObjectName objectName)
if the
given ObjectName is null
MediaPrintableArea public float[]
getPrintableArea(int units)
(unchecked exception) Thrown
if units < 1
MediaPrintableArea public float
getX(int units)
(unchecked exception) Thrown
if units < 1
MediaPrintableArea public float
getY(int units)
(unchecked exception) Thrown
if units < 1
MediaPrintableArea public float
getWidth(int units)
(unchecked exception) Thrown
if units < 1
MediaPrintableArea public float
getHeight(int units)
(unchecked exception) Thrown
if units < 1
MemoryUsage public static MemoryUsage
from(CompositeData cd)
if cd does not represent
a MemoryUsage with the attributes described above
Menu public void
insertSeparator(int index)
if the value of
index is less than 0
MessageFormat public void
applyPattern(String pattern)
if the
pattern is invalidto
MethodHandle public MethodHandle
bindTo(Object x)
if the target does not have a
leading parameter type that is a reference type
MethodHandleProxies public static MethodHandle
wrapperInstanceTarget(Object x)
if the reference x is not to a wrapper
instancewrappermethod interface type for which this wrapper instance was created
MethodHandleProxies public static Class
wrapperInstanceType(Object x)
if the reference x
is not to a wrapper instance
MethodHandles publicLookup() if the resulting method
handle's type would havetoo many
MethodHandles publicLookup() if the resulting method
handle's type would havetoo many parametersexplicit
Monitor public void
setObservedObject
(ObjectName object)
The specified
object is null.
Monitor public void
addObservedObject
(ObjectName object)
The specified
object is null.
Monitor public void
setObservedAttribute
(String attribute)
The specified
attribute is null.
Monitor public void
setGranularityPeriod(long period)
The granularity period is
less than or equal to zero
ObjectName public static String
unquote(String q)
if q could not
have been returned by the quote.
PageFormat public void
setOrientation(int orientation)
ifan unknown
orientation was requested
Paths public static Path
get(URI uri)
if preconditions on the uri parameter do
not hold. Theformat of the URI is provider specific.
Preferences public abstract Preferences
node(String pathName)
if the path
name is invalid
Preferences public abstract void
removePreferenceChangeListener
(PreferenceChangeListener pcl)
if pcl was not a
registered preference change listener on this node.
Preferences public abstract void
removeNodeChangeListener
(NodeChangeListener ncl)
if ncl was not
a registered NodeChangeListener on this node.
ProcessBuilder public ProcessBuilder
redirectInput(ProcessBuilder.Redirect source)
if the redirect does not
correspond to a valid source of data.
ProcessBuilder public ProcessBuilder
redirectOutput(ProcessBuilder.Redirect destination)
if the redirect does not
correspond to a valid destination of data
ProcessBuilder public ProcessBuilder
redirectError(ProcessBuilder.Redirect destination)
if the redirect does not
correspond to a valid destination of data
ProxySelector public abstract List
select(URI uri)
if the
argument is null.
Random public int nextInt(int bound) if bound
is not positive
Rdn public static Object
unescapeValue(String val)
When an
Illegal value is provided
ResolutionSyntax public int[]
getResolution(int units)
(unchecked exception) Thrown
if units < 1
ResolutionSyntax public int
getCrossFeedResolution(int units)
(unchecked exception) Thrown
if units < 1
ResolutionSyntax public int
getFeedResolution(int units)
(unchecked exception) Thrown
if units < 1
Robot public void
mousePress(int buttons)
if the buttons mask contains the mask for extra mouse
button and support for extended mouse buttons is disabled by JavaIllegalArgumentException
Robot public void
mouseRelease(int buttons)
if the buttons mask contains the mask for extra mouse
button and support for extended mouse buttons is disabled by JavaIllegalArgumentException
Robot public void
keyPress(int keycode)
if keycode
is not a valid key
Robot public void
keyRelease(int keycode)
if keycode
is not a valid key
RoleList public List
asList()
if this RoleList contains an
element that is not a Role.
RoleUnresolvedList public List
asList()
if this RoleUnresolvedList contains an
element that is not a RoleUnresolved.
RoleUnresolvedList public void
add(RoleUnresolved role)
if the
unresolved role is
RoundingMode public static RoundingMode
valueOf(int rm)
integer is
out of range
Runtime public void
addShutdownHook(Thread hook)
If the specified
hook has already been registered
SOAPMessage public AttachmentPart
createAttachmentPart(DataHandler dataHandler)
if there was a
problem with the specified DataHandler object
SOAPPart public void
setContentId(String contentId)
if there is a
problem in setting the content id
SOAPPart public void
setContentLocation(String contentLocation)
if there is a
problem insetting the content location
SSLEngine public abstract void
setEnabledCipherSuites(String[] suites)
when one or more of the
ciphersnamed by the parameter is not supported
SSLEngine public abstract void
setEnabledProtocols(String[] protocols)
when one or more ofthe protocols named by the
parameter is not supported orwhen the protocols parameter is null.
SSLEngine public abstract void
setUseClientMode(boolean mode)
if a mode change is
attemptedafter the initial handshake has begun
Scanner public Scanner
useRadix(int radix)
if radix
is out of rangematchpublic 
ScrollPane public ScrollPane(int
scrollbarDisplayPolicy)
if the specified
scrollbar display policy is invalid
ScrollPaneLayout public void
setVerticalScrollBarPolicy(int x)
if x is
an invalidvertical scroll bar policy
ScrollPaneLayout public void
setHorizontalScrollBarPolicy(int x)
if x is
not a validhorizontal scrollbar policy
Scrollbar public Scrollbar(int
orientation)
when an illegal value
forthe orientation argument is supplied
Scrollbar public void
setOrientation(int orientation)
if the value supplied for
orientation is not a legal value
SelectionKey public abstract SelectionKey
interestOps(int ops)
If a bit in the set does not
correspond to an operation thatis supported by this key's channel
ServiceUIFactory public abstract String[]
getUIClassNamesForRole(int role)
is the role is a non
standard role not supported by this factory
SpinnerListModel public SpinnerListModel(Object[]
values)
if values
isnull or zero length
SpinnerListModel public void
setList(List list)
if list
isnull or zero length
SpinnerListModel public void
setValue(Object elt)
if the
specified value isn't allowed
SplittableRandom public long
nextLong(long bound)
if bound
is not positivenext
SplittableRandom public double
nextDouble(double bound)
if bound
is not positivenext
SwingWorker public TableSwingWorker(DefaultTableModel tableModel) is value not
from 0 to 100
SyncProviderException public void
setSyncResolver(SyncResolver syncResolver)
if the
SyncResolver object is null
TextArea public void
setRows(int rows)
if the value supplied
for rows is less than 0
TextArea public void
setColumns(int columns)
if the value supplied
for columns is less than 0
TextField public void
setColumns(int columns)
if the value supplied
for columns is less than 0
ThreadInfo public static ThreadInfo
from(CompositeData cd)
if cd does not represent
a ThreadInfo with the attributes described above
ThreadLocalRandom public int
nextInt(int bound)
if bound
is not positivenext
ThreadLocalRandom public long
nextLong(long bound)
if bound
is not positivenext
ThreadLocalRandom public double
nextDouble(double bound)
if bound
is not positivenext
Time public int
getMonth()
if this
method is invoked
Time public int
getDay()
if this
method is invoked
Time public int
getDate()
if this
method is invoked
Time public void
setYear(int i)
if this
method is invoked
Time public void
setMonth(int i)
if this
method is invoked
Time public void
setDate(int i)
if this
method is invoked
Timestamp public static Timestamp
valueOf(String s)
if the given argument does not
have the format yyyy [m]m [d]d hh
Timestamp public void
setNanos(int n)
if the given argumentis greater
than 999999999 or less than 0
Transformer public abstract void
setOutputProperties(Properties oformat)
When keys are not
recognized and are not namespace qualified.
Transformer public abstract String
getOutputProperty(String name)
If the
property is not supported.
TreeSelectionEvent public boolean
isAddedPath(int index)
if index is
outside the range of get
URI public URL
toURL()
If this
URL is not absolute
URLConnection public void
setConnectTimeout(int timeout)
if the
timeout parameter is negative
URLConnection public void
setReadTimeout(int timeout)
if the
timeout parameter is negative
URLPermission public URLPermission(String
url)
if url does not
result in a valid URIMethod
ValidationEventImpl public void
setSeverity(int _severity)
if an illegal
severity field is suppliedget
Vector public Vector(int
initialCapacity)
if the specified
initial capacity is negative
WeakHashMap public WeakHashMap(int
initialCapacity)
if the
initial capacity is negative
X500Principal public X500Principal(byte[]
name)
if an encoding
error occurs(incorrect form for
X500Principal public String
getName(String format)
if the specified
format is invalidor nullget
X509CertSelector public void
setBasicConstraints(int minMaxPathLen)
if the value
is less than 2
XMLGregorianCalendar public abstract void
setMonth(int month)
if month parameter is outside value constraints for
the field as specified in date/time field mapping table
XMLGregorianCalendar public abstract void
setDay(int day)
if day parameter is outside value constraints for
the field as specified in date/time field mapping table
XMLGregorianCalendar public abstract void
setTimezone(int offset)
if offset parameter is outside value constraints for
the field as specified in date/time field mapping table
XMLGregorianCalendar public abstract void
setHour(int hour)
if hour parameter is outside value constraints for
the field as specified in date/time field mapping table
XMLGregorianCalendar public abstract void
setMinute(int minute)
if minute parameter is outside value constraints for
the field as specified in date/time field mapping table
XMLGregorianCalendar public abstract void
setSecond(int second)
if second parameter is outside value constraints for
the field as specified in date/time field mapping table
XMLGregorianCalendar public abstract void
setMillisecond(int millisecond)
if millisecond parameter is outside value constraints for
the field as specified in date/time field mapping table
XMLGregorianCalendar public abstract void
setFractionalSecond(BigDecimal fractional)
if fractional parameter is outside value constraints for
the field as specified in date/time field mapping table
ZipEntry public void
setSize(long size)
if the specified
size is less than 0
ZipEntry public void
setCrc(long crc)
if the specified CRC 32 value
is less than 0 or greater than 0xFFFFFFF
ZipEntry public void
setMethod(int method)
if the
specified compressionmethod is invalid
ZipEntry public void
setExtra(byte[] extra)
if the length of the specified
extra field data is greater than 0xFFF
ZipOutputStream public void
setMethod(int method)
if the
specified compression methodis invalid
ZipOutputStream public void
setLevel(int level)
if the
compression level is invalid