0

i have a big GAE (Gooogle app engine) project in scala , and java in combinated. I have intellij 11 with the scala plugin.

I added the war exploded to the server configuration but when i try to compile, this fail. My only clue is:

error while loading CrawlQuery, class file 'very/long/path/Foo.class' is broken
(Scala class file does not contain Scala annotation)

I checked the information, and looks like the problem is some anotation of @JsonTypeInfo: https://issues.scala-lang.org/browse/SI-5165 fails in scala 2.9.1

I changed from 2.9.1 to 2.9.2 but does'nt work. (I'm downloaded a scala-compiler.2.9.2.jar and I added to the project as a global library)

Also, i downloaded the scala library from http://www.scala-lang.org/node/309, and create a dummy project to set the as global library, like explain in: Setting up scala with IntelliJ

One of my friends use Eclipse to compile the same project, with the plugin http://scala-ide.org/ and work's for him.

Community
  • 1
  • 1
vmariano
  • 473
  • 2
  • 19

2 Answers2

1

After check some workarounds, our solutión was create an interface with the notation of the jackson, and add to the class as a mixint:

import com.fasterxml.jackson.annotation.JsonTypeInfo;

@JsonTypeInfo(use = JsonTypeInfo.Id.MINIMAL_CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
public interface JsonTypeMixin {

}

and in the implementation:

 objectMapper.addMixInAnnotations(classOf[Post], classOf[JsonTypeMixin])
vmariano
  • 473
  • 2
  • 19
0

You should also tell IntelliJ to use the new Scala compiler you downloaded: http://confluence.jetbrains.net/download/attachments/12353606/new_project4.png

Peter Knego
  • 79,991
  • 11
  • 123
  • 154