Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling source with scald.rb with 2.9.1 #2

Closed
schmmd opened this issue Jan 12, 2012 · 3 comments
Closed

Error compiling source with scald.rb with 2.9.1 #2

schmmd opened this issue Jan 12, 2012 · 3 comments

Comments

@schmmd
Copy link

schmmd commented Jan 12, 2012

Hi, near the top of scald.rb you have the code

COMPILE_CMD="java -cp project/boot/scala-2.8.1/lib/scala-library.jar:project/boot/scala-2.8.1/lib/scala-compiler.jar -Dscala.home=project/boot/scala-2.8.1/lib/ scala.tools.nsc.Main"

But this does not work, at least when the project was built with 2.9.1.

$ scripts/scald.rb --local tutorial/Tutorial1.scala
compiling tutorial/Tutorial1.scala
Exception in thread "main" java.lang.NoClassDefFoundError: scala/tools/nsc/Main
Caused by: java.lang.ClassNotFoundException: scala.tools.nsc.Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: scala.tools.nsc.Main. Program will exit.

I have scala 2.9.1 installed so I changed it to

COMPILE_CMD="scalac"

Voila!

$ scripts/scald.rb --local tutorial/Tutorial1.scala
compiling tutorial/Tutorial1.scala
12/01/12 14:29:49 INFO util.Version: Concurrent, Inc - Cascading 2.0.0 [hadoop-0.20.2+]
12/01/12 14:29:49 INFO flow.Flow: [] starting
12/01/12 14:29:49 INFO flow.Flow: [] source: FileTap["TextLine[['num', 'line']->[ALL]]"]["tutorial/data/hello.txt"]"]
12/01/12 14:29:49 INFO flow.Flow: [] sink: FileTap["TextLine[['num', 'line']->[ALL]]"]["tutorial/data/output1.txt"]"]
12/01/12 14:29:49 INFO flow.Flow: [] parallel execution is enabled: true
12/01/12 14:29:49 INFO flow.Flow: [] starting jobs: 1
12/01/12 14:29:49 INFO flow.Flow: [] allocating threads: 1
12/01/12 14:29:49 INFO planner.FlowStep: [] starting step: (1/1) local

@schmmd
Copy link
Author

schmmd commented Jan 12, 2012

Sorry this was a stupid issue to open. After playing around with options other than --local I noticed that scald.rb is configured for the environment at Twitter. It would be great if some of the twitter-specific options (such as Host) were specifiable as command-line arguments and the scala version number were factored out. I'd make some changes if I knew ruby...

@azymnis
Copy link
Contributor

azymnis commented Jan 13, 2012

Good point.

We are planning to change this so that you can configure these params in a yaml file or something like that.

@azymnis
Copy link
Contributor

azymnis commented Mar 29, 2012

I am closing this issue, as we will be addressing this in an upcoming release.

@azymnis azymnis closed this as completed Mar 29, 2012
avibryant added a commit that referenced this issue Oct 16, 2012
Compute the standard deviation
rubanm added a commit that referenced this issue Aug 1, 2014
Merge from twitter/scalding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants