Bug 458925 - java.lang.NullPointerException in CompilationUnit.java:71 of org.eclipse.jdt.internal.compiler.batch.CompilationUnit.getContents
java.lang.NullPointerException in CompilationUnit.java:71 of org.eclipse.jdt....
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: eclipse (Show other bugs)
10
ppc64 Linux
medium Severity medium
: ---
: ---
Assigned To: Andrew Overholt
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-13 04:33 EDT by Caolan McNamara
Modified: 2009-10-27 12:17 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-10-27 12:17:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Caolan McNamara 2008-08-13 04:33:29 EDT
Description of problem:
Building java components of OpenOffice.org fails on ppc64 :-(, it worked until very recently

Version-Release number of selected component (if applicable):
ecj-3.4.0-19.fc10

How reproducible:
every time in koji

Actual results:

from http://koji.fedoraproject.org/koji/getfile?taskID=774758&name=build.log

cd ../../unxlngppc64.pro/misc/build/libfonts/ && /usr/bin/ant -Dlibdir="../../../class" -Dbuild.label="build-300m2(Build:9343)" -f build.xml compile  && touch /builddir/build/BUILD/OOO300_m2/jfreereport/java/libfonts/../../unxlngppc64.pro/misc/build/so_built_libfonts
Buildfile: build.xml
initialise:
compile:
    [mkdir] Created dir: /builddir/build/BUILD/OOO300_m2/jfreereport/unxlngppc64.pro/misc/build/libfonts/build
    [mkdir] Created dir: /builddir/build/BUILD/OOO300_m2/jfreereport/unxlngppc64.pro/misc/build/libfonts/build/src
    [mkdir] Created dir: /builddir/build/BUILD/OOO300_m2/jfreereport/unxlngppc64.pro/misc/build/libfonts/build/bin
     [copy] Copying 138 files to /builddir/build/BUILD/OOO300_m2/jfreereport/unxlngppc64.pro/misc/build/libfonts/build/src
    [javac] Compiling 138 source files to /builddir/build/BUILD/OOO300_m2/jfreereport/unxlngppc64.pro/misc/build/libfonts/build/bin
    [javac] java.lang.NullPointerException
    [javac]    at org.eclipse.jdt.internal.compiler.batch.CompilationUnit.getContents(CompilationUnit.java:71)
    [javac]    at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:160)
    [javac]    at java.lang.Thread.run(libgcj.so.9)
    [javac] java.lang.NullPointerException
    [javac]    at org.eclipse.jdt.internal.compiler.batch.CompilationUnit.getContents(CompilationUnit.java:71)
    [javac]    at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:160)
    [javac]    at java.lang.Thread.run(libgcj.so.9)
    [javac]
BUILD FAILED
/builddir/build/BUILD/OOO300_m2/jfreereport/unxlngppc64.pro/misc/build/libfonts/build.xml:92: The following error occurred while executing this line:
/builddir/build/BUILD/OOO300_m2/jfreereport/unxlngppc64.pro/misc/build/libfonts/ant/build-lib.xml:507: Compile failed; see the compiler error output for details.
Total time: 1 second
Comment 1 Gary Benson 2008-08-13 04:53:41 EDT
Is this with IcedTea or GCJ?
Comment 2 Caolan McNamara 2008-08-13 05:20:53 EDT
A strangely tricky question to answer with just the buildlog :-) 

The buildrequires is for simply java-devel which brings in java-1.5.0-gcj-devel by default, these days of course ecj now has a new requires on java-1.6.0-openjdk so both java-1.5.0-gcj and java-1.6.0-openjdk are required to build with java-1.5.0-gcj-devel

That said, "java" is surely gij as the java.home is /usr/lib/jvm/java-1.5.0-gcj/... and "javac" has to be ecj
Comment 3 Gary Benson 2008-08-13 05:38:40 EDT
I'm going to assign this to the Eclipse guys then.  FWIW the ecj component in Bugzilla is historical and shouldn't be used any more (it dates back to FC3, when ecj was from a separate srpm).
Comment 4 Andrew Overholt 2008-08-13 09:39:29 EDT
The line giving the NPE is this:

return Util.getFileCharContent(new File(new String(this.fileName)), this.encoding);

So there are a number of things that could be null there.  Is there a smaller sub-set I can use to reproduce this?  Should I just try building OOo locally with rawhide ecj set as my javac alternative?
Comment 5 Andrew Overholt 2008-08-13 09:40:18 EDT
Oh, does this *only* happen on ppc64?  If so, I'll try to find a ppc64 machine on which to try this.
Comment 6 Caolan McNamara 2008-08-13 10:07:22 EDT
I think I saw it on ppc as well as ppc64 in another build, it doesn't happen on i386/x86_64 in koji. 

The obvious human-visible thing that has changed since it was last known to work is the #2 situation with java-1.5.0-gcj-devel requiring both java-1.5.0-gcj and java-1.6.0-openjdk through the java >= 1.6.0 require of eclipse-ecj
Comment 7 Andrew Overholt 2008-08-13 10:16:58 EDT
(In reply to comment #6)
> I think I saw it on ppc as well as ppc64 in another build, it doesn't happen on
> i386/x86_64 in koji. 

Okay, I'll set up something on a ppc64 box.

> The obvious human-visible thing that has changed since it was last known to
> work is the #2 situation with java-1.5.0-gcj-devel requiring both
> java-1.5.0-gcj and java-1.6.0-openjdk through the java >= 1.6.0 require of
> eclipse-ecj

Okay.  I doubt this is related.

So the best way to reproduce this is by 'make build' in openoffice.org/devel ?
Comment 8 Caolan McNamara 2008-08-13 10:42:26 EDT
I'm sure there's a better way, but unfortunately I don't have a ppc to boil it down :-( 

FWIW simply building the very similar libfonts standalone package with

koji build --scratch dist-f10 'cvs://cvs.fedoraproject.org/cvs/pkgs?rpms/libfonts/devel#libfons-0_3_4-1_fc10'

succeeds.
Comment 9 Andrew Overholt 2008-08-13 10:43:35 EDT
Could the package be zero bytes on ppc/ppc64?

https://bugzilla.redhat.com/show_bug.cgi?id=458817
Comment 10 Andrew Overholt 2008-08-13 16:46:20 EDT
(In reply to comment #9)
> Could the package be zero bytes on ppc/ppc64?
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=458817

Eclipse is in this list:

https://www.redhat.com/archives/fedora-devel-list/2008-August/msg00578.html
Comment 11 Andrew Overholt 2008-08-14 09:04:50 EDT
FWIW I tried a local ppc64 mock build of eclipse and it completed fine using ecj.

I'm a bit stumped here.  But it's obviously an actual issue as bug #458921 seems to be a similar issue.
Comment 12 Caolan McNamara 2008-08-27 05:43:14 EDT
My last attempt to build OOo in koji post-outage succeeded, so I believe that the problem has "gone away"
Comment 13 Bug Zapper 2008-11-25 21:45:35 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 14 Andrew Overholt 2009-10-27 12:17:01 EDT
Closing.

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