tags:

views:

39

answers:

1

Hello. I developed an app in scala-ide (eclipse plugin), no errors or warnings. Now I'm trying to deploy it to the stax cloud:

$ stax deploy

But it fails to compile it:

compile:
   [scalac] Compiling 2 source files to /home/gleontiev/workspace/rss2lj/webapp/WEB-INF/classes
error: error while loading FlickrUtils, Scala signature FlickrUtils has wrong version
 expected: 4.1
 found: 5.0
/home/gleontiev/workspace/rss2lj/src/scala/example/snippet/DisplaySnippet.scala:8: error: com.folone.logic.FlickrUtils does not have a constructor
        val dispatcher = new FlickrUtils("8196243@N02")
                         ^
error: error while loading Photo, Scala signature Photo has wrong version
 expected: 4.1
 found: 5.0
/home/gleontiev/workspace/rss2lj/src/scala/example/snippet/DisplaySnippet.scala:9: error: value link is not a member of com.folone.logic.Photo
        val linksGetter = (p:Photo) => p.link
                                         ^
/home/gleontiev/workspace/rss2lj/src/scala/example/snippet/DisplaySnippet.scala:15: error: com.folone.logic.FlickrUtils does not have a constructor
        val dispatcher = new FlickrUtils("8196243@N02")
                         ^
/home/gleontiev/workspace/rss2lj/src/scala/example/snippet/DisplaySnippet.scala:16: error: value medium1 is not a member of com.folone.logic.Photo
        val picsGetter = (p:Photo) => p.medium1
                                        ^
/home/gleontiev/workspace/rss2lj/src/scala/example/snippet/RefreshSnippet.scala:12: error: com.folone.logic.FlickrUtils does not have a constructor
        val dispatcher = new FlickrUtils("8196243@N02")
                         ^
7 errors found
ERROR: : The following error occurred while executing this line:
/home/gleontiev/workspace/rss2lj/build.xml:61: Compile failed with 7 errors; see the compiler error output for details.

I see two errors, it is complaining about: the first one is FlickrUtils class constructor, which is defined like this:

class FlickrUtils(val userId : String) {
    //...
}

The second one is the fact, that two fields are missing from Photo class, which is:

class Photo (val photoId:String, val userId:String, val secret:String, val server:String) {
    private val _medium1 = "/sizes/m/in/photostream"
    val link = "http://flickr.com/photos/" + userId + "/" + photoId
    val medium1 = link + _medium1
}

Seems like stax sdk uses the wrong comliler (?). How do I make it use the right one? If it is not, what is the problem here, and what are some ways to resolve it?

Edit: $ scala -version says

Scala code runner version 2.8.0.final -- Copyright 2002-2010, LAMP/EPFL

I tried compiling everything with scalac manually, puting everything to their places, and running stax deploy afterwards -- same result.

A: 

I actually resolved this by moving FlickrUtils and Photo classes to the packages, where snippets originally are, but I still don't get, why it was not able to compile and use them from the other package.

folone