Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 466091 - Can not start Eclipse after installing everything (from our repo)
Summary: Can not start Eclipse after installing everything (from our repo)
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P1 critical (vote)
Target Milestone: 4.5 RC1   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 465818
  Show dependency tree
 
Reported: 2015-05-01 11:28 EDT by David Williams CLA
Modified: 2015-05-06 16:00 EDT (History)
6 users (show)

See Also:
Lars.Vogel: review+


Attachments
log from failed attempt to install nearly everything (6.96 KB, text/plain)
2015-05-01 11:29 EDT, David Williams CLA
no flags Details
This is complete log (15.51 KB, text/plain)
2015-05-01 11:38 EDT, David Williams CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Williams CLA 2015-05-01 11:28:24 EDT
I started with platform binary distribution. 

Added 4.5milestones update site, disabled others, 

Then "installed new software" and selected everything -- every category -- except for Equinox Target Components. 

And, then when restarted when asked to, but the restart failed. Tried to start again, but failed in same way. 

I'll attach whole log, but following seemed to be the main problem: 

!ENTRY org.eclipse.osgi 4 0 2015-05-01 11:19:19.427
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/eclipse/e4/emf/internal/xpath/NullPointer (wrong name: org/apache/commons/jxpath/ri/model/beans/NullPointer)
	at java.lang.ClassLoader.defineClassImpl(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:335)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:736)
Comment 1 David Williams CLA 2015-05-01 11:29:12 EDT
Created attachment 253035 [details]
log from failed attempt to install nearly everything
Comment 2 David Williams CLA 2015-05-01 11:32:25 EDT
Markus, Lars, 

Can you tell (from a quick glance) is if this is something that should prevent us from announcing M7? Or, just a quick of me installing some goofy combination of stuff that should not have been installed?
Comment 3 David Williams CLA 2015-05-01 11:38:28 EDT
Created attachment 253036 [details]
This is complete log

Sorry, former was log of last session (of failing to start). 

This attachment is complete log. 

I can see this is "test related" somehow, so guess that would not prevent announcing M7. Will move to "UI" unless I hear otherwise.
Comment 4 David Williams CLA 2015-05-01 11:39:20 EDT
Not sure if this is a "sign of something bad" ...or, just something we need to be sure users can not "do to themselves".
Comment 5 Brian de Alwis CLA 2015-05-01 16:39:18 EDT
It looks weird: I don't recall ever seeing "wrong name:" before with OSGi.  When I try to reproduce, I get p2 conflict saying the Eclipse e4 Tools Developer Resources cannot be installed.
Comment 6 Brian de Alwis CLA 2015-05-04 16:07:26 EDT
Digging a little bit deeper, the error seems correct: the classfile in the org.eclipse.e4.emf.xpath bundle is incorrect!  See the "Warning" below.

In fact a large number of the classes in the bundle are reported as being from org.apache.commons.jxpath!

====================
$ unzip -p Eclipse.app/Contents/Eclipse/plugins/org.eclipse.e4.emf.xpath_0.1.100.v20150402-1021.jar org/eclipse/e4/emf/internal/xpath/NullPointer.class >/tmp/NullPointer.class
$ javap -cp /tmp -p -c -s -v NullPointer
Warning: Binary file NullPointer contains org.apache.commons.jxpath.ri.model.beans.NullPointer
Compiled from "NullPointer.java"
public class org.apache.commons.jxpath.ri.model.beans.NullPointer extends org.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer {
  public org.apache.commons.jxpath.ri.model.beans.NullPointer(org.apache.commons.jxpath.ri.QName, java.util.Locale);
  public org.apache.commons.jxpath.ri.model.beans.NullPointer(org.apache.commons.jxpath.ri.model.NodePointer, org.apache.commons.jxpath.ri.QName);
  public org.apache.commons.jxpath.ri.model.beans.NullPointer(java.util.Locale, java.lang.String);
  public org.apache.commons.jxpath.ri.QName getName();
  public java.lang.Object getBaseValue();
  public boolean isCollection();
  public boolean isLeaf();
  public boolean isActual();
  public org.apache.commons.jxpath.ri.model.beans.PropertyPointer getPropertyPointer();
  public org.apache.commons.jxpath.ri.model.NodePointer createPath(org.apache.commons.jxpath.JXPathContext, java.lang.Object);
  public org.apache.commons.jxpath.ri.model.NodePointer createPath(org.apache.commons.jxpath.JXPathContext);
  public org.apache.commons.jxpath.ri.model.NodePointer createChild(org.apache.commons.jxpath.JXPathContext, org.apache.commons.jxpath.ri.QName, int);
  public org.apache.commons.jxpath.ri.model.NodePointer createChild(org.apache.commons.jxpath.JXPathContext, org.apache.commons.jxpath.ri.QName, int, java.lang.Object);
  public int hashCode();
  public boolean equals(java.lang.Object);
  public java.lang.String asPath();
  public int getLength();
}
====================


There's actually a number of files like this:

====================
$ mkdir /tmp/emf-xpath
$ unzip -q -d /tmp/emf-xpath Eclipse.app/Contents/Eclipse/plugins/org.eclipse.e4.emf.xpath_0.1.100.v20150402-1021.jar
$ cd /tmp/emf-xpath
$ find . -name '*.class' -print | while read f; do javap -cp . `echo $f | sed -e 's;^\./;;' -e 's;/;.;g' -e 's/\.class//'`; done >/dev/null
Warning: Binary file org.eclipse.e4.emf.internal.xpath.BeanAttributeIterator contains org.apache.commons.jxpath.ri.model.beans.BeanAttributeIterator
Warning: Binary file org.eclipse.e4.emf.internal.xpath.BeanPointer contains org.apache.commons.jxpath.ri.model.beans.BeanPointer
Warning: Binary file org.eclipse.e4.emf.internal.xpath.BeanPointerFactory contains org.apache.commons.jxpath.ri.model.beans.BeanPointerFactory
Warning: Binary file org.eclipse.e4.emf.internal.xpath.BeanPropertyPointer contains org.apache.commons.jxpath.ri.model.beans.BeanPropertyPointer
Warning: Binary file org.eclipse.e4.emf.internal.xpath.CollectionAttributeNodeIterator contains org.apache.commons.jxpath.ri.model.beans.CollectionAttributeNodeIterator
Warning: Binary file org.eclipse.e4.emf.internal.xpath.CollectionChildNodeIterator contains org.apache.commons.jxpath.ri.model.beans.CollectionChildNodeIterator
Warning: Binary file org.eclipse.e4.emf.internal.xpath.CollectionNodeIterator contains org.apache.commons.jxpath.ri.model.beans.CollectionNodeIterator
Warning: Binary file org.eclipse.e4.emf.internal.xpath.CollectionPointer contains org.apache.commons.jxpath.ri.model.beans.CollectionPointer
Warning: Binary file org.eclipse.e4.emf.internal.xpath.CollectionPointerFactory contains org.apache.commons.jxpath.ri.model.beans.CollectionPointerFactory
Warning: Binary file org.eclipse.e4.emf.internal.xpath.LangAttributePointer contains org.apache.commons.jxpath.ri.model.beans.LangAttributePointer
Warning: Binary file org.eclipse.e4.emf.internal.xpath.NullElementPointer contains org.apache.commons.jxpath.ri.model.beans.NullElementPointer
Warning: Binary file org.eclipse.e4.emf.internal.xpath.NullPointer contains org.apache.commons.jxpath.ri.model.beans.NullPointer
Warning: Binary file org.eclipse.e4.emf.internal.xpath.NullPropertyPointer contains org.apache.commons.jxpath.ri.model.beans.NullPropertyPointer
Warning: Binary file org.eclipse.e4.emf.internal.xpath.PropertyIterator contains org.apache.commons.jxpath.ri.model.beans.PropertyIterator
Warning: Binary file org.eclipse.e4.emf.internal.xpath.PropertyOwnerPointer contains org.apache.commons.jxpath.ri.model.beans.PropertyOwnerPointer
Warning: Binary file org.eclipse.e4.emf.internal.xpath.PropertyPointer contains org.apache.commons.jxpath.ri.model.beans.PropertyPointer
====================
Comment 7 Brian de Alwis CLA 2015-05-04 16:32:07 EDT
Upping importance.  I can reproduce this doing a local build and examining the resulting class files.  I can't see why this is happening.

