Hi,
I am trying to create a VirtualGraph for a relational database hosted in a PostgreSQL Server using the following command:
stardog-admin virtual add database.properties databaseMappings.ttl --format r2rml
The error that I am receiving is:
The server requested password-based authentication, but no password was provided.
and this is the error log:
`ERROR 2019-05-08 15:10:41,133 [stardog-user-38] com.stardog.http.server.undertow.ErrorHandling:writeError(138): Unexpected error on the server
java.lang.RuntimeException: org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided.
at com.complexible.stardog.virtual.RdbmsDataSource.lambda$connect$0(RdbmsDataSource.java:46) ~[stardog-virtual-core-6.1.3.jar:?]
at com.complexible.stardog.virtual.vega.RuntimeDriverLoader.executeUnderClassLoader(RuntimeDriverLoader.java:124) ~[stardog-virtual-core-6.1.3.jar:?]
at com.complexible.stardog.virtual.RdbmsDataSource.connect(RdbmsDataSource.java:41) ~[stardog-virtual-core-6.1.3.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.create(RdbmsVirtualGraphFactory.java:60) ~[stardog-virtual-core-6.1.3.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.create(RdbmsVirtualGraphFactory.java:44) ~[stardog-virtual-core-6.1.3.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:309) ~[stardog-virtual-core-6.1.3.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:295) ~[stardog-virtual-core-6.1.3.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.add(DefaultVirtualGraphRegistry.java:169) ~[stardog-virtual-core-6.1.3.jar:?]
at com.complexible.stardog.virtual.SecuredVirtualGraphRegistry.add(SecuredVirtualGraphRegistry.java:133) ~[stardog-virtual-core-6.1.3.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.addVG(VirtualGraphHttpService.java:344) ~[stardog-virtual-protocols-http-server-6.1.3.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.add(VirtualGraphHttpService.java:144) ~[stardog-virtual-protocols-http-server-6.1.3.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-6.1.3.jar:?]
at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.2.3.jar:1.2.3]
at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.2.3.jar:1.2.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
Caused by: org.postgresql.util.PSQLException: The server requested password-based authentication, but no password was provided.
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:533) ~[postgresql-42.2.5.jre7.jar:42.2.5.jre7]
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:141) ~[postgresql-42.2.5.jre7.jar:42.2.5.jre7]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192) ~[postgresql-42.2.5.jre7.jar:42.2.5.jre7]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.2.5.jre7.jar:42.2.5.jre7]
at org.postgresql.jdbc.PgConnection.(PgConnection.java:195) ~[postgresql-42.2.5.jre7.jar:42.2.5.jre7]
at org.postgresql.Driver.makeConnection(Driver.java:454) ~[postgresql-42.2.5.jre7.jar:42.2.5.jre7]
at org.postgresql.Driver.connect(Driver.java:256) ~[postgresql-42.2.5.jre7.jar:42.2.5.jre7]
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:310) ~[tomcat-jdbc-9.0.2.jar:?]
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:203) ~[tomcat-jdbc-9.0.2.jar:?]
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:738) ~[tomcat-jdbc-9.0.2.jar:?]
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:670) ~[tomcat-jdbc-9.0.2.jar:?]
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:482) ~[tomcat-jdbc-9.0.2.jar:?]
at org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:154) ~[tomcat-jdbc-9.0.2.jar:?]
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118) ~[tomcat-jdbc-9.0.2.jar:?]
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107) ~[tomcat-jdbc-9.0.2.jar:?]
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131) ~[tomcat-jdbc-9.0.2.jar:?]
at com.complexible.stardog.virtual.RdbmsDataSource.lambda$connect$0(RdbmsDataSource.java:43) ~[stardog-virtual-core-6.1.3.jar:?]
... 16 more
`
Below are connections details that I am using (concrete details replaced):
jdbc.url=jdbc:postgresql://servername/database
jdbc.driver=org.postgresql.Driver
jdbc.user=user1
jdbc.password=password
I configured the PostgreSQL Server to allow remote connections, and I am able to connect using Ontop tool as well as PgAdmin, both from my local machine.
I tried the following JDBC drivers and placed in the folder as described in Stardog documentation:
[PostgreSQL JDBC 4.2 Driver, 42.2.5] (https://jdbc.postgresql.org/download/postgresql-42.2.5.jar)
[PostgreSQL JDBC 4.1 Driver, 42.2.5.jre7] (https://jdbc.postgresql.org/download/postgresql-42.2.5.jre7.jar)
Thank you in advance.