SPARQL query resulting into com.complexible.common.protocols.EncodingException in version 4.2.3

Hello,
I have stardog 4.2 and 4.2.3 running. Attached below is a query which works fine on 4.2 and fails on 4.2.3.
When trying to run from console it logs EncodingException.

Here is the query and error logs

select ?datasource (count(DISTINCT ?pointer) as ?count) where
{
  {
select ?pointer where {
         {
       		select ?pointer where {
                     {
                          select distinct ?substance where {
                           {
                             select distinct ?substance where {
                             ?urn smt:modLabel "benzene" .
                             ?substance smt:searchLabel ?urn .
                            }
                           }
                           union
                           {
                             select distinct ?substance where {
                               ?substance smt:elementSystem "benzene" .
                             }
                           }
                        }
                     }
                     {
                       select ?propStuff where {
                         ?property skos:prefLabel "solid-state physics"@en .
                         ?propStuff smt:isProperty ?property .
                       }
                     }

                     ?subStuff smt:hasComponent*/smt:isSubstance ?substance .

                     ?obs smt:observedStuff ?subStuff ;
                       smt:observedProperty ?propStuff ;
                       smt:compiledIn ?pointer
            }
       }
       union{

       	select ?pointer where {
                     {
                          select distinct ?substance where {
                           {
                             select distinct ?substance where {
                             ?urn smt:modLabel "benzene" .
                             ?substance smt:searchLabel ?urn .
                            }
                           }
                           union
                           {
                             select distinct ?substance where {
                               ?substance smt:elementSystem "benzene" .
                             }
                           }
                        }
                     }
                     {
                       select ?propStuff where {
                         ?property skos:broader*/skos:prefLabel "solid-state physics"@en .
                         ?propStuff smt:isProperty ?property .
                       }
                     }

                     ?subStuff smt:hasComponent*/smt:isSubstance ?substance .

                     ?obs smt:observedStuff ?subStuff ;
                       smt:observedProperty ?propStuff ;
                       smt:compiledIn ?pointer

                       filter not exists {?pointer smt:dataSource "SpringerMaterials Interactive"}
              }
         }
       }
  }

   ?pointer smt:dataSource ?datasource.



}
group by ?datasource
HAVING ((?count) != 0)
order by (?count)

Kindly let us know the resolution.

Thank you,
Mayur

Hi,

Are you able to provide a minimal data set that can reproduce this error? I am able to execute it on an unrelated data set to produce no results, so it seems like it might be data related.

Since you say you have 4.2 and 4.2.3 installed and running I would double, and triple check that you’re using the corresponding client version. Make sure you’re querying 4.2 server with the 4.2 client and 4.2.3 server with the 4.2.3 client. I suspect that you’re probably using the 4.2.3 client to query both the 4.2 and 4.2.3 server.

Thanks for quick reply guys.
I am using these versions on different servers, so its not the cause for sure.
Also have verified versions on both servers.
As far as sharing minimal data set, its a business data so we are not supposed to share it.
Any other help could you provide or things which I can check at my side.

By a minimal data set, I just mean any set of data, however fake or obfuscated, that causes the behavior you’re talking about. Everything I’m seeing says it’s a data issue, so it’s hard to figure out without at least something.

Obviously I’m not going to ask you to send business data, but are you able to write a small fake dataset that can reproduce this issue?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.