import com.complexible.common.openrdf.OpenRdfIO;
import com.complexible.common.openrdf.Graphs;
import com.complexible.common.protocols.server.Server;
import com.complexible.stardog.Stardog;
<dependencies>
<dependency>
<groupId>com.complexible.common</groupId>
<artifactId>core</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>com.complexible.common</groupId>
<artifactId>openrdf</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.complexible.stardog</groupId>
<artifactId>api</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>com.complexible.stardog.protocols.snarl</groupId>
<artifactId>client</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>com.complexible.common.protocols.api</groupId>
<artifactId>client</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>com.complexible.stardog.reasoning.snarl</groupId>
<artifactId>client</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>com.complexible.stardog.search.snarl</groupId>
<artifactId>client</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>com.complexible.stardog.icv.snarl</groupId>
<artifactId>client</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>com.googlecode.sli4j</groupId>
<artifactId>sli4j-slf4j-log4j</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
I'm unable to compile the examples in eclipse/maven. I've run mavenDependencies.sh and verified they're installed in .m2.
But eclipse is unable to find the following symbols and I haven't been able to find them in any of the jars shown in the dox.Could someone please advise? Thanks!.import com.complexible.common.openrdf.OpenRdfIO;
import com.complexible.common.openrdf.Graphs;
import com.complexible.common.protocols.server.Server;
import com.complexible.stardog.Stardog;Partial pom:<dependencies>...<dependency>
<groupId>com.complexible.common</groupId>
<artifactId>core</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>com.complexible.common</groupId>
<artifactId>openrdf</artifactId>
<version>2.0.2</version>
</dependency>
--
-- --
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
Adding all jars from the 3 server directories resolved the Server and Stardog problems but OpenRdfIO and Graphs are nowhere to be found.
Is there a getting started example that doesn't need so many dependencies?
I have a working server. What I really want is sample code for how to issue sparql queries to it from java. I don't really want to be running an embedded server.
Server aServer = Stardog
.buildServer()
.bind(SNARLProtocolConstants.EMBEDDED_ADDRESS)
.start();
Is this the "code that starts the embedded server"? What should I change exactly?
Server aServer = Stardog
.buildServer()
.bind(SNARLProtocolConstants.EMBEDDED_ADDRESS)
.start();
public class TrySnarl
{
public static void main(String[] args) throws Exception
{
Connection aConn = ConnectionConfiguration
.to("snarl://bcox:5820/dtraLocations")
.credentials("admin", "admin")
.connect();
return;
}
}
Exception in thread "main" io.netty.channel.ChannelException: connection refused
at io.netty.channel.local.LocalChannel$LocalUnsafe.connect(LocalChannel.java:359)
at io.netty.channel.DefaultChannelPipeline$HeadHandler.connect(DefaultChannelPipeline.java:1008)
at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:497)
at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:482)
at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:467)
at io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:847)
at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:199)
at io.netty.bootstrap.Bootstrap$2.run(Bootstrap.java:165)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Thread.java:744)
Enter code here...
As Stephen Kahmann reported here earlier, the AdminConnectionConfiguration call works, the ConnectionConfiguration call fails as I reported earlier.
public static void main(String[] args) throws Exception
{
AdminConnection dbms = AdminConnectionConfiguration.toServer("snarl://localhost:5820").credentials("admin", "admin").connect();
// dbms.createMemory("test");
dbms.close();
Connection aConn = ConnectionConfiguration.to("snarl://localhost:5820/dtraLocations").credentials("admin", "admin").connect();
return;
}
I reduced the example to just this where bcox is the dns name of the server; pasted from the server web interface.public class TrySnarl
{
public static void main(String[] args) throws Exception
{
Connection aConn = ConnectionConfiguration
.to("snarl://bcox:5820/dtraLocations")
.credentials("admin", "admin")
.connect();
return;
}
}and it dies as follows. Same results with http: instead of snarl: Why would the connection be refused?
Exception in thread "main" io.netty.channel.ChannelException: connection refused
at io.netty.channel.local.LocalChannel$LocalUnsafe.connect(LocalChannel.java:359)
at io.netty.channel.DefaultChannelPipeline$HeadHandler.connect(DefaultChannelPipeline.java:1008)
at io.netty.channel.DefaultChannelHandlerContext.invokeConnect(DefaultChannelHandlerContext.java:497)
at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:482)
at io.netty.channel.DefaultChannelHandlerContext.connect(DefaultChannelHandlerContext.java:467)
at io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:847)
at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:199)
at io.netty.bootstrap.Bootstrap$2.run(Bootstrap.java:165)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101)
at java.lang.Thread.run(Thread.java:744)
Enter code here...