<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[RejectedExecutionException]]></title><description><![CDATA[<p dir="auto">Hi<br />
I found an exception in my application log:</p>
<p dir="auto">java.util.concurrent.RejectedExecutionException<br />
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(Unknown Source)<br />
at java.util.concurrent.ThreadPoolExecutor.reject(Unknown Source)<br />
at java.util.concurrent.ThreadPoolExecutor.execute(Unknown Source)<br />
at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.run(IpMessageControl.java:431)</p>
<p dir="auto">Maybe just need to add catch for that exception, it occured when multiple threads were asking one device.</p>
]]></description><link>https://forum.mango-os.com/topic/474/rejectedexecutionexception</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 13:53:42 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/474.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 05 Aug 2010 17:57:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RejectedExecutionException on Tue, 19 Nov 2013 10:41:46 GMT]]></title><description><![CDATA[<p dir="auto">Did anyone tried this solution from Robert? If yes, please let me know.</p>
]]></description><link>https://forum.mango-os.com/post/8068</link><guid isPermaLink="true">https://forum.mango-os.com/post/8068</guid><dc:creator><![CDATA[gogularajasekhar]]></dc:creator><pubDate>Tue, 19 Nov 2013 10:41:46 GMT</pubDate></item><item><title><![CDATA[Reply to RejectedExecutionException on Mon, 09 Aug 2010 14:32:38 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for replying.<br />
I'm testing latest bacnet4j version from CVS with BACnet Simulator.<br />
I will test this code and post reply when exception appear.</p>
]]></description><link>https://forum.mango-os.com/post/4138</link><guid isPermaLink="true">https://forum.mango-os.com/post/4138</guid><dc:creator><![CDATA[codemonkey]]></dc:creator><pubDate>Mon, 09 Aug 2010 14:32:38 GMT</pubDate></item><item><title><![CDATA[Reply to RejectedExecutionException on Mon, 09 Aug 2010 08:23:27 GMT]]></title><description><![CDATA[<p dir="auto">hi codemonkey,</p>
<p dir="auto">give the folowing snippet a try:</p>
<pre><code>
 
    // For receiving
    @Override
    public void run() {
        boolean bProcessed;
        int loopCounter;
        IncomingMessageExecutor messageExecutor;
        byte[] buffer = new byte[MESSAGE_LENGTH];
 
        DatagramPacket p = new DatagramPacket(buffer, buffer.length);

        while (!socket.isClosed()) {
            try {
                loopCounter = 0;
                bProcessed = false;
                
                socket.receive(p);
                messageExecutor = new IncomingMessageExecutor(p);
                while(!bProcessed &amp;&amp; loopCounter &lt; 3)
                {
                	try
                	{
                		loopCounter++;
                		incomingExecutorService.execute(messageExecutor);
                		bProcessed = true;
                	}
                    catch (RejectedExecutionException ex)
               		{
                    	ex.printStackTrace();
                    	try
						{
							Thread.sleep(timeout / 3);
						}
						catch (InterruptedException e)
						{
							e.printStackTrace();
						}
               		}
                }
                p.setData(buffer);
            }
            catch (IOException e) {
                // no op. This happens if the socket gets closed by the destroy method.
            }
        }
    }

</code></pre>
<p dir="auto">it is the the modified procedure run in the ipmessagecontrol.java file.</p>
<p dir="auto">can you post the results of your tests here?</p>
<p dir="auto">thanks<br />
robert</p>
]]></description><link>https://forum.mango-os.com/post/4137</link><guid isPermaLink="true">https://forum.mango-os.com/post/4137</guid><dc:creator><![CDATA[robert bouwens]]></dc:creator><pubDate>Mon, 09 Aug 2010 08:23:27 GMT</pubDate></item><item><title><![CDATA[Reply to RejectedExecutionException on Fri, 06 Aug 2010 21:45:51 GMT]]></title><description><![CDATA[<p dir="auto">Robert is correct: you want to know about those errors. The only reason an execution would be rejected is because the thread pool was full. This is curious since the implementation uses a default pool constructor that sets the maximum pool size to Integer.MAX_VALUE, which would be difficult to reach.</p>
]]></description><link>https://forum.mango-os.com/post/4120</link><guid isPermaLink="true">https://forum.mango-os.com/post/4120</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Fri, 06 Aug 2010 21:45:51 GMT</pubDate></item><item><title><![CDATA[Reply to RejectedExecutionException on Fri, 06 Aug 2010 13:37:55 GMT]]></title><description><![CDATA[<p dir="auto">hi,<br />
if you just add that particlar catch block then you loose messages.<br />
you need to 'keep' the message and issue a simple sanity sleep.<br />
a third of the timeout in the ipMessageControl !?!</p>
<p dir="auto">it is hard to reproduce errors ...<br />
a few hours back a segment ack was not send for one reason...</p>
<p dir="auto">maybe you tell us what hw &amp; sw environment you use</p>
<p dir="auto">robert</p>
]]></description><link>https://forum.mango-os.com/post/4115</link><guid isPermaLink="true">https://forum.mango-os.com/post/4115</guid><dc:creator><![CDATA[robert bouwens]]></dc:creator><pubDate>Fri, 06 Aug 2010 13:37:55 GMT</pubDate></item></channel></rss>