You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I was trying to estabilish a Jdbc connection on .NET through this library. Whenever I try to load my Jdbc driver, the following error occurs: Grpc.Core.RpcException: 'Status(StatusCode=Internal, Detail="org/apache/log4j/Logger")'. This occurs when the JdbcConnection bridge is being created when calling JdbcConnection.Open(). You can find my code below: var driverPath = $"{Path.GetDirectoryName(typeof(Program).Assembly.Location)}\\MyJdbcDriver.jar"; var builder = new JdbcConnectionStringBuilder { DriverPath = driverPath, DriverClass = "com.example.jdbc.MyDriver", JdbcUrl = "jdbc:MyDriver:HOST='localhost';PORT='8087';UID='admin;PWD='123';ACC='Admin'" }; var connection = new JdbcConnection(builder); connection.Open(); var command = connection.CreateCommand("SELECT * FROM Users;"); var reader = command.ExecuteReader();
I ensured that the driver path contains the jdbc driver. I also tried this using ConnectionString property instead of the JdbcUrl and with relative or absolute paths of the jdbc driver, but didn't work either. I think this might have to do with how I setup my connection string or either the DriverPath/DriverClass is not setup correctly.
Note: I was able to estabilish this connection on Java, using this exact driver and connection string but no luck on .NET side with this library.
Any ideas why I might be getting this error?
Thanks.
The text was updated successfully, but these errors were encountered:
So I was trying to estabilish a Jdbc connection on .NET through this library. Whenever I try to load my Jdbc driver, the following error occurs: Grpc.Core.RpcException: 'Status(StatusCode=Internal, Detail="org/apache/log4j/Logger")'. This occurs when the JdbcConnection bridge is being created when calling JdbcConnection.Open(). You can find my code below:
var driverPath = $"{Path.GetDirectoryName(typeof(Program).Assembly.Location)}\\MyJdbcDriver.jar";
var builder = new JdbcConnectionStringBuilder { DriverPath = driverPath, DriverClass = "com.example.jdbc.MyDriver", JdbcUrl = "jdbc:MyDriver:HOST='localhost';PORT='8087';UID='admin;PWD='123';ACC='Admin'" };
var connection = new JdbcConnection(builder);
connection.Open();
var command = connection.CreateCommand("SELECT * FROM Users;");
var reader = command.ExecuteReader();
I ensured that the driver path contains the jdbc driver. I also tried this using ConnectionString property instead of the JdbcUrl and with relative or absolute paths of the jdbc driver, but didn't work either. I think this might have to do with how I setup my connection string or either the DriverPath/DriverClass is not setup correctly.
Note: I was able to estabilish this connection on Java, using this exact driver and connection string but no luck on .NET side with this library.
Any ideas why I might be getting this error?
Thanks.
The text was updated successfully, but these errors were encountered: