Closed GoogleCodeExporter closed 9 years ago
Also, play:run, play:start and play:dependencies all seem to run fine.
Original comment by phil...@phillipwright.info
on 22 Apr 2014 at 5:42
Note: I am using eclipsify an importing the project into Eclipse.
I was able to get a similar error, by creating a new play project and adding
the same dependencies (the problem seems to come from one of my company's other
maven projects). When I try to precompile this without the dependency, it's
fine. When I add this dependency, I get:
play.exceptions.CompilationException: The type DocViewerPlugin must implement
the inherited abstract method Comparable<PlayPlugin>.compareTo(Object)
play.exceptions.CompilationException: The method getRealFile() is undefined for
the type Object
Which makes me think something that is getting pulled in via this dependency is
causing some problems.
However, I have no problem building directly with play when I copy the jar from
this dependency into the lib folder first.
Do you have any idea what the conflict could be to cause that error? I am not
familiar enough with the Play internals to have a good idea at this point...
Original comment by phil...@phillipwright.info
on 22 Apr 2014 at 6:19
Can you run with -X option and attach log here?
Original comment by gslowiko...@gmail.com
on 22 Apr 2014 at 6:25
Even if I set the dependency scope to runtime (so that it isn't even needing
during compilation), I still reproduce this.
Original comment by phil...@phillipwright.info
on 22 Apr 2014 at 6:26
Here's the log from when I set the scope to runtime.
Original comment by phil...@phillipwright.info
on 22 Apr 2014 at 6:37
Attachments:
I'm trying to limit the possibilities and noticed that the dependency itself
has dependencies on other projects from my company. I added those dependencies
directly, and it worked fine. I also tried copying all of the dependencies from
the problem project and pasting them into the test project, and it failed. So
it would seem that it is one of the dependencies pulled in by this project that
is *not* in any other sub projects.
I will try to get a list of these dependencies...
Original comment by phil...@phillipwright.info
on 22 Apr 2014 at 6:51
This appears to be the culprit:
<dependency>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.runtime</artifactId>
<version>3.6.0.v20100505</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
I don't know if this is conflicting with some of the Play code, the maven
plugin code, or some other libs in our project, but when I exclude that, things
are fine. I may try to place it back in the dependencies and see if removing
something else helps...
Original comment by phil...@phillipwright.info
on 22 Apr 2014 at 7:07
There are many Eclipse dependencies and Play! uses Eclipse JDT compiler. These
libraries can interfere in some unpredictable ways.
I don't understand, why this works with pure Play! Did you really successfully
precompiled with pure Play! and all these dependencies in "lib" directory?
Original comment by gslowiko...@gmail.com
on 22 Apr 2014 at 7:10
More specifically, it appears to be the dependency this introduces on
org.apache.felix
Original comment by phil...@phillipwright.info
on 22 Apr 2014 at 7:20
Actually, I see the difference.
When I use pure play, we build another war using another process, then we copy
the data over to the lib directory in this project. In *that* directory, we are
filtering out org.apache.felix, so it never makes it into the final lib folder
used.
Sorry to have wasted your time on that :(
However, is there any way to produce a better error message in such a case? In
the test example, I got some messages about the classes not compiling, which
might, perhaps, point one to inspect the libs being imported, but in the actual
project, I get no errors at all other than what I posted in the initial ticket.
Original comment by phil...@phillipwright.info
on 22 Apr 2014 at 7:24
Wow, there are Java classes.
I managed to reproduce your problem. It works with pure Play! and does not work
with Maven. It must be different jars order in the classpath.
Anyway, "org.apache.felix:org.osgi.foundation" dependency has to be excluded.
Original comment by gslowiko...@gmail.com
on 22 Apr 2014 at 7:27
I will investigate more tomorrow.
Original comment by gslowiko...@gmail.com
on 22 Apr 2014 at 7:29
BTW, I meant "JDK classes" writing "Java classes" :)
Original comment by gslowiko...@gmail.com
on 22 Apr 2014 at 7:30
I found the difference between Maven and pure Play! precompilations.
Play! forks Java process.
In Maven it's configurable and turned off for performance reasons.
After turning on, it works (it has to have something to do with classloaders
configuration).
<build>
<plugins>
<plugin>
<groupId>com.google.code.maven-play-plugin</groupId>
<artifactId>play-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<precompileFork>true</precompileFork>
</configuration>
</plugin>
</plugins>
</build>
Let me know if it does not fix the issue.
Original comment by gslowiko...@gmail.com
on 23 Apr 2014 at 8:57
https://maven-play-plugin.googlecode.com/svn/mavensite/1.0.0-beta7/play-maven-pl
ugin/precompile-mojo.html#precompileFork
Original comment by gslowiko...@gmail.com
on 23 Apr 2014 at 8:59
Does it work for you? Can I close this issue?
Original comment by gslowiko...@gmail.com
on 24 Apr 2014 at 9:27
Source of the problem and a workaround found.
Original comment by gslowiko...@gmail.com
on 29 Apr 2014 at 11:49
Original issue reported on code.google.com by
phil...@phillipwright.info
on 22 Apr 2014 at 5:30