we encounter a strange error. We have got an application that was previously using play 2.0, and we ported it in play 2.3.8. We followed the guidelines and it works fine when we run it through "activator run".
When we try to package it for release with "dist" or to run it with "start", it fails with a compilation error. The error is relied to a class of Lucene 3.6.1 : ReusableAnalyzerBase and TokenStreamComponents, the second is a nested static class of the first one.
import java.io.Reader;
import org.apache.lucene.analysis.ReusableAnalyzerBase;
public class MyAnalyzer extends ReusableAnalyzerBase {
public MyAnalyzer() {
}
@Override
protected TokenStreamComponents createComponents(String fieldName, Reader aReader) {
// This part was changed, but the content of the method is not involved in the problem
return null;
}
}
When it fails we get the following compile error :
[info] Wrote /tmp/test/target/scala-2.11/test_2.11-1.0-SNAPSHOT.pom
[error] /tmp/test/app/MyAnalyzer.java:19: not found: type TokenStreamComponents
[error] protected TokenStreamComponents createComponents(String fieldName, Reader aReader) {
[error] ^
model contains 20 documentable templates
[error] one error found
[error] (compile:doc) Scaladoc generation failed
Cannot start with errors.
importing
org.apache.lucene.analysis.ReusableAnalyzerBase.TokenStreamComponents fixes the problem, but this behavior is really strange and I would like to understand. I tested a similar case with gradle and there is no problem. With eclipse there is no problem, and it tells me that the added import is useless.I tried to google something like "sbt start and compile tasks difference", but I didn't find anything.
Does activator use another java compiler than the JDK or specific javac options? I tried to get the javaOption key in activator console, but it does not display any other option than the ones I set.
We use activator 1.2.12.
Thanks in advance for your help.