Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems running locally #5

Open
seralf opened this issue Jul 1, 2016 · 23 comments
Open

problems running locally #5

seralf opened this issue Jul 1, 2016 · 23 comments

Comments

@seralf
Copy link

seralf commented Jul 1, 2016

Hi I'm trying to test the server locally and had some issues.
after running:
$ mvn clean package

I've put a log4j.properties file and a config.json file in the main directory, then run:

$ ./tpf_start.sh
10:58:55 INFO  log                  :: Logging initialized @173ms
10:58:55 INFO  Server               :: jetty-9.3.z-SNAPSHOT
10:58:55 INFO  ContextHandler       :: Started o.e.j.s.ServletContextHandler@1c53fd30{/,file:///C:/Users/Al.Serafini/dev_src/Bla      zegraphBasedTPFServer/,AVAILABLE}
10:58:55 INFO  ServerConnector      :: Started ServerConnector@67b64c45{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
10:58:55 INFO  Server               :: Started @346ms
Started server, listening at port 8080
10:58:59 WARN  /                    :: unavailable
java.lang.NullPointerException
        at org.linkeddatafragments.config.ConfigReader.<init>(ConfigReader.java:43)
        at org.linkeddatafragments.servlet.LinkedDataFragmentServlet.init(LinkedDataFragmentServlet.java:82)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:626)
        at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:482)
        at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:774)
        at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:578)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Unknown Source)
10:58:59 WARN  ServletHandler       ::
javax.servlet.ServletException: java.lang.NullPointerException
        at org.linkeddatafragments.servlet.LinkedDataFragmentServlet.init(LinkedDataFragmentServlet.java:102)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:626)
        at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:482)
        at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:774)
        at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:578)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
        at org.linkeddatafragments.config.ConfigReader.<init>(ConfigReader.java:43)
        at org.linkeddatafragments.servlet.LinkedDataFragmentServlet.init(LinkedDataFragmentServlet.java:82)
        ... 23 more
10:58:59 WARN  ServletHandler       ::
org.eclipse.jetty.servlet.ServletHolder$1: java.lang.NullPointerException
        at org.eclipse.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:580)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:637)
        at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:482)
        at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:774)
        at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:578)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
        at org.linkeddatafragments.config.ConfigReader.<init>(ConfigReader.java:43)
        at org.linkeddatafragments.servlet.LinkedDataFragmentServlet.init(LinkedDataFragmentServlet.java:82)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:626)
        ... 22 more

I've tried to understand the errors without luck. I attached my configs in case thei could be useful:

config.json

{
    "title": "Example Linked Data Fragments server",

    "datasourcetypes": {
        "HdtDatasource": "org.linkeddatafragments.datasource.hdt.HdtDataSourceType",
        "JenaTDBDatasource": "org.linkeddatafragments.datasource.tdb.JenaTDBDataSourceType",
        "BlazegraphDataSource": "org.linkeddatafragments.datasource.blazegraph.BlazegraphDataSourceType"
    },

    "datasources": {
        "watdiv": {
            "title": "WatDiv",
            "type": "BlazegraphDataSource",
            "description": "WatDiv benchmark dataset with a Blazegraph back-end",
            "settings": {
                "com.bigdata.rdf.sail.truthMaintenance": "false",
                "com.bigdata.rdf.store.AbstractTripleStore.triplesMode": "true",
                "com.bigdata.rdf.store.AbstractTripleStore.axiomsClass": "com.bigdata.rdf.axioms.NoAxioms",
                "com.bigdata.rdf.store.AbstractTripleStore.justify": "false",
                "com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers": "false",
                "com.bigdata.rdf.store.AbstractTripleStore.textIndex": "false",
                "com.bigdata.journal.AbstractJournal.create": "false",
                //"com.bigdata.journal.AbstractJournal.file": "../data.jnl",
                "file": "src/test/resources/demo.nt",
                //"com.bigdata.journal.AbstractJournal.bufferMode": "DiskRW",
                "com.bigdata.journal.AbstractJournal.bufferMode": "MemStore"
            }
        },

        "prefixes": {
            "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
            "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
            "xsd": "http://www.w3.org/2001/XMLSchema#",
            "dc": "http://purl.org/dc/terms/",
            "foaf": "http://xmlns.com/foaf/0.1/",
            "dbpedia": "http://dbpedia.org/resource/",
            "dbpedia-owl": "http://dbpedia.org/ontology/",
            "dbpprop": "http://dbpedia.org/property/",
            "hydra": "http://www.w3.org/ns/hydra/core#",
            "void": "http://rdfs.org/ns/void#"
        }
    }
}

