Bug 458925 - java.lang.NullPointerException in CompilationUnit.java:71 of org.eclipse.jdt.internal.compiler.batch.CompilationUnit.getContents
Summary: java.lang.NullPointerException in CompilationUnit.java:71 of org.eclipse.jdt....
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse
Version: 10
Hardware: ppc64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Andrew Overholt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-13 08:33 UTC by Caolan McNamara
Modified: 2009-10-27 16:17 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-10-27 16:17:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Caolan McNamara 2008-08-13 08:33:29 UTC
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 08:53:41 UTC
Is this with IcedTea or GCJ?

Comment 2 Caolan McNamara 2008-08-13 09:20:53 UTC
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 09:38:40 UTC
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 13:39:29 UTC
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 13:40:18 UTC
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 14:07:22 UTC
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 14:16:58 UTC
(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 14:42:26 UTC
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 14:43:35 UTC
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 20:46:20 UTC
(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 13:04:50 UTC
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 09:43:14 UTC
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-26 02:45:35 UTC
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 16:17:01 UTC
Closing.


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