Red Hat Bugzilla – Bug 802159
ClassNotFound exception while trying to import maven project
Last modified: 2013-02-13 03:27:19 EST
Description of problem:
I've installed Fedoras edition of Eclipse Indigo from the standard rpm repositories and afterwards I've installed m2eclipse plugin from its official update site using Eclipses "Install software' option. When I tried to import a maven project I got this exception:
when scanning for maven projects in a given directory.
After all this I deinstalled the eclipse from RPM repositories and installed the standard Eclipse distribution for Java EE for tests. m2eclipse worked there.
It seems the class among others, was moved (to org.eclipse.equinox.internal.p2.transport.ecf) in commit 952f0261aae1ae40b11d72fc204a37dd189e3476 of the p2 upstream project.
That commit  would have been included in upstream builds of Indigo, too.
Adam, could you please paste here the output of `ls <your extracted upstream Eclipse installation>/plugins | grep p2`? Thanks.
Hey, here's the output:
[walec51@walec51-laptop ~]$ ls /home/walec51/eclipse/plugins/ | grep p2
It looks like Adam's Eclipse installation from upstream contains p2 bundles including that refactoring so I'm at a loss as to where m2e is expecting that class to be.
Further investigation is required but we're busy with other things ATM. Adam, are you interested in investigating this? We could help you through the process.
yeah I could help
tell me what to do
I'll get you more specifics tomorrow but what I'm thinking is un-tar that Eclipse you downloaded from eclipse.org a second time, start *that* Eclipse instance and get the m2e source into a second workspace. Once you're sure it's the same tag that was used to build the plugins you're trying to run in the first Eclipse instance, you can set a breakpoint or two by double-clicking in the margin next to the line of code where you want to stop. Once this is ready, you can start Fedora's Eclipse (you don't need to have those RPMs uninstalled for the upstream download to work) with some debugging flags. Append the following lines to /etc/eclipse.ini:
Then when you start that Fedora-installed Eclipse instance, it will pause and wait for a debugger to connect on port 8000. In the other running Eclipse instance, you can attach to the Fedora-installed Eclipse instance and step through the code.
This is from memory but I think it should work :) I'll provide some more details tomorrow.
Here are some links which have more info on debugging Eclipse:
Let me know how you make out. Thanks!
ok, I'll try to do this to the end of this week
Was in the process of adding a "me-too" comment, and collating my list of what I yum installed.
I then had a brain wave and did:
yum info eclipse-* | grep p2
Which led me to discover that I hadn't installed p2-discovery:
sudo yum install eclipse-p2-discovery
Which led to a happy scenario.
Adam, please confirm that installing eclipse-p2-discovery corrects this for you.
PS Here is my old "install.sh" for eclipse:
sudo yum install eclipse eclipse-egit eclipse-cdt eclipse-subclipse eclipse-subclipse-graph eclipse-collabnet-merge
I have added eclipse-p2-discovery but I think it would possibly(?) be better if "yum install eclipse" had included this?
Hope that answer helped you anyway, looks like problem solved if eclipse-p2-discovery can be added as a dependency of "eclipse"
There is no way to make eclipse require eclipse-p2-discovery as it will create a cyclic dependency between the two projects. The proper fix is to package m2eclipse and make it require eclipse-p2-discovery as this is the real dependency, nothing in the eclipse platform depends on p2 discovery. This actually looks like a bug in m2eclipse allowing to be installed from update site when p2-discovery is missing - a missing Import-Package/Require-bundle probably.
Btw, does the same happen with Fedora 17 ?
Understood. iirc it does happen in F17. It was the reason I downgraded back to F16 but when I reinstalled F16 the bug started happening - my old Eclipse/m2e combo on F16 (installed earlier in the year but from the same script) did work. That said, I did notice that m2e had been upgraded. Therefore I tried to install an older version of m2e (from last year) and the same thing was happening. This lead me to believe it was a bug in later packagings of the Fedora eclipse.
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora
'version' of '16'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version prior to Fedora 16's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we may not be able to fix it before Fedora 16 is end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" and open it against that version of Fedora.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here:
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version.
Thank you for reporting this bug and we are sorry it could not be fixed.