<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic insert into ACT_RU_VARIABLE failing with java.lang.IllegalArgumentException: NaN in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/insert-into-act-ru-variable-failing-with-java-lang/m-p/9780#M4355</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pretty much big process with approximately 1.000 steps. When I start the process I get the following exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;org.apache.ibatis.exceptions.PersistenceException: &lt;BR /&gt;### Error updating database. Cause: java.lang.IllegalArgumentException: NaN&lt;BR /&gt;### The error may involve org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.insertVariableInstance-Inline&lt;BR /&gt;### The error occurred while setting parameters&lt;BR /&gt;### SQL: insert into ACT_RU_VARIABLE (ID_, REV_, TYPE_, NAME_, PROC_INST_ID_, EXECUTION_ID_, TASK_ID_, BYTEARRAY_ID_, DOUBLE_, LONG_ , TEXT_, TEXT2_) values ( ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )&lt;BR /&gt;### Cause: java.lang.IllegalArgumentException: NaN&lt;BR /&gt; at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:150)&lt;BR /&gt; at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:137)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:761)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:593)&lt;BR /&gt; Truncated. see log file for complete stacktrace&lt;BR /&gt;Caused By: java.lang.IllegalArgumentException: NaN&lt;BR /&gt; at oracle.jdbc.driver.OraclePreparedStatement.setDoubleInternal(OraclePreparedStatement.java:6599)&lt;BR /&gt; at oracle.jdbc.driver.OraclePreparedStatement.setDouble(OraclePreparedStatement.java:6574)&lt;BR /&gt; at oracle.jdbc.driver.OraclePreparedStatementWrapper.setDouble(OraclePreparedStatementWrapper.java:193)&lt;BR /&gt; at org.apache.ibatis.type.DoubleTypeHandler.setNonNullParameter(DoubleTypeHandler.java:28)&lt;BR /&gt; at org.apache.ibatis.type.DoubleTypeHandler.setNonNullParameter(DoubleTypeHandler.java:23)&lt;BR /&gt; Truncated. see log file for complete stacktrace&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the interesting part is that it fails &lt;STRONG&gt;randomly&lt;/STRONG&gt;. It can fail on step 2, or even step 999. It can even complete the whole process successfully and then fail after it has completed. I can assure you that the data remain exactly the same between different executions.&lt;/P&gt;&lt;P&gt;The process consists exclusively of service tasks (no human actors) which perform some calculations. So the result variables which are stored in activiti variables are mainly numbers or arrays of numbers (which can reach large sizes - e.g. 8.000).&lt;/P&gt;&lt;P&gt;I am working with Activiti version 5.17.0 on an Oracle 12c database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? I am thinking of performance issues. I make a calculation, then Activiti takes too much time to write the result into the database but the next step tries to retrieve the same value. Are steps being executed sequentially? For sure I am not using any parallelism components (split and join etc)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 28 May 2017 17:46:23 GMT</pubDate>
    <dc:creator>espe</dc:creator>
    <dc:date>2017-05-28T17:46:23Z</dc:date>
    <item>
      <title>insert into ACT_RU_VARIABLE failing with java.lang.IllegalArgumentException: NaN</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/insert-into-act-ru-variable-failing-with-java-lang/m-p/9780#M4355</link>
      <description>Hello,I have a pretty much big process with approximately 1.000 steps. When I start the process I get the following exception&lt;IMG id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;rg.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java.lang.IllegalArgumentException: NaN### The error may involve org.activiti.engine.im</description>
      <pubDate>Sun, 28 May 2017 17:46:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/insert-into-act-ru-variable-failing-with-java-lang/m-p/9780#M4355</guid>
      <dc:creator>espe</dc:creator>
      <dc:date>2017-05-28T17:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: insert into ACT_RU_VARIABLE failing with java.lang.IllegalArgumentException: NaN</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/insert-into-act-ru-variable-failing-with-java-lang/m-p/9781#M4356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The cause of this error is that the query of variables has exceeded the Oracle Database limit that IN Clause 1000 item limit.&lt;BR /&gt;If we use Oracle Database, we cannnot use IN Clause more than 1000 item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt; So the result variables which are stored in activiti variables are mainly numbers or arrays of numbers (which can reach large sizes - e.g. 8.000).&lt;BR /&gt;&amp;gt; I am working with Activiti version 5.17.0 on an Oracle 12c database.&lt;BR /&gt;&amp;gt; ### SQL: insert into ACT_RU_VARIABLE (ID_, REV_, TYPE_, NAME_, PROC_INST_ID_, EXECUTION_ID_, TASK_ID_, BYTEARRAY_ID_, DOUBLE_, LONG_ , TEXT_, TEXT2_) values ( ?, 1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )&lt;BR /&gt;&amp;gt; ### Cause: java.lang.IllegalArgumentException: NaN&lt;BR /&gt;&amp;gt; at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution is that you reduce the number of variables of process.&lt;/P&gt;&lt;P&gt;The field not used for search should be stored as individual variables.&lt;BR /&gt;The field not used for search should be aggregated into one variable as binary variable type such as java.util.Map.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2017 01:02:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/insert-into-act-ru-variable-failing-with-java-lang/m-p/9781#M4356</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-29T01:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: insert into ACT_RU_VARIABLE failing with java.lang.IllegalArgumentException: NaN</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/insert-into-act-ru-variable-failing-with-java-lang/m-p/9782#M4357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;Even if I wanted to agree with you..&lt;/P&gt;&lt;P&gt;1) I haven't read any limitation about the number of process variables that activiti can handle.&lt;/P&gt;&lt;P&gt;2) Why it happens randomly? Why sometimes the process just finishes ok?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 May 2017 10:50:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/insert-into-act-ru-variable-failing-with-java-lang/m-p/9782#M4357</guid>
      <dc:creator>espe</dc:creator>
      <dc:date>2017-05-29T10:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: insert into ACT_RU_VARIABLE failing with java.lang.IllegalArgumentException: NaN</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/insert-into-act-ru-variable-failing-with-java-lang/m-p/9783#M4358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seems from the trace you provided that there is an issue with a double value&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;Caused By: java.lang.IllegalArgumentException: NaN&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;at oracle.jdbc.driver.OraclePreparedStatement.setDoubleInternal(OraclePreparedStatement.java:6599)&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;at oracle.jdbc.driver.OraclePreparedStatement.setDouble(OraclePreparedStatement.java:6574)&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;at oracle.jdbc.driver.OraclePreparedStatementWrapper.setDouble(OraclePreparedStatementWrapper.java:193)&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;at org.apache.ibatis.type.DoubleTypeHandler.setNonNullParameter(DoubleTypeHandler.java:28)&lt;/SPAN&gt;&lt;BR style="color: #727174; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #727174; background-color: #ffffff;"&gt;at org.apache.ibatis.type.DoubleTypeHandler.setNonNullParameter(DoubleTypeHandler.java:23)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It's hard to understand the issue&amp;nbsp;if there is no way to reproduce it. Can you try to reproduce using&amp;nbsp;a simpler process definition? I would also recommend you to try the latest activiti version (currently either version 6 or 5.22).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jun 2017 18:08:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/insert-into-act-ru-variable-failing-with-java-lang/m-p/9783#M4358</guid>
      <dc:creator>bassam_al-saror</dc:creator>
      <dc:date>2017-06-06T18:08:32Z</dc:date>
    </item>
  </channel>
</rss>