log4j.properties

log4j.rootLogger=INFO, stdlog

log4j.appender.stdlog=org.apache.log4j.ConsoleAppender
log4j.appender.stdlog.layout=org.apache.log4j.PatternLayout
log4j.appender.stdlog.layout.ConversionPattern=%d{HH:mm:ss} %-5p %-20c{1} :: %m%n

log4j.logger.com.bigdata=INFO
@hartig
Copy link
Owner

hartig commented Jul 1, 2016

Alfredo, I will have a look asap.

@serwan
Copy link

serwan commented Jul 1, 2016

Hi, remove comments in the Json config file.

@seralf
Copy link
Author

seralf commented Jul 1, 2016

Hi thank you both.

yes I've tested it without the comments of course (I've copy/paste here the wrong version)

@serwan
Copy link

serwan commented Jul 1, 2016

It is a wrong "}" placement : your config should looks like :

{
    "title": "Example Linked Data Fragments server",

    "datasourcetypes": {
        "HdtDatasource": "org.linkeddatafragments.datasource.hdt.HdtDataSourceType",
        "JenaTDBDatasource": "org.linkeddatafragments.datasource.tdb.JenaTDBDataSourceType",
        "BlazegraphDataSource": "org.linkeddatafragments.datasource.blazegraph.BlazegraphDataSourceType"
    },

    "datasources": {
        "watdiv": {
            "title": "WatDiv",
            "type": "BlazegraphDataSource",
            "description": "WatDiv benchmark dataset with a Blazegraph back-end",
            "settings": {
                "com.bigdata.rdf.sail.truthMaintenance": "false",
                "com.bigdata.rdf.store.AbstractTripleStore.triplesMode": "true",
                "com.bigdata.rdf.store.AbstractTripleStore.axiomsClass": "com.bigdata.rdf.axioms.NoAxioms",
                "com.bigdata.rdf.store.AbstractTripleStore.justify": "false",
                "com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers": "false",
                "com.bigdata.rdf.store.AbstractTripleStore.textIndex": "false",
                "com.bigdata.journal.AbstractJournal.create": "false",
                "file": "src/test/resources/demo.nt",
                "com.bigdata.journal.AbstractJournal.bufferMode": "MemStore"
            }
         }
     },

     "prefixes": {
         "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
         "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
         "xsd": "http://www.w3.org/2001/XMLSchema#",
         "dc": "http://purl.org/dc/terms/",
         "foaf": "http://xmlns.com/foaf/0.1/",
         "dbpedia": "http://dbpedia.org/resource/",
         "dbpedia-owl": "http://dbpedia.org/ontology/",
         "dbpprop": "http://dbpedia.org/property/",
         "hydra": "http://www.w3.org/ns/hydra/core#",
         "void": "http://rdfs.org/ns/void#"        
    }
}

@seralf
Copy link
Author

seralf commented Jul 1, 2016

Hi @serwan thank you for checking: I have already checked the file sent by jsonlint and was ok, but however I've tested again with your version and got the same error, so I suppose it's not a problem in JSON syntax.

@serwan
Copy link

serwan commented Jul 1, 2016

Not realy syntax problem but structural one. The Json config must have 4 entries (title, datasourcetypes, datasources, and prefixes) with the "}" at the wrong place the "prefixies" input was inside datasources.

Here is the one I use (with a Blazegraph jnl file)

