NullPointerException when launching Blazegraph server
Hi,
I just installed Blazegraph 2.1.4 on my Mac (OSX 10.13.4) with JRE 10.0.1. When trying to launch the server with: java -server -Xmx800m -jar blazegraph.jar
I get the following error:
ERROR: Banner.java:160: Uncaught exception in thread
java.lang.NullPointerException
at com.bigdata.rdf.sail.webapp.StandaloneNanoSparqlServer.main(StandaloneNanoSparqlServer.java:142)
Extending the start server timeout via -Djetty.start.timeout=60 does not resolve the error. Any ideas how to resolve?
Thanks!
I think that this thread has the answer.
https://sourceforge.net/p/bigdata/discussion/676946/thread/771a036f/
Bryan
On Sat, May 19, 2018 at 8:50 AM, csrull [email protected] wrote:
Hi,
I just installed Blazegraph 2.1.4 on my Mac (OSX 10.13.4) with JRE 10.0.1. When trying to launch the server with: java -server -Xmx800m -jar blazegraph.jar
I get the following error:
ERROR: Banner.java:160: Uncaught exception in thread java.lang.NullPointerException at com.bigdata.rdf.sail.webapp.StandaloneNanoSparqlServer.main(StandaloneNanoSparqlServer.java:142)
Extending the start server timeout via -Djetty.start.timeout=60 does not resolve the error. Any ideas how to resolve?
Thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/blazegraph/database/issues/89, or mute the thread https://github.com/notifications/unsubscribe-auth/ACdv4OdGJvZ6G0UnJTVsFRy6gIHq-pJdks5t0D8ogaJpZM4UFwUx .
First, thanks for the quick response.
But, I'm not a Java developer, so not sure how to modify the StandaloneNanoSparqlServer.java class and compile. Seems like the code should work out of the box when following the Start Blazegraph instructions on a Mac. Is there something else I can do to run it, short of installing Eclipse (etc), adding a line of code to a class, and recompiling?
Basically, you need to set
-DjettyXml=....
Where .... is the path of your jetty.xml file.
This normally arises with embedded blazegraph use. I am not sure why you are having a problem launching the jar. See https://wiki.blazegraph.com/wiki/index.php/NanoSparqlServer for more information on using the NanoSparqlServer in various modes.
Bryan
On Sun, May 20, 2018 at 7:07 AM, csrull [email protected] wrote:
First, thanks for the quick response.
But, I'm not a Java developer, so not sure how to modify the StandaloneNanoSparqlServer.java class and compile. Seems like the code should work out of the box when following the Start Blazegraph instructions on a Mac. Is there something else I can do to run it, short of installing Eclipse (etc), adding a line of code to a class, and recompiling?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/blazegraph/database/issues/89#issuecomment-390485557, or mute the thread https://github.com/notifications/unsubscribe-auth/ACdv4E2t3C3S22T9o_m4aY0rYz9XQBHxks5t0XiXgaJpZM4UFwUx .
Thanks. Tried that. I put a copy of jetty.xml in the same directory as blazegraph.jar, then executed:
export JETTY_XML=/absolute/path/to/jetty.xml
java -server -Xmx800m -DjettyXml=$JETTY_XML -jar blazegraph.jar
And got the exact same error.
Just following up -- I know this seems like a minor issue given the other bugs you are likely working on. I really want test this out over the weekend. Any other ideas or am I out of luck? Thanks!
Had the same issue with JRE 9.0.4. Fixed it by using JRE 8.0 instead.
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
java -server -Xmx4g -jar blazegraph.jar
Interesting...
On Mon, May 28, 2018, 05:31 Thibault Ehrhart [email protected] wrote:
Had the same issue with JRE 9.0.4. Fixed it by using JRE 8.0 instead.
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) java -server -Xmx4g -jar blazegraph.jar
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/blazegraph/database/issues/89#issuecomment-392514872, or mute the thread https://github.com/notifications/unsubscribe-auth/ACdv4EvHjLYQ9JEqVWoh1rirYDFisGqPks5t2-41gaJpZM4UFwUx .
I got the same error on my mac - macos Sierra 10.13.5
$ java -server -Xmx4g -jar blazegraph.jar INFO: com.bigdata.util.config.LogUtil: Configure: jar:file:/usr/local/share/blazegraph/blazegraph.jar!/log4j.properties
BlazeGraph(TM) Graph Engine
Flexible
Reliable
Affordable
Web-Scale Computing for the Enterprise
Copyright SYSTAP, LLC DBA Blazegraph 2006-2016. All rights reserved.
colins-mbp.home Fri Jul 06 16:10:49 EDT 2018 Mac OS X/10.13.5 x86_64 Mac OS X 10.13.5 x86_64 #CPU=4 Oracle Corporation 9.0.4 freeMemory=252868424 buildVersion=2.1.4 gitCommit=738d05f08cffd319233a4bfbb0ec2a858e260f9c
Dependency License
ICU http://source.icu-project.org/repos/icu/icu/trunk/license.html
bigdata-ganglia http://www.apache.org/licenses/LICENSE-2.0.html
blueprints-core https://github.com/tinkerpop/blueprints/blob/master/LICENSE.txt
colt http://acs.lbl.gov/software/colt/license.html
commons-codec http://www.apache.org/licenses/LICENSE-2.0.html
commons-fileupload http://www.apache.org/licenses/LICENSE-2.0.html
commons-io http://www.apache.org/licenses/LICENSE-2.0.html
commons-logging http://www.apache.org/licenses/LICENSE-2.0.html
dsiutils http://www.gnu.org/licenses/lgpl-2.1.html
fastutil http://www.apache.org/licenses/LICENSE-2.0.html
flot http://www.opensource.org/licenses/mit-license.php
high-scale-lib http://creativecommons.org/licenses/publicdomain
httpclient http://www.apache.org/licenses/LICENSE-2.0.html
httpclient-cache http://www.apache.org/licenses/LICENSE-2.0.html
httpcore http://www.apache.org/licenses/LICENSE-2.0.html
httpmime http://www.apache.org/licenses/LICENSE-2.0.html
jackson-core http://www.apache.org/licenses/LICENSE-2.0.html
jetty http://www.apache.org/licenses/LICENSE-2.0.html
jquery https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt
jsonld https://raw.githubusercontent.com/jsonld-java/jsonld-java/master/LICENCE
log4j http://www.apache.org/licenses/LICENSE-2.0.html
lucene http://www.apache.org/licenses/LICENSE-2.0.html
nanohttp http://elonen.iki.fi/code/nanohttpd/#license
rexster-core https://github.com/tinkerpop/rexster/blob/master/LICENSE.txt
river http://www.apache.org/licenses/LICENSE-2.0.html
semargl https://github.com/levkhomich/semargl/blob/master/LICENSE
servlet-api http://www.apache.org/licenses/LICENSE-2.0.html
sesame http://www.openrdf.org/download.jsp
slf4j http://www.slf4j.org/license.html
zookeeper http://www.apache.org/licenses/LICENSE-2.0.html
ERROR: Banner.java:160: Uncaught exception in thread java.lang.NullPointerException at com.bigdata.rdf.sail.webapp.StandaloneNanoSparqlServer.main(StandaloneNanoSparqlServer.java:142)
JRE version: 10.0.1
I would expect that it would work out of the box. Anything I should configure beforehand?
Colin Goldberg
Try java 8 per the thread.
On Fri, Jul 6, 2018, 13:22 Colin Goldberg [email protected] wrote:
I got the same error on my mac - macos Sierra 10.13.5
$ java -server -Xmx4g -jar blazegraph.jar INFO: com.bigdata.util.config.LogUtil: Configure: jar:file:/usr/local/share/blazegraph/blazegraph.jar!/log4j.properties
BlazeGraph(TM) Graph Engine
Flexible Reliable AffordableWeb-Scale Computing for the Enterprise
Copyright SYSTAP, LLC DBA Blazegraph 2006-2016. All rights reserved.
colins-mbp.home Fri Jul 06 16:10:49 EDT 2018 Mac OS X/10.13.5 x86_64 Mac OS X 10.13.5 x86_64 #CPU=4 Oracle Corporation 9.0.4 freeMemory=252868424 buildVersion=2.1.4 gitCommit=738d05f08cffd319233a4bfbb0ec2a858e260f9c
Dependency License ICU http://source.icu-project.org/repos/icu/icu/trunk/license.html bigdata-ganglia http://www.apache.org/licenses/LICENSE-2.0.html blueprints-core https://github.com/tinkerpop/blueprints/blob/master/LICENSE.txt colt http://acs.lbl.gov/software/colt/license.html commons-codec http://www.apache.org/licenses/LICENSE-2.0.html commons-fileupload http://www.apache.org/licenses/LICENSE-2.0.html commons-io http://www.apache.org/licenses/LICENSE-2.0.html commons-logging http://www.apache.org/licenses/LICENSE-2.0.html dsiutils http://www.gnu.org/licenses/lgpl-2.1.html fastutil http://www.apache.org/licenses/LICENSE-2.0.html flot http://www.opensource.org/licenses/mit-license.php high-scale-lib http://creativecommons.org/licenses/publicdomain httpclient http://www.apache.org/licenses/LICENSE-2.0.html httpclient-cache http://www.apache.org/licenses/LICENSE-2.0.html httpcore http://www.apache.org/licenses/LICENSE-2.0.html httpmime http://www.apache.org/licenses/LICENSE-2.0.html jackson-core http://www.apache.org/licenses/LICENSE-2.0.html jetty http://www.apache.org/licenses/LICENSE-2.0.html jquery https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt jsonld https://raw.githubusercontent.com/jsonld-java/jsonld-java/master/LICENCE log4j http://www.apache.org/licenses/LICENSE-2.0.html lucene http://www.apache.org/licenses/LICENSE-2.0.html nanohttp http://elonen.iki.fi/code/nanohttpd/#license rexster-core https://github.com/tinkerpop/rexster/blob/master/LICENSE.txt river http://www.apache.org/licenses/LICENSE-2.0.html semargl https://github.com/levkhomich/semargl/blob/master/LICENSE servlet-api http://www.apache.org/licenses/LICENSE-2.0.html sesame http://www.openrdf.org/download.jsp slf4j http://www.slf4j.org/license.html zookeeper http://www.apache.org/licenses/LICENSE-2.0.html
ERROR: Banner.java:160: Uncaught exception in thread java.lang.NullPointerException at com.bigdata.rdf.sail.webapp.StandaloneNanoSparqlServer.main(StandaloneNanoSparqlServer.java:142)
JRE version: 10.0.1
I would expect that it would work out of the box. Anything I should configure beforehand?
Colin Goldberg
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/blazegraph/database/issues/89#issuecomment-403137452, or mute the thread https://github.com/notifications/unsubscribe-auth/ACdv4MQPaa-bjO5mWtULabnJ_XJWfsTFks5uD8cagaJpZM4UFwUx .
I spent several hours trying to load JRE 8.0. Still never got it to work. Gave up and am using an alternative. Really wanted to use Blazegraph...
Yes, same with me. Same problem. Same solution. Sadly, spent a lot of time before finding this issue thread
This issue is still present in the latest release (2.1.5) with Java 11.
See same issue here. This is blocking my team upgrading to java 11.
You can run jetty by yourself. In kotlin I do:
fun main() {
val blazePort = 9999
val a = NanoSparqlServer()
val server = Server(blazePort)
val webapp = WebAppContext()
val initParams = LinkedHashMap<String, String>()
initParams[ConfigParams.NAMESPACE] = "xyz"
initParams[ConfigParams.QUERY_THREAD_POOL_SIZE] = ConfigParams.DEFAULT_QUERY_THREAD_POOL_SIZE.toString()
initParams[ConfigParams.FORCE_OVERFLOW] = "false"
initParams[ConfigParams.READ_LOCK] = "0"
webapp.setAttribute("INIT_PARAMS_OVERRIDES", initParams)
webapp.contextPath = "/blazegraph"
webapp.war = a.javaClass.getResource("/war").toExternalForm()
webapp.isExtractWAR = true
server.handler = webapp
server.start()
server.join()
}
Did you try the fix suggested in this thread? See [1,2].
If this is not your problem, can you please include the stack trace and provide a link to the line in the code where the exception is thrown?
Thanks, Bryan
[1] https://sourceforge.net/p/bigdata/discussion/676946/thread/771a036f/ [2] https://sourceforge.net/p/bigdata/discussion/676946/thread/cbc36a99/?limit=25#dfb4
On Mon, May 6, 2019 at 11:18 bjonnh [email protected] wrote:
You can run jetty by yourself. In kotlin I do:
fun main() { val blazePort = 9999 val a = NanoSparqlServer() val server = Server(blazePort) val webapp = WebAppContext() val initParams = LinkedHashMap<String, String>() initParams[ConfigParams.NAMESPACE] = "napralert" initParams[ConfigParams.QUERY_THREAD_POOL_SIZE] = ConfigParams.DEFAULT_QUERY_THREAD_POOL_SIZE.toString() initParams[ConfigParams.FORCE_OVERFLOW] = "false" initParams[ConfigParams.READ_LOCK] = "0" webapp.setAttribute("INIT_PARAMS_OVERRIDES", initParams) webapp.contextPath = "/blazegraph" webapp.war = a.javaClass.getResource("/war").toExternalForm() webapp.isExtractWAR = true server.handler = webapp server.start() server.join() }
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/blazegraph/database/issues/89#issuecomment-489721519, or mute the thread https://github.com/notifications/unsubscribe-auth/AATW7YAIRCWB4AH6GBEDDUDPUBY6JANCNFSM4FAXAUYQ .
-DjettyXml= (address)
May I ask where should the this code be entered to?
Thanks Aref
Right before -server in your command. It is an argument to the JVM
On Thu, Jun 27, 2019 at 15:00 Aref-cs [email protected] wrote:
-DjettyXml= (address)
May I ask where should the this code be entered to?
Thanks
Aref
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/blazegraph/database/issues/89?email_source=notifications&email_token=AATW7YB2S5YABFZ5GYX2PHLP4S2XJA5CNFSM4FAXAUY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYXBD7Y#issuecomment-506335743, or mute the thread https://github.com/notifications/unsubscribe-auth/AATW7YHAP7WXMBPKKOSCERTP4S2XJANCNFSM4FAXAUYQ .
Right before -server in your command. It is an argument to the JVM … On Thu, Jun 27, 2019 at 15:00 Aref-cs @.***> wrote: -DjettyXml= (address) May I ask where should the this code be entered to? Thanks Aref — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#89?email_source=notifications&email_token=AATW7YB2S5YABFZ5GYX2PHLP4S2XJA5CNFSM4FAXAUY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYXBD7Y#issuecomment-506335743>, or mute the thread https://github.com/notifications/unsubscribe-auth/AATW7YHAP7WXMBPKKOSCERTP4S2XJANCNFSM4FAXAUYQ .
Thanks a lot Bryan! :)
The path to jetty.xml is /etc/blazegraph, am I correct?
I used this command: java -DjettyXml=/etc/blazegraph -server -Xmx4g -jar blazegraph.jar
However, it was not successful!
Also, I've seen the code below in one of the links you provided. Where can I find the StandaloneNanoSparqlServer.Java and where in the file should I paste this code?
String jettyXml = System.getProperty(SystemProperties.JETTY_XML, "jetty.xml");
System.setProperty("jetty.home", jettyXml.getClass().getResource("/war").toExternalForm());
Thanks in Advance, Aref
Setup with/Specific Downgrade to Java 8 JDK and JRE worked for me to get it running (on Ubuntu 18.04).
Installing Java 8 JRE & JDK
sudo apt install openjdk-8-jre-headless
sudo apt install openjdk-8-jdk
If needed: Uninstalling Java Installation:
sudo apt-get remove --purge icedtea-* openjdk-*
Please try the jar version included in the 2.1.6 RC. It works with Java 9+.
https://github.com/blazegraph/database/releases/tag/BLAZEGRAPH_2_1_6_RC
First, you should uninstall your java sdk version and set up the java sdk version 8: $ sudo apt install openjdk-8-jdk Then install Blazegraph and run it: $ curl -L -o blazegraph.jar https://github.com/blazegraph/database/releases/download/BLAZEGRAPH_RELEASE_CANDIDATE_2_1_5/blazegraph.jar java -jar blazegraph.jar
It works for me and I'm working on ubuntu.
I forgot the dollar before "java -jar blazegraph.jar" to run it. good luck !