Error on aQuery.parameter(String, double)

0 views
Skip to first unread message

justforthe...@gmail.com

unread,
Jul 13, 2016, 12:47:01 PM7/13/16
to Stardog
I am getting an error when running this line of code in Java:

aQuery.parameter("value", dValue);

aQuery is an UpdateQuery and dValue is a Double. That line raises an error:

java.lang.StackOverflowError
	com.complexible.stardog.api.impl.AbstractQuery.parameter(AbstractQuery.java:129)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:148)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:26)
	com.complexible.stardog.api.impl.AbstractQuery.parameter(AbstractQuery.java:150)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:148)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:26)
	com.complexible.stardog.api.impl.AbstractQuery.parameter(AbstractQuery.java:150)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:148)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:26)
	com.complexible.stardog.api.impl.AbstractQuery.parameter(AbstractQuery.java:150)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:148)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:26)
	com.complexible.stardog.api.impl.AbstractQuery.parameter(AbstractQuery.java:150)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:148)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:26)
	com.complexible.stardog.api.impl.AbstractQuery.parameter(AbstractQuery.java:150)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:148)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:26)
	com.complexible.stardog.api.impl.AbstractQuery.parameter(AbstractQuery.java:150)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:148)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:26)
	com.complexible.stardog.api.impl.AbstractQuery.parameter(AbstractQuery.java:150)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:148)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:26)
	com.complexible.stardog.api.impl.AbstractQuery.parameter(AbstractQuery.java:150)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:148)
	com.complexible.stardog.api.impl.SPECUpdateQuery.parameter(SPECUpdateQuery.java:26)
        ........

What is happening or where could I check more information?

I couldn't find anything in stardog.log or in the Web. It seems like a stack overflow error at a security constraint check? Not sure why, because the query has not run yet. If I remove the line, the code runs without raising any errors.
The query is a simple:

INSERT { 
    ?id ex:value ?nvalue .
...
} WHERE {
    BIND(?value AS ?nvalue)
...
}
 
Thanks.

Michael Grove

unread,
Jul 13, 2016, 12:53:57 PM7/13/16
to stardog
There seems to be an error handling boxed primitives. You're calling
parameter(String, Object) so you're using Double rather than double.
If you unbox the Double to an actual double it works fine.

This is fixed in the next release, the issue number is 3027.

Cheers,

Mike
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> stardog+u...@clarkparsia.com
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Jeremy Iron

unread,
Jul 13, 2016, 1:45:28 PM7/13/16
to stardog
I see, many thanks! It is fixed now with "double".

---
You received this message because you are subscribed to a topic in the Google Groups "Stardog" group.
To unsubscribe from this topic, visit https://groups.google.com/a/clarkparsia.com/d/topic/stardog/V7bhuqwWy4g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stardog+u...@clarkparsia.com.


Reply all
Reply to author
Forward
0 new messages