i think it is because of your locale. in this case turkish i guess. COLUMN_SİZE has upper case i -> İ it is verticas fault to use toUpper digressivly.
How can I connect vertica with JDBC?
Question
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 same error message. But I connect to vertica with 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?
Solution 2
OTHER TIPS
So if you need jdbc
client for vertica
in netbeans
or intellij
use this vertica jdbc driver. It's the one that worked for me. (taken from dbvisuzlizer
).
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.
Its about 32 bit - 64 bit issue I think, because it is working on 32 bit windows I cant understand
make sure the connector (vertica-jdbc-xxxx.jar) is in the JDK\jre\lib\ext folder