Scala + stax build issue during deployment

I developed the application in scala -ide (eclipse plugin), no errors or warnings. Now I am trying to deploy it in the stax cloud:

$ stax deploy

But he does not 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: he complains: the first is the constructor of the FlickrUtils class, which is defined as follows:

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

Secondly, the fact that the Photo class is missing two fields:

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
}

It looks like stax sdk is using the wrong compiler (?). How can I use it correctly? If this is not so, then what is the problem and what are the ways to solve it?

Edit: $ scala -version says

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

I tried to compile everything using scalacmanually, putting everything in its place and then running stax deploy- the same result.

+3
1

, FlickrUtils Photo , , , .

+1

Source: https://habr.com/ru/post/1758245/


All Articles