Cascading / cascading-jdbc

cascading schemes and taps for JDBC
http://cascading.org
27 stars 15 forks source link

NoMethodError trying to build #26

Open jasonmk opened 8 years ago

jasonmk commented 8 years ago

I'm trying to build cascading-jdbc so that I can work through some of the cascading tutorials (specifically, the one dealing with Amazon Redshift). However, I'm getting an error when I attempt to build.

Error output is attached: error.txt

I feel like I'm probably missing a library, but I can't figure out what it is or where I would include it.

I'm using gradle 1.11.

Thanks

fs111 commented 8 years ago

For the branch 3.0, you have to use gradle 2.x. The error seems unrelated to redshift, so you can ignore that.

You can also skip the tests and simply create a jar by running

gradle cascading-jdbc-redshift:jar -Ddev=1 to build the jar file for the redshift sub-project

jr1977 commented 8 years ago

I have having the same issues as mentioned by jasonmk. Only two pass, and six other tests fail with exactly the same nomethodError mentioned by jasonmk. I am using gradle-2.3, and cascading-jdbc-3.0

fs111 commented 8 years ago

@jr1977 I tried it again, and it builds just fine. If you build it against an newly launched cluster you have to replace the "redshift" part in the JDBC protocol with "postgresql" since cascading-jdbc is based on the postgresql driver, not the newer proprietary driver from amazon.

I used gradle-2.10 on JDK 7.

jr1977 commented 8 years ago

Hi fs111 Can you please email me a detailed tutorial. I have tried but fail every time, this is my environment:-

JDK: java version "1.7.0_75" gradle: Gradle 2.10

Downloaded cascading-jdbc-3.0.zip size 135162 bytes, unzipped it and ran this command in the cascading-jdbc-3.0 directory: gradle build -Dcascading.jdbc.url.postgresql='jdbc:postgresql://localhost/cascadingdb?user=username&password=userpassword' -i

ERROR: nomethoerror is gone, but I get errors like this: file or directory '/Users/marcanthony/Desktop/ajrajkumar/PacktPub/cascading-jdbc-3.0/src/main/java', not found file or directory '/Users/marcanthony/Desktop/ajrajkumar/PacktPub/cascading-jdbc-3.0/src/test/java', not found file or directory '/Users/marcanthony/Desktop/ajrajkumar/PacktPub/cascading-jdbc-3.0/build/classes/test', not found

:cascading-jdbc-derby:shadowJar FAILED :cascading-jdbc-derby:shadowJar (Thread[main,5,main]) completed. Took 4.224 secs.

FAILURE: Build failed with an exception.

BUILD FAILED

Thanks for any help.

fs111 commented 8 years ago

Can you explain to me, what your goal is here? If you want to use cascading-jdbc for a given database, you can just download it from http://conjars.org (except for Oracle and Teradata). What are you trying to achieve?

jr1977 commented 8 years ago

I have some data in a postgresql database and want to use that as the jdbc source as a Tap source

Thanks

fs111 commented 8 years ago

If you are on Cascading 3.x, just use this: http://conjars.org/cascading/cascading-jdbc-postgresql/versions/3.0.0

If you are on Cascading 2.x, use this: http://conjars.org/cascading/cascading-jdbc-postgresql/versions/2.7.0