I went to add a virtual graph without entering a password and noticed that Stardog would throw an NumberFormatException.
ERROR 2019-09-27 18:19:22,896 [stardog-user-2] com.stardog.http.server.undertow.ErrorHandling:writeError(138): Unexpected error on the server
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542) ~[?:1.8.0_222]
at java.lang.Integer.valueOf(Integer.java:766) ~[?:1.8.0_222]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsDataSource.determineCredentials(RdbmsDataSource.java:144) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsDataSource.create(RdbmsDataSource.java:100) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.create(RdbmsVirtualGraphFactory.java:62) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.create(RdbmsVirtualGraphFactory.java:48) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:349) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:335) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.add(DefaultVirtualGraphRegistry.java:196) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.SecuredVirtualGraphRegistry.add(SecuredVirtualGraphRegistry.java:146) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.addVG(VirtualGraphHttpService.java:391) ~[stardog-virtual-protocols-http-server-7.0.1.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.add(VirtualGraphHttpService.java:193) ~[stardog-virtual-protocols-http-server-7.0.1.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.0.1.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Adding the port not longer returns the number format exception and fails on the password with is expected. The only odd thing is that if the port isn't there and the password is everything is fine.
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542) ~[?:1.8.0_222]
at java.lang.Integer.valueOf(Integer.java:766) ~[?:1.8.0_222]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsDataSource.determineCredentials(RdbmsDataSource.java:144) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsDataSource.create(RdbmsDataSource.java:100) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.create(RdbmsVirtualGraphFactory.java:62) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.create(RdbmsVirtualGraphFactory.java:48) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:349) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:335) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.add(DefaultVirtualGraphRegistry.java:196) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.SecuredVirtualGraphRegistry.add(SecuredVirtualGraphRegistry.java:146) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.addVG(VirtualGraphHttpService.java:391) ~[stardog-virtual-protocols-http-server-7.0.1.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.add(VirtualGraphHttpService.java:193) ~[stardog-virtual-protocols-http-server-7.0.1.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.0.1.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
ERROR 2019-09-28 10:50:24,765 [stardog-user-8] com.stardog.http.server.undertow.ErrorHandling:writeError(138): Unexpected error on the server
java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Integer.java:542) ~[?:1.8.0_222]
at java.lang.Integer.valueOf(Integer.java:766) ~[?:1.8.0_222]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsDataSource.determineCredentials(RdbmsDataSource.java:144) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsDataSource.create(RdbmsDataSource.java:100) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.create(RdbmsVirtualGraphFactory.java:62) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.create(RdbmsVirtualGraphFactory.java:48) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:349) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:335) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.add(DefaultVirtualGraphRegistry.java:196) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.virtual.SecuredVirtualGraphRegistry.add(SecuredVirtualGraphRegistry.java:146) ~[stardog-virtual-core-7.0.1.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.addVG(VirtualGraphHttpService.java:391) ~[stardog-virtual-protocols-http-server-7.0.1.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.add(VirtualGraphHttpService.java:193) ~[stardog-virtual-protocols-http-server-7.0.1.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.0.1.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.3.0.jar:1.3.0]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.3.0.jar:1.3.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
I'm working on a Stardog demo with mapping geonames. It's interesting to take a close look at it. I've only ever used the supplied rdf dump. It's not in the greatest shape. It's missing mappings for a lot of data, many of the mappings could be done better to support cross dataset linking, etc. I 'm planning on posting it here when I'm done.
If you completely remove the jdbc.password line you get the same behavior. If you have the port you get a "password authentication failed..." error and if you don't have the port you the the number format exception.
I'm not able to reproduce this. Just to step back, let's assume you've specified the port. That issue is clear. I assume you can login to this Postgres account without a password? Whether or not you include the jdbc.password= entry in the properties file, you're encountering an "auth failed" error?
With or without the jdbc.password line it returns "null" at the command line and there is a NumberFormatException in the logs
if you use the following properties file with the port it works as expected returning "password authentication failed" if you leave jdbc.password empty or adds the mappings if you add the correct password.
No that's it. It's a corner case if you're using md5 auth with postgres because it's not going to work without a password anyway but it is an issue if you set the postgres auth to trust. In that case you're not expecting to have to use a password. I tested it with "trust" authentication with postgres and you still get the NumberFormatException when you don't supply the port.