# Query not working on Stardog v 4.2.3

**URL:** <https://community.stardog.com/t/query-not-working-on-stardog-v-4-2-3/352>\
**Category:** Bug\
**Created:** [May 25, 2017, 3:45am UTC](https://community.stardog.com/t/query-not-working-on-stardog-v-4-2-3/352 "2017-05-25T03:45:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yogesh](https://avatars.discourse-cdn.com/v4/letter/y/49beb7/32.png) [@Yogesh](https://community.stardog.com/u/Yogesh)\
**Post date:** [May 25, 2017, 3:45am UTC](https://community.stardog.com/t/query-not-working-on-stardog-v-4-2-3/352/1 "2017-05-25T03:45:55Z")

</div>

We are using Stardog enterprise edition. We have recently migrated stardog version from 4.2 to 4.2.3. And some of our queries started to fail after this migration. Following is one of the query which was working with earlier version of stardog but not working with v 4.2.3 with same data on both server. I tried to check logs for error information but could not see any information related to error in logs. It just says ‘Internal Server Error’ on web query console.

```
select ?systemName ?systemId ?propName ?dataPoints ?minValue ?maxValue ?unitSymbol where
{
  {
    select ?substance where
    {
      ?substance smt:SMSID "CDQPHGNPEFYYOCWT" .
    }
  }
   ?subStuff rdf:type smt:PureSubstance ;
             smt:isSubstance ?substance;
             smt:systemName ?systemName;
             smt:smdSystemID ?systemId.

  ?obs smt:observedStuff ?subStuff;
        smt:observedProperty ?propStuff ;
        smt:compiledIn smd:pointer_SMI_SC ;
        smt:hasValue ?min ;
        smt:hasValue ?max ;
        smt:numberOfDatapoints ?dataPoints .

 ?min rdf:type smt:MinValue ;
        smt:ofProperty ?prop;
        smt:unit ?unit;
        smt:displayValue ?minValue .

 ?max rdf:type smt:MaxValue ;
       smt:ofProperty ?prop;
       smt:unit ?unit;
       smt:displayValue ?maxValue .

 ?prop skos:prefLabel ?propName .

 ?unit smt:symbol ?unitSymbol.
}
order by ?propName ?systemName ?systemId

```

if I make some changes in this query it starts working on never as well as old version. But we do not want make changes in queries.

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [May 25, 2017, 11:58am UTC](https://community.stardog.com/t/query-not-working-on-stardog-v-4-2-3/352/2 "2017-05-25T11:58:02Z")

</div>

Hi,

I am unable to reproduce this error in my 4.2.3 instance. Can you provide a minimal data set that can reliably produce this error so I can take a look at it? Thanks!
