Hi,
I'm trying to add a new virtual graph which connects to a Sybase database:
stardog-admin --krb5 --server http://xxx:6820 virtual add ./sybase.properties ./issues-mapping.sms
My properties file looks like this:
jdbc.url=jdbc:jtds:sybase://XYZ/DBname
jdbc.driver=com.sybase.jdbc4.jdbc.SybDriver
But I keep getting this error:
WARN 2020-05-13 14:00:50,097 [main] org.apache.http.impl.client.TargetAuthenticationStrategy:select(183): Authentication scheme Basic not supported
java.sql.SQLException: Driver:com.sybase.jdbc4.jdbc.SybDriver@1b366f2b returned null for URL:jdbc:jtds:sybase://xxx/DBname
What could be the issue here? Is it the URL string or driver not being picked up?
Thanks. That problem is resolved but now I'm getting another issue bellow, I'm using kerberos
WARN 2020-05-13 18:54:41,043 [main] org.apache.http.impl.client.TargetAuthenticationStrategy:select(183): Authentication scheme Basic not supported
JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).
The Kerberos protocol is only used to authenticate the Stardog client to the server and won't (shouldn't!) have any impact on the Sybase connection. Can you check for details on this error in the stardog.log file on the server?
ERROR 2020-05-13 17:54:41,262 [stardog-user-6] com.complexible.stardog.virtual.DefaultVirtualGraphRegistry:createVirtualGraph(368): Cannot initialize virtual graph sybase
java.lang.RuntimeException: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).
at com.complexible.stardog.virtual.vega.rdbms.RdbmsDataSource.lambda$connect$0(RdbmsDataSource.java:61) ~[stardog-virtual-core-7.2.1.jar:?]
at com.complexible.stardog.virtual.vega.RuntimeDriverLoader.executeUnderClassLoader(RuntimeDriverLoader.java:130) ~[stardog-virtual-core-7.2.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsDataSource.connect(RdbmsDataSource.java:56) ~[stardog-virtual-core-7.2.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.create(RdbmsVirtualGraphFactory.java:65) ~[stardog-virtual-core-7.2.1.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsVirtualGraphFactory.create(RdbmsVirtualGraphFactory.java:49) ~[stardog-virtual-core-7.2.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:365) ~[stardog-virtual-core-7.2.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.createVirtualGraph(DefaultVirtualGraphRegistry.java:346) ~[stardog-virtual-core-7.2.1.jar:?]
at com.complexible.stardog.virtual.DefaultVirtualGraphRegistry.add(DefaultVirtualGraphRegistry.java:211) ~[stardog-virtual-core-7.2.1.jar:?]
at com.complexible.stardog.virtual.SecuredVirtualGraphRegistry.add(SecuredVirtualGraphRegistry.java:149) ~[stardog-virtual-core-7.2.1.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.addVG(VirtualGraphHttpService.java:414) ~[stardog-virtual-protocols-http-server-7.2.1.jar:?]
at com.complexible.stardog.protocols.http.server.virtual.admin.VirtualGraphHttpService.add(VirtualGraphHttpService.java:213) ~[stardog-virtual-protocols-http-server-7.2.1.jar:?]
at com.stardog.http.server.undertow.jaxrs.ExtractRoutes.lambda$handleIt$5(ExtractRoutes.java:192) ~[stardog-protocols-http-server-7.2.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_192]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_192]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_192]
Caused by: java.sql.SQLException: JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s).
at com.sybase.jdbc4.jdbc.ErrorMessage.raiseError(ErrorMessage.java:832) ~[?:?]
at com.sybase.jdbc4.tds.Tds.processLoginAckToken(Tds.java:5561) ~[?:?]
at com.sybase.jdbc4.tds.Tds.doLogin(Tds.java:727) ~[?:?]
at com.sybase.jdbc4.tds.Tds.login(Tds.java:581) ~[?:?]
at com.sybase.jdbc4.jdbc.SybConnection.tryLogin(SybConnection.java:530) ~[?:?]
at com.sybase.jdbc4.jdbc.SybConnection.handleHAFailover(SybConnection.java:3824) ~[?:?]
at com.sybase.jdbc4.jdbc.SybConnection.<init>(SybConnection.java:382) ~[?:?]
at com.sybase.jdbc4.jdbc.SybConnection.<init>(SybConnection.java:282) ~[?:?]
at com.sybase.jdbc4.jdbc.SybDriver.connect(SybDriver.java:245) ~[?:?]
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319) ~[tomcat-jdbc-9.0.24.jar:?]
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212) ~[tomcat-jdbc-9.0.24.jar:?]
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:744) ~[tomcat-jdbc-9.0.24.jar:?]
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:676) ~[tomcat-jdbc-9.0.24.jar:?]
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483) ~[tomcat-jdbc-9.0.24.jar:?]
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:154) ~[tomcat-jdbc-9.0.24.jar:?]
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118) ~[tomcat-jdbc-9.0.24.jar:?]
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107) ~[tomcat-jdbc-9.0.24.jar:?]
at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:131) ~[tomcat-jdbc-9.0.24.jar:?]
at com.complexible.stardog.virtual.vega.rdbms.RdbmsDataSource.lambda$connect$0(RdbmsDataSource.java:58) ~[stardog-virtual-core-7.2.1.jar:?]
I did resolve that problem but now I get this error, any idea what this means:
ERROR 2020-05-14 10:28:09,604 [stardog-user-6] com.complexible.stardog.virtual.DefaultVirtualGraphRegistry:createVirtualGraph(368): Cannot initialize virtual graph sybase
java.lang.RuntimeException: java.sql.SQLException: JZ0GS: A Generic Security Services API exception occurred. The major error code is 13.
The major error message is: No valid credentials provided
The minor error code is -1.
The minor error message is: Failed to find any Kerberos tgt
My jdbc url looks like this: jdbc.url=jdbc:sybase:Tds:vixxx.yyy.ms.com:10xxx/Sybase?JCONNECT_VERSION=6&REQUEST_KERBEROS_SESSION=true&SERVICE_PRINCIPAL_NAME=sybase/vixxx.yyy.ms.com
Can you run kinit sybase/vixxx.yyy.ms.com@DEFAULTRELM.COM replacing DEFAULTRELM.COM with your actual default realm or I think you can leave it off depending on your config.