Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 104185 - Build fails with "Error starting modern compiler"
Build fails with "Error starting modern compiler"
Status: CLOSED FIXED
Product: www
Classification: Unclassified
Component: Builds & Repositories
6.x
PC Linux
: P2 (vote)
: TBD
Assigned To: Tim Lebedkov
nbbuild-issues@ide
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-17 15:35 UTC by Tim Lebedkov
Modified: 2007-07-16 13:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lebedkov 2007-05-17 15:35:30 UTC
Linux timpc2 2.6.20-15-386 #2 Sun Apr 15 07:34:00 UTC 2007 i686 GNU/Linux

java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

Apache Ant version 1.7.0 compiled on December 13 2006

compile:
   [depend] Deleted 115 out of date files in 1 seconds
    [javac] Compiling 41 source files to
/home/tim/projects/netbeans/trunk/core/startup/build/classes
   [repeat]
  [nbmerge] Failed to build target: all-core/startup

BUILD FAILED
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:645: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:640: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:679: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:661: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:640: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:679: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:661: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:640: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:679: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:661: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:640: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:679: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:661: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:640: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:690: The following error
occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/templates/common.xml:94: Error
starting modern compiler

Total time: 1 minute 10 seconds
Comment 1 Jesse Glick 2007-05-19 02:33:22 UTC
Never heard of such a thing, no steps to reproduce. BTW use -v (or -d) to get
better error messages from Ant.
Comment 2 rbalada 2007-05-28 12:22:04 UTC
Tim,

we need steps to reproduce, thus reassigning back to you. Also please make sure
your tools.jar has not been corrupted/modified since installation i.e. make sure
your tools.jar has got class com/sun/tools/javac/parser/Scanner

You can test it i.e. by attempting to unjar com/sun/tools/javac from the jarfile.

unjar -xf tools.jar com/sun/tools/javac

Comment 3 rbalada 2007-05-31 22:02:46 UTC
Tim,

we got another hint. Can you set variable ANT_OPTS to increase JVM memory to 512
MB and then try to reproduce this build issue?

ANT_OPTS=-Xmx512m

It looks like 200m (or default) is not enough.
Comment 4 Tim Lebedkov 2007-06-30 23:28:19 UTC
I get OOM with 512M:

                                                                                                                       
                                                                                   ^
    [javac]
/home/tim/projects/netbeans/trunk/uml/core/src/org/netbeans/modules/uml/core/typemanagement/ITypeManager.java:166:
warning: unmappable character for encoding UTF-8
    [javac]      * Retrieves the element with the passed in name by searching the Project's list of referenced
libraries. If more than one element has the name, the first one found is returned. filter should be white-space
delimited list of typenames, such as 'Class Interface St?�?
    [javac]                                                                                                            
                                                                                                                       
                                            ^
    [javac]
    [javac]
    [javac] The system is out of resources.
    [javac] Consult the following stack trace for details.
    [javac] java.lang.OutOfMemoryError: Java heap space
  [nbmerge] Failed to build target: all-uml/core

BUILD FAILED
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:653: The following error occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:648: The following error occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/build.xml:698: The following error occurred while executing this line:
/home/tim/projects/netbeans/trunk/nbbuild/templates/common.xml:92: Compile failed; see the compiler error output for
details.

Total time: 19 minutes 48 seconds
Comment 5 rbalada 2007-07-04 13:34:19 UTC
Tim,

first of all, current (icomplete) evidence makes me think your Java&Ant environment has (very likely) been corrupted
(not necessarily by you personaly). Unfortunately provided information is still not enough to proceed with any
investigation, thus I re-set the INCOMPLETE keyword. I've also haven't seen this issue on other platforms, so I've set
Platform-OS to PC-Linux.

