<?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 Re: NullPointerException when native query with null result in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/nullpointerexception-when-native-query-with-null-result/m-p/155393#M109736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot Martin, for your fast response. We ran the JUnit test with our Activiti version 5.12.1 and we got the same NullPointerException, then we upgraded to version 5.13 and we did NOT encounter the error. So this bug is resolved in the latest version of Activiti. Case closed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Oct 2013 09:29:57 GMT</pubDate>
    <dc:creator>lotzy</dc:creator>
    <dc:date>2013-10-03T09:29:57Z</dc:date>
    <item>
      <title>NullPointerException when native query with null result</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/nullpointerexception-when-native-query-with-null-result/m-p/155391#M109734</link>
      <description>Hi there,We need to find out the last executed process with a given name so we used this piece of code:NativeHistoricProcessInstanceQuery haiq = historyService.createNativeHistoricProcessInstanceQuery();HistoricProcessInstance processNative = haiq.sql("SELECT MAX(id_) AS id FROM act_hi_procinst WHER</description>
      <pubDate>Tue, 01 Oct 2013 15:05:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/nullpointerexception-when-native-query-with-null-result/m-p/155391#M109734</guid>
      <dc:creator>lotzy</dc:creator>
      <dc:date>2013-10-01T15:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: NullPointerException when native query with null result</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/nullpointerexception-when-native-query-with-null-result/m-p/155392#M109735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have implemented small jUnit test (&lt;/SPAN&gt;&lt;A href="https://github.com/martin-grofcik/Activiti/commit/b311ba6c8729633c17df1d33ad42288b9ac386ee" rel="nofollow noopener noreferrer"&gt;https://github.com/martin-grofcik/Activiti/commit/b311ba6c8729633c17df1d33ad42288b9ac386ee&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Deployment(resources = {"org/activiti/engine/test/history/oneTaskProcess.bpmn20.xml"})&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void testNativeHistoricProcessInstanceQuery() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NativeHistoricProcessInstanceQuery haiq = historyService.createNativeHistoricProcessInstanceQuery();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HistoricProcessInstance processNative = haiq.sql("SELECT MAX(id_) AS id FROM act_hi_procinst WHERE business_key_ = 'DOES_NOT_EXIST'").singleResult();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; assertEquals(null, processNative);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It passes. May be I did something wrong. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Could you create jUnit test for it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Idea&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you query DB to get rows count before SELECT MAX(id_) ? (I know it is overhead.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 04:44:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/nullpointerexception-when-native-query-with-null-result/m-p/155392#M109735</guid>
      <dc:creator>martin_grofcik</dc:creator>
      <dc:date>2013-10-02T04:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: NullPointerException when native query with null result</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/nullpointerexception-when-native-query-with-null-result/m-p/155393#M109736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot Martin, for your fast response. We ran the JUnit test with our Activiti version 5.12.1 and we got the same NullPointerException, then we upgraded to version 5.13 and we did NOT encounter the error. So this bug is resolved in the latest version of Activiti. Case closed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 09:29:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/nullpointerexception-when-native-query-with-null-result/m-p/155393#M109736</guid>
      <dc:creator>lotzy</dc:creator>
      <dc:date>2013-10-03T09:29:57Z</dc:date>
    </item>
  </channel>
</rss>

