Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
hthumma1675880999
Contributor
Contributor

Unable to retrieve snowflake data

Hi,

I am trying to connect to snowflake using Talend open studio 8. I am able to create a connection and when I click on test connection, the connection is successful. But it is throwing an error on saving. I tried connecting through beaver and able to establish a connection. I am using JDK 11 and snowflake driver 3.2.2. I tried with both connecting to network out of network. Can someone please help?

Attached is the error file.

Labels (3)
4 Replies
Anonymous
Not applicable

Hi

What are error messages? Can you also attach the log file? the log file is located in <open studio installation directory>/workspace/.metadata/.log

 

Regards

Shong

hthumma1675880999
Contributor
Contributor
Author

Hi song,

attached are the error and log files to the post.

 

Thanks,

Harsha.

Anonymous
Not applicable

Hi

From the log file, I see Java 17 is used to launch studio, Java 17 is not a supported Java environment, please check your Java version and install Java 11.

 

Regards

Shong

hthumma1675880999
Contributor
Contributor
Author

Hi,

I downloaded talend os 7.3 version and updated java to java11 and added snowflake jdbc 3.13 jar to modules. I was able to connect to snowflake but when trying to retrieve the data using tdbinput I am getting the below error. Attached is the log.java.lang.RuntimeException: Failed to initialize MemoryUtil. Was Java started with `--add-opens=java.base/java.nio=ALL-UNNAMED`? (See https://arrow.apache.org/docs/java/install.html)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:141)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.UnsafeAllocationManager.<clinit>(UnsafeAllocationManager.java:27)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerFactory.<clinit>(DefaultAllocationManagerFactory.java:26)

at java.base/java.lang.Class.forName0(Native Method)

at java.base/java.lang.Class.forName(Class.java:375)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerOption.getFactory(DefaultAllocationManagerOption.java:111)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerOption.getDefaultAllocationManagerFactory(DefaultAllocationManagerOption.java:101)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.BaseAllocator$Config.getAllocationManagerFactory(BaseAllocator.java:735)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig.access$801(ImmutableConfig.java:24)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig$InitShim.getAllocationManagerFactory(ImmutableConfig.java:83)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig.<init>(ImmutableConfig.java:47)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig.<init>(ImmutableConfig.java:24)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig$Builder.build(ImmutableConfig.java:485)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.BaseAllocator.<clinit>(BaseAllocator.java:63)

at net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1.create(SnowflakeResultSetSerializableV1.java:577)

at net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1.create(SnowflakeResultSetSerializableV1.java:489)

at net.snowflake.client.core.SFResultSetFactory.getResultSet(SFResultSetFactory.java:29)

at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:214)

at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:129)

at net.snowflake.client.core.SFStatement.execute(SFStatement.java:742)

at net.snowflake.client.core.SFStatement.execute(SFStatement.java:652)

at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQueryInternal(SnowflakeStatementV1.java:236)

at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQuery(SnowflakeStatementV1.java:131)

at org.talend.components.jdbc.runtime.reader.JDBCInputReader.start(JDBCInputReader.java:232)

at org.talend.codegen.flowvariables.runtime.FlowVariablesReader.start(FlowVariablesReader.java:73)

at local_project.jdbc_0_1.jdbc.tDBInput_1Process(jdbc.java:19686)

at local_project.jdbc_0_1.jdbc.tDBConnection_2Process(jdbc.java:482)

at local_project.jdbc_0_1.jdbc.runJobInTOS(jdbc.java:21388)

at local_project.jdbc_0_1.jdbc.main(jdbc.java:21237)

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @1796cf6c

at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)

at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)

at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)

at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:87)

... 28 more

Feb 15, 2023 8:14:48 PM net.snowflake.client.core.SFStatement executeQueryInternal

SEVERE: Exception creating result

java.lang.ExceptionInInitializerError

at net.snowflake.client.jdbc.internal.apache.arrow.memory.UnsafeAllocationManager.<clinit>(UnsafeAllocationManager.java:27)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerFactory.<clinit>(DefaultAllocationManagerFactory.java:26)

at java.base/java.lang.Class.forName0(Native Method)

