This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Re: Scala Eclipse Plugin Conflicts with AJDT

6 replies
Gordon Leland H...
Joined: 2009-02-01,
User offline. Last seen 42 years 45 weeks ago.

I start out as a normal java project then I add the AJDT nature then I add the Dynamic Web Module facet. Step 6 involves nothing more than simply installing the plugin. I don't even add the Scala nature to the project nor do I create any scala files. In order to get AJDT working again I have to uninstall the Scala plugin and create a new workspace.
It might be that the AJDT plugin is trying to weave the bytecode of the plugin itself, but I can't think of a reason why it would do that. It would seem more plausible if AspectJ was trying to weave the Scala libs, but the libs arent even part of the project since the Scala nature has not been added to it.
It is interesting that changing the java compliance version to 1.5 fixes the weaving, especially since the Scala nature is not even in the project and it works at 1.6 compliance level without the Scala plugin installed.
On Tue, Feb 3, 2009 at 2:56 AM, Miles Sabin <miles [at] milessabin [dot] com> wrote:
On Tue, Feb 3, 2009 at 5:09 AM, Gordon Leland Hempton
<ghempton [at] gmail [dot] com> wrote:
> After lots of testing I have reduced it to a very simple case
> 1) Install a fresh copy of eclipse 3.4.1
> 2) Install latest AJDT 1.6.3
> 3) Install WTP and enable the Dynamic Web Module facet
> 4) Create a single java class
> 5) Create an aspect with a pointcut on the class from step 3
> At this point AJDT is working properly and the class is being correctly
> woven
> 6) Install Scala Plugin 2.6.3final
> After step 6 is performed AJDT is no longer working and nothing is being
> woven. The error message from my previous emails usually shows up in the
> logs, but my gut intuition is that it is not the cause of the problem.
> One thing that is interesting is that if I skip step 5, the class will be
> correctly woven. Has anyone else noticed a conflict between Scala and WTP?

Is it possible that aspectj is attempting to load-time weave Scala
bytecode (ie. of the plugin itself) and failing? As I said earlier,
aspectj chokes on at least some scalac generated bytecode.

Also it's not clear to me what kinds of projects you have in your
workspace at step (6) above ... do you have a Scala project? Are you
attempting to advise Java and/or Scala which is part of a Scala
project?

Cheers,


Miles

--
Miles Sabin
tel:    +44 (0)1273 720 779
mobile: +44 (0)7813 944 528
skype:  milessabin



--
Gordon Hempton
http://hempton.com
milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Scala Eclipse Plugin Conflicts with AJDT

On Tue, Feb 3, 2009 at 6:29 PM, Gordon Leland Hempton
wrote:
> I start out as a normal java project then I add the AJDT nature then I add
> the Dynamic Web Module facet. Step 6 involves nothing more than simply
> installing the plugin.

OK, thanks for the info.