{
  "title": "My Linked Data Fragments server",

  "datasourcetypes": {
    "HdtDatasource"         : "org.linkeddatafragments.datasource.hdt.HdtDataSourceType",
    "JenaTDBDatasource"     : "org.linkeddatafragments.datasource.tdb.JenaTDBDataSourceType",
    "BlazegraphDataSource"  : "org.linkeddatafragments.datasource.blazegraph.BlazegraphDataSourceType"
  },

  "datasources": {
    "watdiv": {
      "title": "WatDiv",
      "type": "BlazegraphDataSource",
      "description": "WatDiv benchmark dataset with a Blazegraph back-end",
      "settings": {
           "com.bigdata.rdf.sail.truthMaintenance": "false",
           "com.bigdata.rdf.store.AbstractTripleStore.triplesMode": "true",
           "com.bigdata.rdf.store.AbstractTripleStore.axiomsClass": "com.bigdata.rdf.axioms.NoAxioms",
           "com.bigdata.rdf.store.AbstractTripleStore.justify": "false",
           "com.bigdata.rdf.store.AbstractTripleStore.statementIdentifiers": "false",
           "com.bigdata.rdf.store.AbstractTripleStore.textIndex": "false",
           "com.bigdata.journal.AbstractJournal.create": "false",
           "com.bigdata.journal.AbstractJournal.file": "data/bigdata.jnl",
           "com.bigdata.journal.AbstractJournal.bufferMode":"DiskRW"

      }
  }},

  "prefixes": {
    "rdf":         "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "rdfs":        "http://www.w3.org/2000/01/rdf-schema#",
    "xsd":         "http://www.w3.org/2001/XMLSchema#",
    "dc":          "http://purl.org/dc/terms/",
    "foaf":        "http://xmlns.com/foaf/0.1/",
    "dbpedia":     "http://dbpedia.org/resource/",
    "dbpedia-owl": "http://dbpedia.org/ontology/",
    "dbpprop":     "http://dbpedia.org/property/",
    "hydra":       "http://www.w3.org/ns/hydra/core#",
    "void":        "http://rdfs.org/ns/void#"
  }
}

@seralf
Copy link
Author

seralf commented Jul 1, 2016

thanks @serwan for the suggestions: I've started editing my file from the example provided in the README, now I've customized a copy of yours and it seems to start.

Anyway I still have issues :-(

  • using MemStore from local file:
    it seems that a dependency for N-TRIPLES is missing. I was experiencing this problem earlier with sesame, so I've checked the actual dependencies of rio, but it seems good. I wonder if some jar is simply missing when starting from executable jar instead of deploying the war somewhere?
  • using a journal file:
    the exception changed to something related to geospatial features
...
16:45:51 INFO  AbstractAtomicRowReadOrWrite :: Accept: name=com.bigdata.rdf.store.axioms, timestamp=1467370495557, value=             com.bigdata.rdf.axioms.NoAxioms@654ebf6c
16:45:51 INFO  ByteArrayBuffer      :: Extending buffer to capacity=256 bytes.
16:45:51 INFO  ByteArrayBuffer      :: Extending buffer to capacity=512 bytes.
16:45:51 INFO  ByteArrayBuffer      :: Extending buffer to capacity=1024 bytes.
16:45:51 INFO  ByteArrayBuffer      :: Extending buffer to capacity=2048 bytes.
16:45:51 WARN  /                    :: unavailable
org.linkeddatafragments.exceptions.DataSourceCreationException: java.lang.RuntimeException: off=0, len=1689
        at org.linkeddatafragments.datasource.blazegraph.BlazegraphDataSourceType.createDataSource(BlazegraphDataSourceTy             pe.java:41)
        at org.linkeddatafragments.datasource.DataSourceFactory.create(DataSourceFactory.java:32)
        at org.linkeddatafragments.servlet.LinkedDataFragmentServlet.init(LinkedDataFragmentServlet.java:92)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:626)
        at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:482)
        at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:774)
        at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:578)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: off=0, len=1689
        at com.bigdata.io.SerializerUtil.deserialize(SerializerUtil.java:239)
        at com.bigdata.io.SerializerUtil.deserialize(SerializerUtil.java:207)
        at com.bigdata.sparse.ValueType.decode(ValueType.java:333)
        at com.bigdata.sparse.AbstractAtomicRowReadOrWrite.atomicRead(AbstractAtomicRowReadOrWrite.java:347)
        at com.bigdata.sparse.AbstractAtomicRowReadOrWrite.atomicRead(AbstractAtomicRowReadOrWrite.java:157)
        at com.bigdata.sparse.AtomicRowRead.apply(AtomicRowRead.java:98)
        at com.bigdata.sparse.AtomicRowRead.apply(AtomicRowRead.java:36)
        at com.bigdata.btree.AbstractBTree.submit(AbstractBTree.java:3216)
        at com.bigdata.btree.UnisolatedReadWriteIndex.submit(UnisolatedReadWriteIndex.java:668)
        at com.bigdata.sparse.SparseRowStore.read(SparseRowStore.java:531)
        at com.bigdata.sparse.SparseRowStore.read(SparseRowStore.java:414)
        at com.bigdata.relation.locator.DefaultResourceLocator.locateResourceOn(DefaultResourceLocator.java:881)
        at com.bigdata.relation.locator.DefaultResourceLocator.locateResource(DefaultResourceLocator.java:564)
        at com.bigdata.relation.locator.DefaultResourceLocator.cacheMiss(DefaultResourceLocator.java:385)
        at com.bigdata.relation.locator.DefaultResourceLocator.locate(DefaultResourceLocator.java:337)
        at com.bigdata.rdf.sail.BigdataSail.createLTS(BigdataSail.java:808)
        at com.bigdata.rdf.sail.BigdataSail.createLTS(BigdataSail.java:746)
        at com.bigdata.rdf.sail.BigdataSail.<init>(BigdataSail.java:723)
        at org.linkeddatafragments.datasource.blazegraph.BlazegraphDataSource.<init>(BlazegraphDataSource.java:44)
        at org.linkeddatafragments.datasource.blazegraph.BlazegraphDataSourceType.createDataSource(BlazegraphDataSourceTy             pe.java:38)
        ... 25 more
