[2.0] Eclipse and conflicting compilations

180 views
Skip to first unread message

Raphael André Bauer

unread,
Apr 11, 2012, 4:52:42 AM4/11/12
to play-fr...@googlegroups.com
Hi,

I am currently often getting:

[error] error while loading Publication, class file
'pla2/target/scala-2.9.1/classes/models/profile/Publication.class' is
broken
[error] (bad constant pool index: 29440 at pos: 949)

I am using Eclipse (eclipsify command) together with play ~run .

Both (eclipse build automatically + run) have compilation enabled, but
at some point the compilations seem to conflict resulting in the error
above. Interestingly it is always the same class where the error
occurs (a simple pojo called Publication).


A "clean" "eclipsify and reimport into Eclipse fixes the problem (but
is not really productive).


Is that a common issue? Any ideas how that can be fixed?

Thanks!


Raphael

GrailsDeveloper

unread,
Apr 11, 2012, 5:35:30 AM4/11/12
to play-fr...@googlegroups.com
Make sure that eclipse doesn't compile into the target folders.
Niels

peter hausel

unread,
Apr 11, 2012, 8:13:14 AM4/11/12
to play-fr...@googlegroups.com
By the way, this will be done automatically for you, once a new version of sbteclipse is released. Thanks Peter

James Roper

unread,
Apr 11, 2012, 8:58:06 AM4/11/12
to play-fr...@googlegroups.com
I'm working with Raphael, and I've found something that could be related.  We are using the typesafe guice plugin.  When the plugin is enabled, automatic reloading, at least of controllers, doesn't work.  The logs output the compiling and reload messages, but when we put a static {} block in the class with some logging, that doesn't get executed, so the controller class is not being reloaded, and when we, in an action, output MyController.class.getClassLoader(), it shows that the classloader version is still v1.  Play.application().classloader() however is v2.  When we disable the guice plugin, everything works fine.  I've reported this issue here:

https://play.lighthouseapp.com/projects/82401/tickets/349-classes-loaded-early-by-play-inject-plugin-never-get-reloaded#ticket-349-1

Possibly this is related?

peter hausel

unread,
Apr 11, 2012, 10:36:21 AM4/11/12
to play-fr...@googlegroups.com
by the way a new version of sbteclipse was just released today which will help us to add play specific tweaks very easily.

I am hoping most eclipse related issues will be fixed in master in the next few days (changing output, adding javabuilder etc. etc.)

Raphael André Bauer

unread,
Apr 12, 2012, 7:12:22 AM4/12/12
to play-fr...@googlegroups.com
On Wed, Apr 11, 2012 at 4:36 PM, peter hausel <peter....@gmail.com> wrote:
> by the way a new version of sbteclipse was just released today which will
> help us to add play specific tweaks very easily.
>
> I am hoping most eclipse related issues will be fixed in master in the next
> few days (changing output, adding javabuilder etc. etc.)

That's really good news!

Yesterday I worked out a solution that seems to work pretty stable.
Thus making eclipse + play2 a really productive team in my eyes.

Just in case anybody is interested:
http://ars-codia.raphaelbauer.com/2012/03/play-2-enabling-eclipse-tooling.html

Comments are much appreciated :)

ra!

Ben McCann

unread,
Apr 21, 2012, 12:58:15 PM4/21/12
to play-fr...@googlegroups.com
Not sure if you still plan on getting to the eclipse stuff soon, but, fyi, sbteclipse 2.1.0-M2 has been released now.

Ben McCann

unread,
Apr 29, 2012, 8:22:00 PM4/29/12
to play-fr...@googlegroups.com

Raphael André Bauer

unread,
Apr 30, 2012, 3:07:48 AM4/30/12
to play-fr...@googlegroups.com
On Mon, Apr 30, 2012 at 2:22 AM, Ben McCann <benjamin...@gmail.com> wrote:
> Here's a pull request:
> https://github.com/playframework/Play20/pull/273/files
cool :)

Thanks!

Raphael
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/wGa0VVV4a4wJ.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.



--
inc: http://ars-machina.raphaelbauer.com
tech: http://ars-codia.raphaelbauer.com
web: http://raphaelbauer.com

Ben McCann

unread,
May 1, 2012, 11:21:11 AM5/1/12
to play-fr...@googlegroups.com
Peter checked in the fix last night:


On Monday, April 30, 2012 3:07:48 AM UTC-4, ra wrote:
> To post to this group, send email to play-framework@googlegroups.com.
> To unsubscribe from this group, send email to

Raphael André Bauer

unread,
May 1, 2012, 12:18:06 PM5/1/12
to play-fr...@googlegroups.com
On Tue, May 1, 2012 at 5:21 PM, Ben McCann <benjamin...@gmail.com> wrote:
> Peter checked in the fix last night:
> https://github.com/playframework/Play20/commit/b9cf8dec995cae587dcb5dd0b723a2ed61092acf

Awesome!

Many thanks. That will really help to fix various annoying problems
for the humble Eclipse user :)

Best,


Raphael
>> > To post to this group, send email to play-fr...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > play-framewor...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/play-framework?hl=en.
>>
>>
>>
>> --
>> inc: http://ars-machina.raphaelbauer.com
>> tech: http://ars-codia.raphaelbauer.com
>> web: http://raphaelbauer.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/O0cE4EH-DBAJ.
>
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages