Java exception on query

11 views
Skip to first unread message

wandering...@gmail.com

unread,
Aug 21, 2015, 2:41:51 PM8/21/15
to Stardog
Hello,

I have encountered a very strange error while working with Stardog, and I was wondering if someone had run into something similar as I couldn't find anything online.  When I run this query:

SELECT DISTINCT ?iri ?qmp {
  VALUES
?qmp {
    rdesc
:MPSoilMoisture
    rdesc
:MPLandSurfaceTemperature
    rdesc
:MPVegetation
    rdesc
:MPWeather
 
}
 
?iri a/rdfs:subClassOf* ?qmp.
}ORDER BY ?qmp

I am able to receive results; however, when I try this query:

SELECT (COUNT(DISTINCT ?iri) AS ?count) ?smp
{
  VALUES
?smp {
    rdesc
:MPSoilMoisture
    rdesc
:MPLandSurfaceTemperature
    rdesc
:MPVegetation
    rdesc
:MPWeather
 
}
 
?r rdesc:hasMeasuredProperty ?iri.
 
?iri a/rdfs:subClassOf* ?smp.
 
?r a/rdfs:subClassOf* rdesc:DataResource.
} GROUP BY ?smp
ORDER BY
?smp

I get these errors with verbose on:

java.util.NoSuchElementException
The detailed stack trace for the error is:
com
.complexible.stardog.cli.CliException: java.util.NoSuchElementException
        at com
.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:118)
        at com
.complexible.stardog.cli.CLIBase.execute(CLIBase.java:54)
        at com
.complexible.stardog.cli.CLI.main(CLI.java:99)
Caused by: com.complexible.stardog.StardogException: java.util.NoSuchElementException
        at com
.complexible.stardog.protocols.client.SPECClientUtil.toStardogException(SPECClientUtil.java:80)
        at com
.complexible.stardog.protocols.client.SPECClientUtil.toStardogException(SPECClientUtil.java:32)
        at com
.complexible.stardog.api.impl.SPECSelectQuery.execute(SPECSelectQuery.java:52)
        at com
.complexible.stardog.api.impl.SPECSelectQuery.execute(SPECSelectQuery.java:31)
        at com
.complexible.stardog.cli.impl.Query.execute(Query.java:201)
        at com
.complexible.stardog.cli.impl.ConnectionCommand.call(ConnectionCommand.java:106)
       
... 2 more
Caused by: com.complexible.common.protocols.client.ClientException: java.util.NoSuchElementException
        at com
.complexible.common.protocols.client.rpc.DefaultRPCClient.get(DefaultRPCClient.java:344)
        at com
.complexible.common.protocols.client.rpc.DefaultRPCClient.execute(DefaultRPCClient.java:321)
        at com
.complexible.stardog.protocols.snarl.client.SNARLClientImpl.select(SNARLClientImpl.java:167)
        at com
.complexible.stardog.protocols.snarl.client.SNARLClientImpl.select(SNARLClientImpl.java:70)
        at com
.complexible.stardog.api.impl.SPECSelectQuery.execute(SPECSelectQuery.java:45)
       
... 5 more
Caused by: org.openrdf.query.QueryEvaluationException: java.util.NoSuchElementException
        at sun
.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun
.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun
.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java
.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at com
.complexible.stardog.protocols.snarl.SNARLThrowableCodec.decode(SNARLThrowableCodec.java:126)
        at com
.complexible.barc.BigPacketCodec.toException(BigPacketCodec.java:388)
        at com
.complexible.barc.BigPacketCodec.decode(BigPacketCodec.java:360)
        at com
.complexible.barc.BigPacketDecoder.channelRead(BigPacketDecoder.java:75)
        at io
.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
        at io
.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
        at io
.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
        at io
.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
        at io
.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
        at io
.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:182)
        at io
.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
        at io
.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
        at io
.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
        at io
.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
        at io
.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
        at io
.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
        at io
.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
        at io
.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
        at io
.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
        at java
.lang.Thread.run(Thread.java:745)

I can't really follow how Stardog is attempting to execute my query so I am hoping someone can help clarify this error message.

Thank you in advance

Michael Grove

unread,
Aug 21, 2015, 2:43:03 PM8/21/15
to stardog
Can you provide the stack trace in the server log?

Thanks.

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

wandering...@gmail.com

unread,
Aug 21, 2015, 3:51:22 PM8/21/15
to Stardog
The only log files I could find was stardog.log.  It just has:

Aug 20, 2015 11:27:46 AM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Finished session validation.  No sessions were stopped.
Aug 20, 2015 12:27:46 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Validating all active sessions...
Aug 20, 2015 12:27:46 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Finished session validation.  No sessions were stopped.
Aug 20, 2015 1:27:46 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Validating all active sessions...
Aug 20, 2015 1:27:46 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Finished session validation.  No sessions were stopped.
Aug 20, 2015 2:27:46 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Validating all active sessions...
Aug 20, 2015 2:27:46 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Finished session validation.  No sessions were stopped.
Aug 20, 2015 3:27:46 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Validating all active sessions...
Aug 20, 2015 3:27:46 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Finished session validation.  No sessions were stopped.
Aug 20, 2015 4:27:46 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Validating all active sessions...
Aug 20, 2015 4:27:46 PM org.apache.shiro.session.mgt.AbstractValidatingSessionManager validateSessions
INFO
: Finished session validation.  No sessions were stopped.

repeated over and over again.  Am I missing something or looking in the wrong place?

Benno

Michael Grove

unread,
Aug 21, 2015, 3:55:52 PM8/21/15
to stardog
No, that's the correct place.  If there is no trace there, we'd need the data to reproduce the exception locally.

Cheers,

Mike

Edgar Rodriguez

unread,
Aug 21, 2015, 4:08:20 PM8/21/15
to sta...@clarkparsia.com
What version of stardog are you using? 
Are you using the same version of the CLI tools (in the `bin/`directory of the distribution package) and the stardog server running? 

It seems like the root exception is a communication error between CLI and Stardog Server; sometimes the internal protocol messages change in different versions and that could cause these type of errors if the client and server versions are not the same.

Cheers,
Edgar

wandering...@gmail.com

unread,
Aug 24, 2015, 1:37:01 PM8/24/15
to Stardog
Hey Edgar,

This is the first and only installation of Stardog on this machine.  It's version 3.1.4.  That is what I get from running stardog version and stardog-admin version.

Benno

wandering...@gmail.com

unread,
Sep 3, 2015, 2:53:54 PM9/3/15
to Stardog, wandering...@gmail.com
Hey,

So I'm not getting an error when I run the query without using the COUNT aggregate.  I think there might be some strange interaction between the VALUES keyword and the COUNT aggregate.  I know this is pretty vague, but I don't think we can make all 20+ gigs of triples available to you.

Benno
...
Reply all
Reply to author
Forward
0 new messages