Caused by: java.lang.ClassNotFoundException: com.bigdata.service.geospatial.GeoSpatialConfig
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at java.io.ObjectInputStream.resolveClass(Unknown Source)
        at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
        at java.io.ObjectInputStream.readClassDesc(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at com.bigdata.io.SerializerUtil.deserialize(SerializerUtil.java:231)
        ... 44 more
16:45:51 WARN  ServletHandler       ::
javax.servlet.ServletException: org.linkeddatafragments.exceptions.DataSourceCreationException: java.lang.RuntimeExceptio             n: off=0, len=1689
        at org.linkeddatafragments.servlet.LinkedDataFragmentServlet.init(LinkedDataFragmentServlet.java:102)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:626)
        at org.eclipse.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:482)
        at org.eclipse.jetty.servlet.ServletHolder.ensureInstance(ServletHolder.java:774)
        at org.eclipse.jetty.servlet.ServletHolder.prepare(ServletHolder.java:759)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:578)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1158)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1090)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)
        at org.eclipse.jetty.server.Server.handle(Server.java:517)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:261)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
        at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
        at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.linkeddatafragments.exceptions.DataSourceCreationException: java.lang.RuntimeException: off=0, len=1689
        at org.linkeddatafragments.datasource.blazegraph.BlazegraphDataSourceType.createDataSource(BlazegraphDataSourceTy             pe.java:41)
        at org.linkeddatafragments.datasource.DataSourceFactory.create(DataSourceFactory.java:32)
        at org.linkeddatafragments.servlet.LinkedDataFragmentServlet.init(LinkedDataFragmentServlet.java:92)
        ... 23 more
Caused by: java.lang.RuntimeException: off=0, len=1689
        at com.bigdata.io.SerializerUtil.deserialize(SerializerUtil.java:239)
        at com.bigdata.io.SerializerUtil.deserialize(SerializerUtil.java:207)
        at com.bigdata.sparse.ValueType.decode(ValueType.java:333)
        at com.bigdata.sparse.AbstractAtomicRowReadOrWrite.atomicRead(AbstractAtomicRowReadOrWrite.java:347)
        at com.bigdata.sparse.AbstractAtomicRowReadOrWrite.atomicRead(AbstractAtomicRowReadOrWrite.java:157)
        at com.bigdata.sparse.AtomicRowRead.apply(AtomicRowRead.java:98)
        at com.bigdata.sparse.AtomicRowRead.apply(AtomicRowRead.java:36)
        at com.bigdata.btree.AbstractBTree.submit(AbstractBTree.java:3216)
        at com.bigdata.btree.UnisolatedReadWriteIndex.submit(UnisolatedReadWriteIndex.java:668)
        at com.bigdata.sparse.SparseRowStore.read(SparseRowStore.java:531)
        at com.bigdata.sparse.SparseRowStore.read(SparseRowStore.java:414)
        at com.bigdata.relation.locator.DefaultResourceLocator.locateResourceOn(DefaultResourceLocator.java:881)
        at com.bigdata.relation.locator.DefaultResourceLocator.locateResource(DefaultResourceLocator.java:564)
        at com.bigdata.relation.locator.DefaultResourceLocator.cacheMiss(DefaultResourceLocator.java:385)
        at com.bigdata.relation.locator.DefaultResourceLocator.locate(DefaultResourceLocator.java:337)
        at com.bigdata.rdf.sail.BigdataSail.createLTS(BigdataSail.java:808)
        at com.bigdata.rdf.sail.BigdataSail.createLTS(BigdataSail.java:746)
        at com.bigdata.rdf.sail.BigdataSail.<init>(BigdataSail.java:723)
        at org.linkeddatafragments.datasource.blazegraph.BlazegraphDataSource.<init>(BlazegraphDataSource.java:44)
        at org.linkeddatafragments.datasource.blazegraph.BlazegraphDataSourceType.createDataSource(BlazegraphDataSourceTy             pe.java:38)
        ... 25 more
