This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 58605 - running JHIndexer twice produces tons of ant-log(22MB) with exceptions
Summary: running JHIndexer twice produces tons of ant-log(22MB) with exceptions
Status: RESOLVED WONTFIX
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: nbbuild-issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-05 10:20 UTC by santhosh
Modified: 2005-09-05 10:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ant file to reproduce bug (6.92 KB, application/octet-stream)
2005-05-05 16:30 UTC, santhosh
Details

Note You need to log in before you can comment on or make changes to this bug.
Description santhosh 2005-05-05 10:20:54 UTC
running JHIndexer target twice(ofcourse on different helpsets) in same jvm
produces lots of exceptions and the ant log nearly becomes around 22MB;

this is already filed in suns issuzilla (is still in progress)
see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4456380
there are some workarounds mentioned in the above bug...
Comment 1 Jesse Glick 2005-05-05 16:10:11 UTC
Works fine for the NB build - we have a number of modules with helpsets and you
can build them in one Ant command. If you have a problem you must provide
complete steps to reproduce from scratch.
Comment 2 santhosh 2005-05-05 16:30:18 UTC
Created attachment 22003 [details]
ant file to reproduce bug
Comment 3 santhosh 2005-05-05 16:31:15 UTC
doesn't work for me.
i attached a zip file to reprocue this:
extract to $netbeans-src directory and run the build file
Comment 4 Jesse Glick 2005-05-05 18:23:23 UTC
Your sample works fine for me, under JDK 1.4, 1.5, and 1.6, with Ant 1.6.2 on Linux:

Issue_58605$ ant
Buildfile: build.xml

reproduce:
Created dir: /space/src/nb_all/Issue_58605/JavaHelpSearch2
Running JavaHelp search database indexer...
Deleting directory /space/src/nb_all/Issue_58605/JavaHelpSearch2
Created dir: /space/src/nb_all/Issue_58605/JavaHelpSearch2
Running JavaHelp search database indexer...

BUILD SUCCESSFUL
Total time: 3 seconds

You will probably need to track this down for yourself, since no one else seems
to be affected; and if you find something wrong in sources for nbantext.jar, the
JRE, or JavaHelp, submit a patch to the appropriate owner with an explanation
and a test case.
Comment 5 santhosh 2005-05-05 21:20:44 UTC
i am using jhall-2.0_01.jar

when i switched to jhall-2.0_02.jar it is working fine...

it might be bug in jhall-2.0_01.jar

Comment 6 Jesse Glick 2005-05-05 22:08:48 UTC
OK.
Comment 7 santhosh 2005-05-06 10:30:58 UTC
i am able to reproduce this again ....

copy jhall-2.0_02.jar to $ant_home/lib folder 
and run ant in $netbeans-src/Issue_58605

it was working for you, beacause ant was creating new class loader every time in
you case.

if you copy jhall-2.0_02.jar to $ant_home/lib then muliple instances of same
classes are created and thus this issue gets reproduced...
Comment 8 Jesse Glick 2005-05-06 16:40:58 UTC
Well don't do that then! It is bad style anyway to copy libs to JRE/lib/ext,
JRE/lib/endorsed, or $ant.home/lib. Use <classpath> with <taskdef>.
Comment 9 santhosh 2005-05-07 09:39:02 UTC
> It is bad style anyway to copy libs to JRE/lib/ext,
> JRE/lib/endorsed, or $ant.home/lib. Use <classpath> with <taskdef>.

i know that. we are using xdoclet heavily on multiple large projects.
our ant builds are running into outofmemory. on research i found that,
there is some memory leask in ant, when each module does <typedef>
for the same task. so we ended up coping those jars to ant/lib and
using new ant1.6 namespace feature antlib:com.fiorano.ant so that
we define a task only once.

one day i will come up with steps to reproduce this, without copying libraries
to ant/lib.
Comment 10 Jesse Glick 2005-05-07 17:56:14 UTC
Sometimes you can just define the task in one place and let subprojects reuse
it. We do this successfully in NB build scripts.

If you can figure out a way to reproduce that does not involve Ant, NB, or
anything besides JH and the JRE, I would encourage you to file a bug report on
java.sun.com.