If you find absolutely no differences between outputs of commands #1, #2 and #3 resp. #4, #5 and #6, then your java and
ant environment has been properly configured and we really need you to provide us information from at least step #8
(debug log) - providing this debug log would make you eligible to clean the INCOMPLETE keyword. However we would
appreciate the verbose log (#7) too. These two logs contain more detailed information about paths, what java binary is
being executed, what has been put on compilation classpath etc. Please attach complete logfiles, zip them up if
necessary (i.e. due to size).


Please provide us with output of following commands:

#1 java -version

#2 ${JAVA_HOME}/bin/java -version
(I know the above command may sound redundant&stupid, but please do it. See "BTW" comment at bottom)

#3 `which java` -version
(I know the above command may sound redundant&stupid, but please do it. See "BTW" comment at bottom)

#4 ant -version

#5 ${ANT_HOME}/bin/ant -version
(I know the above command may sound redundant&stupid, but please do it. See "BTW" comment at bottom)

#6 `which ant` -version
(I know the above command may sound redundant&stupid, but please do it. See "BTW" comment at bottom)

#7 attach a logfile /home/tim/projects/netbeans/trunk/nbbuild/build_verbose.log which would have been created by commands

$ cd /home/tim/projects/netbeans/trunk/nbbuild
$ ant -v -l build_verbose.log

#8 attach a logfile /home/tim/projects/netbeans/trunk/nbbuild/build_debug.log which would have been created by commands

$ cd /home/tim/projects/netbeans/trunk/nbbuild
$ ant -d -l build_debug.log

#9 uname -a


BTW: I assume you run on Ubuntu. My personal experience with Feisty Fawn is that I had to do some hacks to avoid bash
completion mapping of Ant and Java (because as a build engineer I have to be able to use several different version of
Ant and JDK at the same time when working on projects of different age - from old sustaining to cutting edge). The
command 'which java' can point you to a 'java' binary, which is actually never executed when you invoke 'java' in bash
shell prompt. That's because bash' completion takes java's binary from 'known' location (based on package management
information) and completely ignores ${JAVA_HOME}, ${JDK_HOME} and ${PATH} environment variables. This is causing
possibly significant difference between outputs of commands 'java -version' ; '${JAVA_HOME}/bin/java -version' ; '`which
java` -version'. I hope this clarifies the need for redundancy between steps #1,#2 and #3 resp. #4,#5 and #6.

If you will have found differences in outputs of commands #1,#2 and #3 resp. #4,#5 and #6, then my personal suggestion
is to comment-out sourcing of file /etc/bash_completion in /etc/bash.bashrc file and open new terminal. This may lead to
a loss of all default Ubuntu completions, which is actually a price I'm willing to pay (and am too lazy to fix it properly).

Absolutely off-topic: Did you consider running on generic kernel instead of the 386? The 386 kernel does not seem to
utilize both CPU cores of Intel Core 2 Duo T7200 processor in my Toshiba Tecra M5. See /proc/cpuinfo file for CPU details.
Comment 6 Tim Lebedkov 2007-07-06 23:03:33 UTC
I have deinstalled ant-1.6.5 package, defined JAVA_HOME and ANT_HOME and the build succeeded. Thank you for help.
I also changed to generic kernel. It seems NB only is able to use one core.
I thought Java would do it better.
Maybe I should file an issue for this :-)
Comment 7 Tim Lebedkov 2007-07-06 23:04:01 UTC
ok
Comment 8 Jesse Glick 2007-07-10 01:04:58 UTC
Off-topic but maybe of interest: I have a Tecra M5 with Ubuntu's stock kernel and have personally confirmed that Java
uses both cores.
Comment 9 rbalada 2007-07-16 13:07:15 UTC
Closing.

Off-topic: I confirm Jesse's sighting. Heavy load Java processes reported by 'top' seem to utilize more than 100% of CPU
on my Tecra M5 running Ubuntu 7.04 with stock generic kernel and JDK 1.5.0 Update 11. 
However I do not know values for i.e. during NB start up neither generally at NB run time (am not using NB 6 regularly).


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo