Bug 802159 - ClassNotFound exception while trying to import maven project
ClassNotFound exception while trying to import maven project
Product: Fedora
Classification: Fedora
Component: eclipse (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Alexander Kurtakov
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-03-11 14:42 EDT by Adam Walczak
Modified: 2013-02-13 03:27 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-13 03:27:16 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Adam Walczak 2012-03-11 14:42:24 EDT
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:

java.lang.NoClassDefFoundError: org/eclipse/equinox/internal/p2/repository/RepositoryTransport

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.
Comment 1 Roland Grunberg 2012-03-12 09:28:12 EDT
It seems the class among others, was moved (to org.eclipse.equinox.internal.p2.transport.ecf)  in commit 952f0261aae1ae40b11d72fc204a37dd189e3476 of the p2 upstream project.
Comment 2 Andrew Overholt 2012-03-12 10:48:14 EDT
That commit [1] 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.

Comment 3 Adam Walczak 2012-03-13 06:10:09 EDT
Hey, here's the output:

[walec51@walec51-laptop ~]$ ls /home/walec51/eclipse/plugins/ | grep p2
Comment 4 Andrew Overholt 2012-03-13 10:27:33 EDT
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.
Comment 5 Adam Walczak 2012-03-13 13:05:00 EDT
yeah I could help
tell me what to do
Comment 6 Andrew Overholt 2012-03-13 16:31:29 EDT
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.
Comment 8 Adam Walczak 2012-03-19 20:27:33 EDT
ok, I'll try to do this to the end of this week
Comment 9 tom.jenkinson 2012-06-28 07:13:50 EDT
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?
Comment 10 tom.jenkinson 2012-07-05 16:37:30 EDT
Hope that answer helped you anyway, looks like problem solved if eclipse-p2-discovery can be added as a dependency of "eclipse"
Comment 11 Alexander Kurtakov 2012-07-05 17:18:38 EDT
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.
Comment 12 Alexander Kurtakov 2012-07-05 17:19:07 EDT
Btw, does the same happen with Fedora 17 ?
Comment 13 tom.jenkinson 2012-07-06 02:45:32 EDT
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.
Comment 14 Fedora End Of Life 2013-01-16 05:08:36 EST
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: 
Comment 15 Fedora End Of Life 2013-02-13 03:27:19 EST
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.

Note You need to log in before you can comment on or make changes to this bug.