at java.base/java.lang.Class.forName(Class.java:375)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerOption.getFactory(DefaultAllocationManagerOption.java:111)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.DefaultAllocationManagerOption.getDefaultAllocationManagerFactory(DefaultAllocationManagerOption.java:101)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.BaseAllocator$Config.getAllocationManagerFactory(BaseAllocator.java:735)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig.access$801(ImmutableConfig.java:24)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig$InitShim.getAllocationManagerFactory(ImmutableConfig.java:83)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig.<init>(ImmutableConfig.java:47)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig.<init>(ImmutableConfig.java:24)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.ImmutableConfig$Builder.build(ImmutableConfig.java:485)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.BaseAllocator.<clinit>(BaseAllocator.java:63)

at net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1.create(SnowflakeResultSetSerializableV1.java:577)

at net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1.create(SnowflakeResultSetSerializableV1.java:489)

at net.snowflake.client.core.SFResultSetFactory.getResultSet(SFResultSetFactory.java:29)

at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:214)

at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:129)

at net.snowflake.client.core.SFStatement.execute(SFStatement.java:742)

at net.snowflake.client.core.SFStatement.execute(SFStatement.java:652)

at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQueryInternal(SnowflakeStatementV1.java:236)

at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQuery(SnowflakeStatementV1.java:131)

at org.talend.components.jdbc.runtime.reader.JDBCInputReader.start(JDBCInputReader.java:232)

at org.talend.codegen.flowvariables.runtime.FlowVariablesReader.start(FlowVariablesReader.java:73)

at local_project.jdbc_0_1.jdbc.tDBInput_1Process(jdbc.java:19686)

at local_project.jdbc_0_1.jdbc.tDBConnection_2Process(jdbc.java:482)

at local_project.jdbc_0_1.jdbc.runJobInTOS(jdbc.java:21388)

at local_project.jdbc_0_1.jdbc.main(jdbc.java:21237)

Caused by: java.lang.RuntimeException: Failed to initialize MemoryUtil. Was Java started with `--add-opens=java.base/java.nio=ALL-UNNAMED`? (See https://arrow.apache.org/docs/java/install.html)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:141)

... 28 more

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @1796cf6c

at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)

at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)

at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)

at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)

at net.snowflake.client.jdbc.internal.apache.arrow.memory.util.MemoryUtil.<clinit>(MemoryUtil.java:87)

... 28 more

 

Exception in component tDBInput_1 (jdbc)

org.talend.components.api.exception.ComponentException: SQL_ERROR:{message=JDBC driver internal error: exception creating result java.lang.ExceptionInInitializerError at net.snowflake.client.jdbc.internal.apache.arrow.memory.UnsafeAllocationManager.<clinit>(UnsafeAllocationManager.java:27).}

at org.talend.components.jdbc.CommonUtils.newComponentException(CommonUtils.java:588)

at org.talend.components.jdbc.runtime.reader.JDBCInputReader.start(JDBCInputReader.java:239)

at org.talend.codegen.flowvariables.runtime.FlowVariablesReader.start(FlowVariablesReader.java:73)

at local_project.jdbc_0_1.jdbc.tDBInput_1Process(jdbc.java:19686)

at local_project.jdbc_0_1.jdbc.tDBConnection_2Process(jdbc.java:482)

at local_project.jdbc_0_1.jdbc.runJobInTOS(jdbc.java:21388)

at local_project.jdbc_0_1.jdbc.main(jdbc.java:21237)

Caused by: net.snowflake.client.jdbc.SnowflakeSQLException: JDBC driver internal error: exception creating result java.lang.ExceptionInInitializerError at net.snowflake.client.jdbc.internal.apache.arrow.memory.UnsafeAllocationManager.<clinit>(UnsafeAllocationManager.java:27).

at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQueryInternal(SnowflakeStatementV1.java:243)

at net.snowflake.client.jdbc.SnowflakeStatementV1.executeQuery(SnowflakeStatementV1.java:131)

at org.talend.components.jdbc.runtime.reader.JDBCInputReader.start(JDBCInputReader.java:232)

... 5 more