Caused by: java.lang.ClassNotFoundException: com.bigdata.service.geospatial.GeoSpatialConfig
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at java.io.ObjectInputStream.resolveClass(Unknown Source)
        at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
        at java.io.ObjectInputStream.readClassDesc(Unknown Source)
        at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        at java.io.ObjectInputStream.readObject0(Unknown Source)
        at java.io.ObjectInputStream.readObject(Unknown Source)
        at com.bigdata.io.SerializerUtil.deserialize(SerializerUtil.java:231)
        ... 44 more

Moreover in this case the assets (css etc) are missing from the html.
Maybe it's mandatory to test the code with jetty, tomcat etc?

thank you in advance for any comment and suggestion.

@serwan
Copy link

serwan commented Jul 1, 2016

If you used the 2.1.0 Blazegraph version to create your jnl file you may activated the geospacial index.

Adding "com.bigdata.rdf.store.AbstractTripleStore.geoSpatial":"true" to your Json config (or false if not activated) may fix your error.

@hartig
Copy link
Owner

hartig commented Jul 4, 2016

Alfredo, regarding your recent comment with the new issues: Is the version of BlazegraphBasedTPFServer that you are using the one from my github repo here (i.e., https://github.com/hartig/BlazegraphBasedTPFServer) or do you use the version that comes with the official Blazegraph packages? Which version of Blazegraph?

Did @serwan's suggestion about adding the 'com.bigdata.rdf.store.AbstractTripleStore.geoSpatial' config option help to solve your problem?

(@serwan thanks a lot for your help!)

@seralf
Copy link
Author

seralf commented Jul 4, 2016

Hi Olaf thanks for the reply.
I'm using the version on the github repo: I was convinced that it was
available with the official blazegraph distribution, but I didn't find it
there, so I turn to github. The distribution I'm using consists of just one
single jar, is there another more rich? (I've probably missed something
then, I was sure I was missing something... :-))

2016-07-04 21:06 GMT+02:00 Olaf Hartig notifications@github.com:

