java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Sending the following XMPP-Packet to the Server {code}<presence><show/></presence>{code} results in a warning like this: {code}2009.03.17 17:27:01 Invalid presence show for -<presence><show/></presence> java.lang.IllegalArgumentException: No enum const class org.xmpp.packet.Presence$Show. at java.lang.Enum.valueOf(Enum.java:196) at org.xmpp.packet.Presence$Show.valueOf(Presence.java:378) at org.xmpp.packet.Presence.getShow(Presence.java:137) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:239) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:176) at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:133) at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648) at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648) at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:185) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648) at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239) at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51) at java.lang.Thread.run(Thread.java:619){code} RFC3921, Page 7, Section 2.2.2.1. is a bit misunderstanding in this case. {code} The OPTIONAL element contains non-human-readable XML character data that specifies the particular availability status of an entity or specific resource. A presence stanza MUST NOT contain more than one element. The element MUST NOT possess any attributes. If provided, the XML character data value MUST be one of the following (additional availability types could be defined through a properly-namespaced child element of the presence stanza): o away -- The entity or resource is temporarily away. o chat -- The entity or resource is actively interested in chatting. o dnd -- The entity or resource is busy (dnd = "Do Not Disturb"). o xa -- The entity or resource is away for an extended period (xa = "eXtended Away"). If no element is provided, the entity is assumed to be online and available.{code} The question is: Does the "if provided" reference to the element itself or the XML character data? Because this is unclear I would say both is allowed. However, it seems some client out there do use this. I think the problem is located in org.xmpp.packet.Presence#getShow {code} public Show getShow() { String show = element.elementText("show"); if (show == null) { return null; } else { return Show.valueOf(show); } }{code} I'm not sure, but probably element.elementText returns an empty string in this case instead of NULL. An additional check should solve the problem. It is possible that this little problem is causing other problems. I had strange server problems in these days. Login not working, Clients get kicked when joining a MUC room....strange things. I'm not sure this is related, just wanted to mention it if someone else has this problems. See also http://www.igniterealtime.org/community/message/189221
    via by Martin Weusten,
  • Exception: java.lang.IllegalArgumentException: No enum const class org.xmpp.packet.Presence$Show.available at java.lang.Enum.valueOf(Unknown Source) at org.xmpp.packet.Presence$Show.valueOf(Presence.java:374) at org.xmpp.packet.Presence.getShow(Presence.java:133) at org.jivesoftware.messenger.admin.session_002dsummary_jsp._jspService(session_002dsum mary_jsp.java:321) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:688) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationH andler.java:822) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationH andler.java:813) at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:43) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationH andler.java:813) at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter .java:41) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationH andler.java:813) at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:98) at org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(WebApplicationH andler.java:813) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java: 494) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:569) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:62 4) at org.mortbay.http.HttpContext.handle(HttpContext.java:1434) at org.mortbay.http.HttpServer.service(HttpServer.java:896) at org.mortbay.http.HttpConnection.service(HttpConnection.java:814) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:366) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
    via by Gaston Dombiak,
  • Sending the following XMPP-Packet to the Server {code}<presence><show/></presence>{code} results in a warning like this: {code}2009.03.17 17:27:01 Invalid presence show for -<presence><show/></presence> java.lang.IllegalArgumentException: No enum const class org.xmpp.packet.Presence$Show. at java.lang.Enum.valueOf(Enum.java:196) at org.xmpp.packet.Presence$Show.valueOf(Presence.java:378) at org.xmpp.packet.Presence.getShow(Presence.java:137) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:239) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:176) at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:133) at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648) at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648) at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:185) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648) at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239) at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51) at java.lang.Thread.run(Thread.java:619){code} RFC3921, Page 7, Section 2.2.2.1. is a bit misunderstanding in this case. {code} The OPTIONAL element contains non-human-readable XML character data that specifies the particular availability status of an entity or specific resource. A presence stanza MUST NOT contain more than one element. The element MUST NOT possess any attributes. If provided, the XML character data value MUST be one of the following (additional availability types could be defined through a properly-namespaced child element of the presence stanza): o away -- The entity or resource is temporarily away. o chat -- The entity or resource is actively interested in chatting. o dnd -- The entity or resource is busy (dnd = "Do Not Disturb"). o xa -- The entity or resource is away for an extended period (xa = "eXtended Away"). If no element is provided, the entity is assumed to be online and available.{code} The question is: Does the "if provided" reference to the element itself or the XML character data? Because this is unclear I would say both is allowed. However, it seems some client out there do use this. I think the problem is located in org.xmpp.packet.Presence#getShow {code} public Show getShow() { String show = element.elementText("show"); if (show == null) { return null; } else { return Show.valueOf(show); } }{code} I'm not sure, but probably element.elementText returns an empty string in this case instead of NULL. An additional check should solve the problem. It is possible that this little problem is causing other problems. I had strange server problems in these days. Login not working, Clients get kicked when joining a MUC room....strange things. I'm not sure this is related, just wanted to mention it if someone else has this problems. See also http://www.igniterealtime.org/community/message/189221
    via by Martin Weusten,
  • Sending the following XMPP-Packet to the Server {code}<presence><show/></presence>{code} results in a warning like this: {code}2009.03.17 17:27:01 Invalid presence show for -<presence><show/></presence> java.lang.IllegalArgumentException: No enum const class org.xmpp.packet.Presence$Show. at java.lang.Enum.valueOf(Enum.java:196) at org.xmpp.packet.Presence$Show.valueOf(Presence.java:378) at org.xmpp.packet.Presence.getShow(Presence.java:137) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:239) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:176) at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:133) at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648) at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648) at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:185) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648) at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239) at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51) at java.lang.Thread.run(Thread.java:619){code} RFC3921, Page 7, Section 2.2.2.1. is a bit misunderstanding in this case. {code} The OPTIONAL element contains non-human-readable XML character data that specifies the particular availability status of an entity or specific resource. A presence stanza MUST NOT contain more than one element. The element MUST NOT possess any attributes. If provided, the XML character data value MUST be one of the following (additional availability types could be defined through a properly-namespaced child element of the presence stanza): o away -- The entity or resource is temporarily away. o chat -- The entity or resource is actively interested in chatting. o dnd -- The entity or resource is busy (dnd = "Do Not Disturb"). o xa -- The entity or resource is away for an extended period (xa = "eXtended Away"). If no element is provided, the entity is assumed to be online and available.{code} The question is: Does the "if provided" reference to the element itself or the XML character data? Because this is unclear I would say both is allowed. However, it seems some client out there do use this. I think the problem is located in org.xmpp.packet.Presence#getShow {code} public Show getShow() { String show = element.elementText("show"); if (show == null) { return null; } else { return Show.valueOf(show); } }{code} I'm not sure, but probably element.elementText returns an empty string in this case instead of NULL. An additional check should solve the problem. It is possible that this little problem is causing other problems. I had strange server problems in these days. Login not working, Clients get kicked when joining a MUC room....strange things. I'm not sure this is related, just wanted to mention it if someone else has this problems. See also http://www.igniterealtime.org/community/message/189221
    via by Martin Weusten,
  • Recently, we saw the following scenario: 1. The user setup a cluster of hadoop 2.3., which contains YARN 2.3 and MR 2.3. 2. The user client on a machine that MR 2.2 is installed and in the classpath. Then, when the user submitted a simple wordcount job, he saw the following message: {code} 16:00:41,027 INFO main mapreduce.Job:1345 - map 100% reduce 100% 16:00:41,036 INFO main mapreduce.Job:1356 - Job job_1396468045458_0006 completed successfully 16:02:20,535 WARN main mapreduce.JobRunner:212 - Cannot start job [wordcountJob] java.lang.IllegalArgumentException: No enum constant org.apache.hadoop.mapreduce.JobCounter.MB_MILLIS_REDUCES at java.lang.Enum.valueOf(Enum.java:236) at org.apache.hadoop.mapreduce.counters.FrameworkCounterGroup.valueOf(FrameworkCounterGroup.java:148) at org.apache.hadoop.mapreduce.counters.FrameworkCounterGroup.findCounter(FrameworkCounterGroup.java:182) at org.apache.hadoop.mapreduce.counters.AbstractCounters.findCounter(AbstractCounters.java:154) at org.apache.hadoop.mapreduce.TypeConverter.fromYarn(TypeConverter.java:240) at org.apache.hadoop.mapred.ClientServiceDelegate.getJobCounters(ClientServiceDelegate.java:370) at org.apache.hadoop.mapred.YARNRunner.getJobCounters(YARNRunner.java:511) at org.apache.hadoop.mapreduce.Job$7.run(Job.java:756) at org.apache.hadoop.mapreduce.Job$7.run(Job.java:753) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491) at org.apache.hadoop.mapreduce.Job.getCounters(Job.java:753) at org.apache.hadoop.mapreduce.Job.monitorAndPrintJob(Job.java:1361) at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1289) . . . {code} The problem is that the wordcount job was running on one or more than one nodes of the YARN cluster, where MR 2.3 libs were installed, and JobCounter.MB_MILLIS_REDUCES is available in the counters. On the other side, due to the classpath setting, the client was likely to run with MR 2.2 libs. After the client retrieved the counters from MR AM, it tried to construct the Counter object with the received counter name. Unfortunately, the enum didn't exist in the client's classpath. Therefore, "No enum constant" exception is thrown here. JobCounter.MB_MILLIS_REDUCES is brought to MR2 via MAPREDUCE-5464 since Hadoop 2.3.
    via by Zhijie Shen,
    • java.lang.IllegalArgumentException: No enum constant org.xmpp.packet.Presence.Show. at java.lang.Enum.valueOf(Enum.java:236) at org.xmpp.packet.Presence$Show.valueOf(Presence.java:390) at org.xmpp.packet.Presence.getShow(Presence.java:148) at org.jivesoftware.openfire.net.SocketReader.process(SocketReader.java:192) at org.jivesoftware.openfire.net.BlockingReadingMode.readStream(BlockingReadingMode.java:168) at org.jivesoftware.openfire.net.BlockingReadingMode.run(BlockingReadingMode.java:76) at org.jivesoftware.openfire.net.SocketReader.run(SocketReader.java:137) at java.lang.Thread.run(Thread.java:744)

    Users with the same issue

    jf-astjf-ast
    6 times, last one,
    fervidnerdfervidnerd
    1 times, last one,
    linxiaolonglinxiaolong
    1 times, last one,
    abrazenebabrazeneb
    4 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    43 more bugmates