Comments (9)
@shanhija Adding a dependency is easy, but we want to keep list short and minimize the class files that will be added to self-contained-jar. I did a quick search in my projects and could not find any place that is using ArrayUtils.
Could you provide me a test case to reproduce the issue?
from snowflake-jdbc.
from snowflake-jdbc.
Here's the stack trace:
java.lang.NoClassDefFoundError: net/snowflake/client/jdbc/internal/apache/commons/lang3/ArrayUtils
at net.snowflake.client.jdbc.internal.apache.commons.lang3.StringUtils.splitWorker(StringUtils.java:3042)
at net.snowflake.client.jdbc.internal.apache.commons.lang3.StringUtils.split(StringUtils.java:2593)
at net.snowflake.client.jdbc.SnowflakeConnectionV1.processParameters(SnowflakeConnectionV1.java:392)
at net.snowflake.client.jdbc.SnowflakeConnectionV1.<init>(SnowflakeConnectionV1.java:201)
at net.snowflake.client.jdbc.SnowflakeDriver.connect(SnowflakeDriver.java:344)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:176)
... 11 more
ArrayUtils is referenced in commons-lang3/StringUtils
from snowflake-jdbc.
It seems happening when dealing with connection parameters
@smtakeda @jianshenghuang I cannot reproduce it locally
javac TestJdbc.java
java -cp :snowflake-jdbc-3.4.1.jar TestJdbc
Note I only specified only jdbc jar file in classpath.
But anyway, I can see two solutions
- Add ArrayUtils to self-contained-jar
- Remove the dependency on StringUtils. Ideally, I want to remove the dependency on commons-lang3 completely so that no conflict would happen.
I prefer second solution. Do you have any idea/comment?
from snowflake-jdbc.
from snowflake-jdbc.
+1 for the second option.
from snowflake-jdbc.
+1 for the second option.
The problem emerges when the connection parameters are empty. Here's a test class that reproduces the issue when run with above commands :
import java.sql.DriverManager;
import java.sql.SQLException;
public class TestJdbc {
public static void main(String[] args) throws ClassNotFoundException, SQLException {
Class.forName("net.snowflake.client.jdbc.SnowflakeDriver");
DriverManager.getConnection("jdbc:snowflake://dummy.eu-central-1.snowflakecomputing.com/?");
}
}
from snowflake-jdbc.
Ok. I will go with second one. It seems a trivial change.
from snowflake-jdbc.
This is fixed in 9f7904e and already released in JDBC 3.5.3
from snowflake-jdbc.
Related Issues (20)
- SNOW-990764: Allow disabling certificate validation HOT 7
- SNOW-999335: Spark snowflake read results in certificate issue HOT 13
- SNOW-1001015: Cannot convert value in the driver from type:FIXED(38,0) to type:int, value=5,738,342,984 HOT 2
- SNOW-1003959: Slow query in spring boot not showing the SQL executed. HOT 6
- SNOW-1005946: Make SQL text optional for the input to `StmtUtil.cancel`
- SNOW-1008792: since 3.13.19 , I can not package the snowflake-jdbc into my fat jar HOT 2
- SNOW-1023077: JDBC driver package is too big HOT 2
- SNOW-1042432: Do not use com.amazonaws classes in core SF classes HOT 5
- SNOW-1045676: Update getSQLKeywords to match actual reserved keywords in Snowflake HOT 3
- SNOW-1053954: No enum constant net.snowflake.client.jdbc.SnowflakeType.VECTOR HOT 1
- SNOW-1094021: Add Methods to Datasource to support further Connection Settings HOT 2
- SNOW-1161547: number of retries is fixed to 0 for getQueryMetadata from queryID HOT 5
- SNOW-1163212: InvalidPathException on Windows due to Nested file path HOT 10
- SNOW-1168175: Tiny bug: Link to Release notes in CHANGELOG is outdated HOT 3
- SNOW-1196082: Inserting and reading timestamps is not symetric if too much columns inserted with batch HOT 10
- SNOW-1229142: Should not shade apache commons logging HOT 9
- SNOW-1250205: Driver returns incorrect column type while querying on Query History Views HOT 4
- SNOW-1272895: Key Pair Authentication with Encrypted Key Not Working HOT 9
- SNOW-1304351: The `threetenbp` package is vulnerable to Denial of Service (DoS) due to an Uncaught Exception HOT 2
- SNOW-1313790: Separate cloud-vendor-specific dependencies from thin JAR HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snowflake-jdbc.