Alfredo, regarding your recent comment with the new issues: Is the version
of BlazegraphBasedTPFServer that you are using the one from my github repo
here (i.e., https://github.com/hartig/BlazegraphBasedTPFServer) or do you
use the version that comes with the official Blazegraph packages? Which
version of Blazegraph?

Did @serwan https://github.com/serwan's suggestion about adding the
'com.bigdata.rdf.store.AbstractTripleStore.geoSpatial' config option help
to solve your problem?

(@serwan https://github.com/serwan thanks a lot for your help!)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAFYfKXpUy2AGIlUDpV3AZbejOQXJXD6ks5qSVnAgaJpZM4JC9PE
.

@hartig
Copy link
Owner

hartig commented Jul 5, 2016

Alfredo, can you please pull the latest version from github (git pull) and compile again:

mvn clean
mvn package

After doing this, you should have two JAR files in the target directory: a small one (BlazegraphBasedTPFServer-0.1.0.jar) and a big one (BlazegraphBasedTPFServer-0.1.0-SHADED.jar). Then, try again with the latter (the big one). Does this fix your problems?

Note that this version of BlazegraphBasedTPFServer in my github repo is using version 2.0.0 of Blazegraph. Once we have fixed your current issues, I can increase the dependency to the most recent version of Blazegraph (2.1.1).

@seralf
Copy link
Author

seralf commented Jul 5, 2016

Hi Olaf thank you very much:I'llcheck tomorrow from work and let you know
how it will go,thanks!

Il martedì 5 luglio 2016, Olaf Hartig notifications@github.com ha scritto:

Alfredo, can you please pull the latest version from github (git pull)
and compile again:

mvn clean
mvn package

After doing this, you should have two JAR files in the target directory: a
small one (BlazegraphBasedTPFServer-0.1.0.jar) and a big one (
BlazegraphBasedTPFServer-0.1.0-SHADED.jar). Then, try again with the
latter (the big one). Does this fix your problems?

Note that this version of BlazegraphBasedTPFServer in my github repo is
using version 2.0.0 of Blazegraph. Once we have fixed your current issues,
I can increase the dependency to the most recent version of Blazegraph
(2.1.1).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAFYfO7CLnsw6cxO0F3ILPborpcoXqnYks5qSr_RgaJpZM4JC9PE
.

Inviato da Gmail Mobile

@seralf
Copy link
Author

seralf commented Jul 6, 2016

Hi @hartig I've done some test, following your directions.

1.) the final shaded.jar gives me some error:

$ java -Dlog4j.configuration=file:///.../log4j.properties -server -Xmx4g -jar target/BlazegraphBasedTPFServer-0.1.0-SHADED.jar config.json

and the error is:
Error: Invalid or corrupt jarfile target/BlazegraphBasedTPFServer-0.1.0-SHADED.jar

I suppose it could be something wrong in the pom.xml: I've tried a fast inspection with no luck, and a mvn package --debug with no more indications.

2.) however the original-shaded.jar file instead works with no errors!

$ java -Dlog4j.configuration=file:///.../log4j.properties -server -Xmx4g -jar target/original-BlazegraphBasedTPFServer-0.1.0-SHADED.jar config.json

3.) I've trouble finding how to test the url.

Testing with requests like:

http://localhost:8080/
http://localhost:8080/?subject=&predicate=&object=
http://localhost:8080/somecontext/?subject=&predicate=&object=

gives me the error:

HTTP ERROR: 503

Problem accessing /. Reason:

org.eclipse.jetty.servlet.ServletHolder$1: com.google.gson.JsonSyntaxException: java.io.EOFException: End of input at line 41 column 2

I suppose I'm doing something wrong here. Any suggestions?

My config.json contains the following properties, inspired from examples:

"datasources": {
    "watdiv": {
        "title": "WatDiv",
        "type": "BlazegraphDataSource",
        "settings": {
            ...
            "com.bigdata.journal.AbstractJournal.file": "full/path/to/data.jnl",
            "com.bigdata.journal.AbstractJournal.bufferMode": "DiskRW",
            "com.bigdata.rdf.store.AbstractTripleStore.geoSpatial":"true"
        }
    }
    ...
}

@hartig
Copy link
Owner

hartig commented Jul 6, 2016

@seralf
Regarding 1 and 2: Weird! I do not observe something similar on my computer. I do not even have an 'original-....jar' file generated. Anyways, I did a quick search for this issue, found a possible explanation (http://stackoverflow.com/questions/4088701/maven-shaded-jar-is-prefixed-with-original-in-the-file-name), and modified the pom.xml accordingly. Hence, can you please try again? After doing git pull and mvn clean package you should have (only) two JAR files in the target directory; namely:

  • original-BlazegraphBasedTPFServer-0.1.0.jar -- which is small, and
  • BlazegraphBasedTPFServer-0.1.0.jar -- which is bigger.

Can you try with the latter?

Regarding 3: I assume the server is really coming up on port 8080 for you (when starting the server, it should log to the console something like: Started server, listening at port 8080), then you can try the following URL: http://localhost:8080/watdiv Does this work?

@seralf
Copy link
Author

seralf commented Jul 7, 2016

Hi @hartig

yes for 1) and 2) the problem it's exactly that. Reading the article you linked I rember I had the same problem in the past in one project, and if I'm not wrong the solution was indeed in explicitly renaming the jar. I wonder if since I'm working on windows platform at the moment, this could be an issue behind the problem (the new shaded.jar should replace the original-shaded.jar, and we know how windows very often causes problems when reading/writing files)