$ cd bundles/org.eclipse.e4.emf.xpath
$ mvn -Pbuild-individual-bundles clean compile
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: org.eclipse.e4:org.eclipse.e4.emf.xpath:0.1.100-SNAPSHOT @ /d1/e4/git-platform.ui/bundles/org.eclipse.e4.emf.xpath/pom.xml
[INFO] Fetching p2.index from http://download.eclipse.org/tools/orbit/downloads/drops/S20150428165605/repository/ (0B at 0B/s)
[INFO] Adding repository http://download.eclipse.org/tools/orbit/downloads/drops/S20150428165605/repository
[INFO] Adding repository http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/base/S201504280315
[INFO] Adding repository http://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.2.9.v20150224
[INFO] Adding repository http://download.eclipse.org/rt/ecf/448916/site.p2
[INFO] Adding repository http://download.eclipse.org/cbi/updates/license/1.0.1.v20140414-1359
[INFO] Adding repository http://download.eclipse.org/tools/ajdt/aspectj/update/e42
[INFO] Adding repository http://download.eclipse.org/egit/updates-3.7
[INFO] Adding repository http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/core/S201501230357
[INFO] Fetching p2.index from http://download.eclipse.org/eclipse/updates/4.5-I-builds/ (0B at 0B/s)
[INFO] Adding repository http://download.eclipse.org/eclipse/updates/4.5-I-builds
[INFO] Fetching p2.index from http://download.eclipse.org/eclipse/updates/4.5-I-builds/I20150501-2000/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/eclipse/updates/4.5-I-builds/I20150502-1500/ (0B at 0B/s)
[INFO] Fetching p2.index from http://download.eclipse.org/eclipse/updates/4.5-I-builds/I20150503-2000/ (0B at 0B/s)
[INFO] Resolving dependencies of MavenProject: org.eclipse.e4:org.eclipse.e4.emf.xpath:0.1.100-SNAPSHOT @ /d1/e4/git-platform.ui/bundles/org.eclipse.e4.emf.xpath/pom.xml
[INFO] Resolving class path of MavenProject: org.eclipse.e4:org.eclipse.e4.emf.xpath:0.1.100-SNAPSHOT @ /d1/e4/git-platform.ui/bundles/org.eclipse.e4.emf.xpath/pom.xml
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building org.eclipse.e4.emf.xpath 0.1.100-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ org.eclipse.e4.emf.xpath ---
[INFO] Deleting /d1/e4/git-platform.ui/bundles/org.eclipse.e4.emf.xpath/target
[INFO] 
[INFO] --- tycho-packaging-plugin:0.23.0-SNAPSHOT:build-qualifier (default-build-qualifier) @ org.eclipse.e4.emf.xpath ---
[INFO] The project's OSGi version is 0.1.100.v20150402-1021
[INFO] 
[INFO] --- tycho-packaging-plugin:0.23.0-SNAPSHOT:validate-id (default-validate-id) @ org.eclipse.e4.emf.xpath ---
[INFO] 
[INFO] --- tycho-packaging-plugin:0.23.0-SNAPSHOT:validate-version (default-validate-version) @ org.eclipse.e4.emf.xpath ---
[INFO] 
[INFO] --- maven-resources-plugin:2.7:copy-resources (saveproperties) @ org.eclipse.e4.emf.xpath ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /d1/e4/git-platform.ui/bundles/org.eclipse.e4.emf.xpath/saveproperties
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ org.eclipse.e4.emf.xpath ---
[INFO] 
[INFO] --- eclipse-cbi-plugin:1.1.2-SNAPSHOT:generate-api-build-xml (default) @ org.eclipse.e4.emf.xpath ---
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ org.eclipse.e4.emf.xpath ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /d1/e4/git-platform.ui/bundles/org.eclipse.e4.emf.xpath/src/main/resources
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (filter-resources) @ org.eclipse.e4.emf.xpath ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /d1/e4/git-platform.ui/bundles/org.eclipse.e4.emf.xpath/src/main/resources
[INFO] 
[INFO] --- tycho-compiler-plugin:0.23.0-SNAPSHOT:compile (default-compile) @ org.eclipse.e4.emf.xpath ---
[INFO] Compiling 22 source files to /d1/e4/git-platform.ui/bundles/org.eclipse.e4.emf.xpath/target/classes
[INFO] 
[INFO] --- tycho-eclipserun-plugin:0.23.0-SNAPSHOT:eclipse-run (default) @ org.eclipse.e4.emf.xpath ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.181 s
[INFO] Finished at: 2015-05-04T16:31:11-05:00
[INFO] Final Memory: 38M/298M
[INFO] ————————————————————————————————————
$
$
$ javap -cp target/classes org.eclipse.e4.emf.internal.xpath.NullPointer >/dev/null
Warning: Binary file org.eclipse.e4.emf.internal.xpath.NullPointer contains org.apache.commons.jxpath.ri.model.beans.NullPointer
Comment 8 Brian de Alwis CLA 2015-05-04 16:50:12 EDT
Reassigning to releng as I don't see that we're doing anything to request the above.
Comment 9 David Williams CLA 2015-05-04 16:53:42 EDT
(In reply to Brian de Alwis from comment #7)
> Upping importance.  I can reproduce this doing a local build and examining
> the resulting class files.  I can't see why this is happening.
> 

In our eclipse-sdk-prereqs.target file, I see where we include them, along with this comment: 

      <!-- built but not delivered. See bug 422102 -->
      <unit id="org.apache.commons.jxpath" version="1.3.0.v200911051830"/>
      <unit id="org.apache.commons.jxpath.source" version="1.3.0.v200911051830"/>

So, I assume the comment is wrong now. (I wrote it years? ago, when it appeared we didn't need it, since was not ending up in any deliverables). 

Is is supposed to be a "compile time only" dependency? 

Is it, in turn, missing some pre-req?
Comment 10 David Williams CLA 2015-05-04 16:56:39 EDT
(In reply to David Williams from comment #9)
> (In reply to Brian de Alwis from comment #7)
> > Upping importance.  I can reproduce this doing a local build and examining
> > the resulting class files.  I can't see why this is happening.
> > 
> 
> In our eclipse-sdk-prereqs.target file, I see where we include them, along
> with this comment: 
> 
>       <!-- built but not delivered. See bug 422102 -->
>       <unit id="org.apache.commons.jxpath" version="1.3.0.v200911051830"/>
>       <unit id="org.apache.commons.jxpath.source"
> version="1.3.0.v200911051830"/>
> 
> So, I assume the comment is wrong now. (I wrote it years? ago, when it
> appeared we didn't need it, since was not ending up in any deliverables). 
> 
> Is is supposed to be a "compile time only" dependency? 
> 
> Is it, in turn, missing some pre-req?

It is explicitly required by 
feature.xml - org.eclipse.e4.rcp
MANIFEST.MF - org.eclipse.e4.emf.xpath.test/META-INF
MANIFEST.MF - org.eclipse.e4.emf.xpath/META-INF
Comment 11 David Williams CLA 2015-05-04 16:57:55 EDT
(So, I don't think a "releng' bug ... though, releng might be needed to help you solve it ... but, you'll have to tell me more about intent, and desired outcome.)
Comment 12 Brian de Alwis CLA 2015-05-05 09:44:45 EDT
The bug isn't to do with setting up dependencies but that the .class files in the org.eclipse.e4.emf.xpath jar are bogus: they seem to be copies of the .class files from org.apache.commons.jxpath.

I'll try to narrow down the problem, but this is *really* strange.  The org.eclipse.e4.emf.xpath bundle is straightforward: I don't see any additional things there.
Comment 13 Brian de Alwis CLA 2015-05-05 11:25:13 EDT
Aha, discovered the problem: Tom committed a bunch of .class files under src.  Tom, there's no reason for these .class files, right?

bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/BeanAttributeIterator.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/BeanPointer.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/BeanPointerFactory.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/BeanPropertyPointer.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/CollectionAttributeNodeIterator.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/CollectionChildNodeIterator.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/CollectionNodeIterator.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/CollectionPointer.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/CollectionPointerFactory.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/LangAttributePointer.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/NullElementPointer.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/NullPointer.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/NullPropertyPointer.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/PropertyIterator.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/PropertyOwnerPointer.class
bundles/org.eclipse.e4.emf.xpath/src/org/eclipse/e4/emf/internal/xpath/PropertyPointer.class
Comment 14 Andrey Loskutov CLA 2015-05-05 14:48:29 EDT
(In reply to Brian de Alwis from comment #13)
> Aha, discovered the problem: Tom committed a bunch of .class files under
> src.

Wow, cool! Those classes are definitely the problem. There are two tests failing in official build with same issue: testXPathModelProcessor and testModelProcessor, see http://download.eclipse.org/eclipse/downloads/drops4/I20150504-2000/testResults.php.

Will you push a review or should I? I can do it just now.
Comment 15 Eclipse Genie CLA 2015-05-05 14:53:56 EDT
New Gerrit change created: https://git.eclipse.org/r/47207
Comment 16 Lars Vogel CLA 2015-05-05 14:55:34 EDT
(In reply to Eclipse Genie from comment #15)
> New Gerrit change created: https://git.eclipse.org/r/47207

+1
Comment 18 Lars Vogel CLA 2015-05-05 16:04:54 EDT
(In reply to Andrey Loskutov from comment #14)
> (In reply to Brian de Alwis from comment #13)
> > Aha, discovered the problem: Tom committed a bunch of .class files under
> > src.
> 
> Wow, cool! Those classes are definitely the problem. There are two tests
> failing in official build with same issue: testXPathModelProcessor and
> testModelProcessor, see
> http://download.eclipse.org/eclipse/downloads/drops4/I20150504-2000/
> testResults.php.

Bug 465818 should therefore also be closed with the change from this bug.
Comment 20 Steven Spungin CLA 2015-05-06 14:24:33 EDT
Brian, can you share what led you to uncover this?  Thanks!
Comment 21 Brian de Alwis CLA 2015-05-06 16:00:04 EDT
I'm not sure exactly.  I was trying to narrow down the problem: whether it was Tycho, CBI, or something else entirely.  So copied out the project and configured a simple parent pom to build against the 4.5 I builds using different versions of Tycho.  Since the jar still had invalid class files, I knew there was something else going on.  For some reason I searched for *.class and noticed the ones under src/, but I cannot remember why I was going down this route.