Reputation: 7376
I want to connect Vertica with JDBC. But I got errors. Here is my code:
....
Class.forName("com.vertica.jdbc.Driver");
....
connection= DriverManager.getConnection
(
"jdbc:vertica://192.168.2.116:5433/schema", "dbadmin", "pass123"
);
But I got this error (if I open the NetBeans database section, I got the same error message. But I connect to Vertica with the client (DBeaver)):
ex = (java.sql.SQLException) java.sql.SQLException: [Vertica] No enum const class com.vertica.dsi.dataengine.utilities.MetadataSourceColumnTag.COLUMN_SİZE
How can I fix this?
Upvotes: 1
Views: 12288
Reputation: 8886
So if you need a JDBC client for Vertica in NetBeans or IntelliJ IDEA, use this Vertica JDBC driver. It's the one that worked for me (taken from dbvisuzlizer
).
Upvotes: 2
Reputation: 483
I think it is because of your locale. In this case Turkish, I guess.
COLUMN_SİZE has upper case i → İ.
It is Vertica's fault to use toUpper digressively.
Upvotes: 1
Reputation: 1
Make sure the connector (vertica-jdbc-xxxx.jar) is in the JDK\jre\lib\ext folder.
Upvotes: 0
Reputation: 7376
It’s about a 32 bit - 64 bit issue I think, because it is working on 32 bit Windows. I can’t understand.
Upvotes: 0
Reputation: 11
Vertica's connect string uses databasename, not schema name after the host:port. See the doc for details:
https://my.vertica.com/docs/CE/6.0.1/HTML/index.htm#1395.htm
Connection conn = DriverManager.getConnection( "jdbc:vertica://VerticaHost:portNumber/databaseName", "username", "password");
By default, users have a search path of "$user, public, v_catalog, v_monitor and v_internal", therefore, you can create and use a matching username to connect directly to the desired SCHEMA.
Upvotes: 1