Could you try just AJDT and the Scala plugin (ie. no Dynamic Web
Module) and let me know if that works for you (it should do, it works
for me, but it'd be nice to know for sure).

Cheers,

Miles

Gordon Leland H...
Joined: 2009-02-01,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala Eclipse Plugin Conflicts with AJDT
I have tried that and it does work. All three need to be installed for the problems to start showing up; scala + ajdt seems to work ok, and wtp + ajdt has always worked great.

On Tue, Feb 3, 2009 at 10:43 AM, Miles Sabin <miles [at] milessabin [dot] com> wrote:
On Tue, Feb 3, 2009 at 6:29 PM, Gordon Leland Hempton
<ghempton [at] gmail [dot] com> wrote:
> I start out as a normal java project then I add the AJDT nature then I add
> the Dynamic Web Module facet. Step 6 involves nothing more than simply
> installing the plugin.

OK, thanks for the info.

Could you try just AJDT and the Scala plugin (ie. no Dynamic Web
Module) and let me know if that works for you (it should do, it works
for me, but it'd be nice to know for sure).

Cheers,


Miles

--
Miles Sabin
tel:    +44 (0)1273 720 779
mobile: +44 (0)7813 944 528
skype:  milessabin



--
Gordon Hempton
http://hempton.com
milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: Scala Eclipse Plugin Conflicts with AJDT

On Tue, Feb 3, 2009 at 6:52 PM, Gordon Leland Hempton
wrote:
> I have tried that and it does work. All three need to be installed for the
> problems to start showing up; scala + ajdt seems to work ok, and wtp + ajdt
> has always worked great.

OK ...

So far the only obvious thing we have to go on is the load time
weaving stacktrace. Given that there are known[1] issues with AJDT
weaving scalac-generated bytecode it would be worth seeing if you can
isolate the root cause of that exception.

If it is the load time weaver choking on scalac-generated bytecode
then the next question would be why is it trying to weave that in the
first place given that it doesn't in the AJDT+Scala Plugin
combination.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=256897

Cheers,

Miles

Colin Bullock
Joined: 2009-01-23,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala Eclipse Plugin Conflicts with AJDT

On Tue, Feb 3, 2009 at 1:16 PM, Miles Sabin <miles [at] milessabin [dot] com> wrote:
On Tue, Feb 3, 2009 at 6:52 PM, Gordon Leland Hempton
<ghempton [at] gmail [dot] com> wrote:
> I have tried that and it does work. All three need to be installed for the
> problems to start showing up; scala + ajdt seems to work ok, and wtp + ajdt
> has always worked great.

For what it's worth, I can confirm that the combination of scala + wtp (without ajdt) works without issue.

- Colin

Andrew Eisenberg
Joined: 2009-02-03,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala Eclipse Plugin Conflicts with AJDT

Do you still get these problems if you disable AJDT's weaving service? Go to
Preferences -> JDT Weaving click Disable, and restart.

ghempton wrote:
>
> It might be that the AJDT plugin is trying to weave the bytecode of the
> plugin itself, but I can't think of a reason why it would do that. It
> would
> seem more plausible if AspectJ was trying to weave the Scala libs, but the
> libs arent even part of the project since the Scala nature has not been
> added to it.
>

The weaving service should not be trying to weave any part of the Scala
plugin.

ghempton wrote:
>
> It is interesting that changing the java compliance version to 1.5 fixes
> the
> weaving, especially since the Scala nature is not even in the project and
> it
> works at 1.6 compliance level without the Scala plugin installed.
>

This is interesting indeed. Don't know what to make of it.

Andrew Eisenberg
(AJDT committer)

Gordon Leland H...
Joined: 2009-02-01,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala Eclipse Plugin Conflicts with AJDT
It still happens when I have JDT weaving disabled. It also happens when I use the previous version of AJDT (1.6.1) that doesn't include JDT weaving. I have experimented with all sorts of different permutations of the various options and it is a definite issue with AJDT + WTP + Java 6 + Scala Plugin.
I will try and isolate the root cause, unfortunately there is not much output being dumped to the workspace log. Can someone point me in the right direction here? 

On Tue, Feb 3, 2009 at 1:41 PM, Andrew Eisenberg <andrew [at] eisenberg [dot] as> wrote:

Do you still get these problems if you disable AJDT's weaving service?  Go to
Preferences -> JDT Weaving click Disable, and restart.


ghempton wrote:
>
> It might be that the AJDT plugin is trying to weave the bytecode of the
> plugin itself, but I can't think of a reason why it would do that. It
> would
> seem more plausible if AspectJ was trying to weave the Scala libs, but the
> libs arent even part of the project since the Scala nature has not been
> added to it.
>

The weaving service should not be trying to weave any part of the Scala
plugin.


ghempton wrote:
>
> It is interesting that changing the java compliance version to 1.5 fixes
> the
> weaving, especially since the Scala nature is not even in the project and
> it
> works at 1.6 compliance level without the Scala plugin installed.
>

This is interesting indeed.  Don't know what to make of it.


Andrew Eisenberg
(AJDT committer)
--
View this message in context: http://www.nabble.com/Scala-Eclipse-Plugin-Conflicts-with-AJDT-tp21773555p21819572.html
Sent from the Scala - User mailing list archive at Nabble.com.




--
Gordon Hempton
http://hempton.com

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland