Compiler problem with Scala and hawtdispatch-scala-1.12.jar

18 views
Skip to first unread message

Oliver Plow

unread,
Aug 9, 2013, 2:57:03 AM8/9/13
to hawtdi...@googlegroups.com
Hello,

I have trouble getting this code here to compile:

import org.fusesource.hawtdispatch._

trait AsyncUtils {
  def async(task: => Unit) {
    getGlobalQueue(HIGH).execute(task)
  }
}

The error message is:

scala: bad symbolic reference. A signature in package.class refers to type DispatchQueue
in package org.fusesource.hawtdispatch which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling package.class.

Same for this code:

import org.fusesource.hawtdispatch._
trait AsyncUtils {
  def async(task: => Unit) {
    val queue = createQueue("session")
    queue{ task() }
  }
}

Then this code:

trait AsyncUtils {
  def async(task: => Unit) {
    getGlobalQueue(HIGH).execute{ task() }
  }
}

creates the compiler error "scala: not found: value HIGH".

because of "or the version on the classpath might be incompatible with the version used when compiling package.class." I also tried with Scala 2.9.3 and Scala 2.10. The errors occur when using IDEA and also the Scala eclipse plugin. I'm at my wits' end ...

Thanks, Oliver

Hiram Chirino

unread,
Aug 9, 2013, 9:26:34 AM8/9/13
to hawtdispatch
You also need the hawtdispatch-1.12.jar on the classpath.
> --
> You received this message because you are subscribed to the Google Groups
> "hawtdispatch" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hawtdispatch...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Hiram Chirino

Engineering | Red Hat, Inc.

hchi...@redhat.com | fusesource.com | redhat.com

skype: hiramchirino | twitter: @hiramchirino

blog: Hiram Chirino's Bit Mojo

Oliver Plow

unread,
Aug 9, 2013, 10:16:43 AM8/9/13
to hawtdi...@googlegroups.com, hi...@hiramchirino.com
Thanks, that did it :-). Looks now like this and runs also fine:


import org.fusesource.hawtdispatch._

trait AsyncUtils {
  def async(task: => Unit) {
    getGlobalQueue(HIGH) { task }
Reply all
Reply to author
Forward
0 new messages