0
votes

I am using Talend to create a file and then upload it to a Snowflake stage prior to populating the database. I am successfully connecting, but this error is generated when I attempt to PUT the file:

Exception in thread "Thread-2" java.lang.NoSuchMethodError: org.apache.avro.Schema.getLogicalType()Lorg/apache/avro/LogicalType;
    at org.talend.daikon.avro.LogicalTypeUtils.isLogicalDate(LogicalTypeUtils.java:74)
    at org.talend.codegen.enforcer.IncomingSchemaEnforcer.put(IncomingSchemaEnforcer.java:446)
    at org.talend.codegen.enforcer.IncomingSchemaEnforcer.put(IncomingSchemaEnforcer.java:379)

My best guess is that the class used in Talend does not match the class used in Snowflake, but I may be wrong and don't know how to fix it even if I am right. How can I fix this error?

1
Are you using the latest Snowflake JDBC driver and is your path to the .jar files correct? Or does your Talend come with a fixed JDBC driver (and perhaps you can upgrade your Talend to upgrade the driver)? The 3.11 versions of the JDBC had some issues if I recall so I recommend jumping up to the latest of 3.12 and setting any class path variables. - Suzy Lockwood
Are you using the specific Snowflake components in Talend or the generic JDBC components? - NickW

1 Answers

1
votes

You probably have two or more versions of Avro jars on your class path and the version loaded is too old and doesn’t have LogicalType implemented. It looks like logical types came in around Avro v1.8.0.

https://issues.apache.org/jira/browse/AVRO-1497