For the actual test on the url, I attached a log with only the single request you've requested: it seems that for some reason the context it is not problerly initialized. I had no time to test it from code (for example by unit test), if I will be able I'll post directly some proper test.

BlazeGraphLDF.zip

thank you
Alfredo

@hartig
Copy link
Owner

hartig commented Jul 9, 2016

Alfredo, I am not sure what is the bottom line of your response regarding 1 and 2. Can you please confirm that the current version of the pom.xml file works for you without any problems. That is, does your computer generate the two JAR files that I mentioned in my previous mail (and only these)? Or do you have to rename something manually?

Regarding the issue for which you attached the log file, it seems that the LDF server does not find a "prefixes" entry in your config file. Can you please verify that this entry is in the file and---also important!---it is in the correct hierarchical position (that is, it is a top-level entry). If it still does not work, please post the current version of your config file here. If it works however, please confirm so that I know it is okay now.

@seralf
Copy link
Author

seralf commented Jul 9, 2016

Sorry for creating confusion @hartig. I confirm that two files are geenrated, as I said earlier. I used the original-shaded.jar while the shaded.jar it's the one with 0 bytes. I was only commenting the article you've cited.

For the issues: I'll be able to verify again nex Monday and let you know, thank you for the support.

@hartig
Copy link
Owner

hartig commented Jul 9, 2016

Now you are confusing me. Are you sure that you are using the latest version of the pom.xml file? (i.e., the one brought in with the following commit: 96337c4 ? Even with this one you are getting exactly the JAR files mentioned in your earlier comment (#5 (comment))?

@seralf
Copy link
Author

seralf commented Jul 11, 2016

...ahhh ok, finally I got why we were not understand each other, I've missed that update! :-)

after updating correctly my local repo with the latest commits, I was able to use the command

java -Dlog4j.configuration=file:///log4j.properties -server -Xmx4g -jar target/BlazegraphBasedTPFServer-0.1.0.jar config.json

to run the server, with the attached config.json file.

once started the server, I tried to call the path
http://localhost:8080/testldf?subject=&property=&object=
still getting a 503 error (javax.servlet.ServletException: java.lang.NullPointerException), where 'testldf' was my example datasource

any ideas?

I've also created a pull request (#6) for UTF-8 configuration support, in order to avoid weird encodings on windows.

thank you for the support!
config.zip

@hartig
Copy link
Owner

hartig commented Jul 13, 2016

@seralf The config file that you posted in your recent comment is still having the issue that both @serwan and I have pointed out before (see #5 (comment) and #5 (comment)).

I fixed this issue for you in the following file:
config.zip

Please confirm that this is working now for you.

@seralf
Copy link
Author

seralf commented Jul 13, 2016

uhm thankyou both I have to re-check it then!
in the last couple of days I wasn't able to work on it, tomorrow hopefully
I'll test it with your suggestions, thanks

2016-07-13 18:30 GMT+02:00 Olaf Hartig notifications@github.com:

@seralf https://github.com/seralf The config file that you posted in
your recent comment is still having the issue that both @serwan
https://github.com/serwan and I have pointed out before (see #5
(comment)
#5 (comment)
and #5 (comment)
#5 (comment)
).

I fixed this issue for you in the following file:
config.zip
https://github.com/hartig/BlazegraphBasedTPFServer/files/361947/config.zip

Please confirm that this is working now for you.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#5 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAFYfI6k89WmT7GhqGPdScXpW-PiN5Tzks5qVRKhgaJpZM4JC9PE
.

@hartig
Copy link
Owner

hartig commented Jul 14, 2016

@seralf When you had a chance to test it, please let me know whether it works now.

@seralf
Copy link
Author

seralf commented Aug 24, 2016

Hi Olaf thanks for asking.
Starting from your suggestions and modified config, I've made another test, and this time I've got a na HTTP 503 ERROR:

HTTP ERROR: 503

Problem accessing /testldf. Reason:

org.eclipse.jetty.servlet.ServletHolder$1: org.linkeddatafragments.exceptions.DataSourceCreationException: java.lang.RuntimeException: off=0, len=1689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants