Bug 152939 - Custom Ant build steps doesn't work.
Summary: Custom Ant build steps doesn't work.
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-07 03:38 EDT by Pavel Krupets CLA
Modified: 2019-09-06 15:37 EDT (History)
1 user (show)

See Also:


Attachments
my configuration (27.61 KB, application/octet-stream)
2006-08-07 03:39 EDT, Pavel Krupets CLA
no flags Details
log with some exceptions (2.45 KB, application/octet-stream)
2006-08-07 03:39 EDT, Pavel Krupets CLA
no flags Details
Log file (4.86 KB, text/plain)
2006-08-10 04:39 EDT, Pavel Krupets CLA
no flags Details
my new configuration (18.31 KB, application/octet-stream)
2006-08-15 04:05 EDT, Pavel Krupets CLA
no flags Details
new logs (3.93 KB, application/octet-stream)
2006-08-15 04:06 EDT, Pavel Krupets CLA
no flags Details
error message I've got when ant task is added to workspace with more than one project (9.55 KB, image/png)
2006-10-16 15:16 EDT, Pavel Krupets CLA
no flags Details
task main settings (27.88 KB, image/png)
2006-10-16 15:20 EDT, Pavel Krupets CLA
no flags Details
task properties settings (32.30 KB, image/png)
2006-10-16 15:20 EDT, Pavel Krupets CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Krupets CLA 2006-08-07 03:38:25 EDT
Hello,

I added custom build step to my project (it simply invokes rmic) and after serveral calls it crashes with (nothing in logs):

BUILD FAILED
java.lang.OutOfMemoryError: PermGen space

Eclipse 3.2

eclipse.ini:
-vmargs
-Xms256m
-Xmx768m

See attached files for logs and configuration details.
Comment 1 Pavel Krupets CLA 2006-08-07 03:39:08 EDT
Created attachment 47462 [details]
my configuration
Comment 2 Pavel Krupets CLA 2006-08-07 03:39:54 EDT
Created attachment 47463 [details]
log with some exceptions
Comment 3 Frederic Fusier CLA 2006-08-07 04:16:24 EDT
Log files only have exception about get javadoc on rt.jar which does not seem to be related with your current issue.
Your configuration shows that you have installed Web Tools plugins on top of eclipse => reassign to this component for further investigations on this OOM...
Comment 4 Jeffrey Liu CLA 2006-08-08 12:49:32 EDT
Pavel, did you try launching Eclipse with -XX:MaxPermSize=128m, does this workaround the OOM error?
Comment 5 Pavel Krupets CLA 2006-08-10 04:27:34 EDT
Seems to be working. But this parameter might only delay OOM exception. Need to test more thoroughly.

Once I had rmic task hanging (couldn't stop Eclipse had to kill it with task manager).
Comment 6 Pavel Krupets CLA 2006-08-10 04:39:06 EDT
Created attachment 47680 [details]
Log file

Had OOM and crash. With parameters you've sent me (see logs).
Comment 7 Jeffrey Liu CLA 2006-08-10 11:12:53 EDT
Hi Pavel, you said:

Once I had rmic task hanging (couldn't stop Eclipse had to kill it with task
manager).

Is this rmic task written by you? I don't recall a rmic task in the WTP project. If this is something that's written by you, does it load tons of classes and methods, if so, that may explain why you are getting the perm gen OOM error.

At this point, I do not believe this is a WTP bug unless we can reproduce the same issue just by invoking functions contributed by WTP.
Comment 8 Pavel Krupets CLA 2006-08-10 12:47:30 EDT
I am not sure either. I submited it as JDT bug (custom Ant task).
Comment 9 Pavel Krupets CLA 2006-08-15 04:05:25 EDT
Created attachment 47900 [details]
my new configuration

I removed most of the plugins and I still got this exception eventually. If I don't have custom ant build task everything is okay.
Comment 10 Pavel Krupets CLA 2006-08-15 04:06:26 EDT
Created attachment 47901 [details]
new logs

These are my new logs
Comment 11 Pavel Krupets CLA 2006-10-10 08:23:35 EDT
Still there in 3.2.1 :((((((
Comment 12 Pavel Krupets CLA 2006-10-16 03:22:11 EDT
Another problem is that ANT build step doesn't work in 50% of the time if I have two projects, one has ant build step and another doesn't and latter depends on first one.
Comment 13 Pavel Krupets CLA 2006-10-16 15:16:05 EDT
Created attachment 52063 [details]
error message I've got when ant task is added to workspace with more than one project
Comment 14 Pavel Krupets CLA 2006-10-16 15:17:02 EDT
ant file text:

<project default="rmic" basedir=".">
  <target name="rmic">
    <path id="classpath">
      <fileset dir="${basedir}/libs" includes="**/*.jar" />
      <fileset dir="${basedir}/libs-ant" includes="**/*.jar" />
    </path>
    
    <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="classpath" />
    
	<patternset id="rmic.files">
      <include name="**/*RMI.*" />
	</patternset>
    
    <uptodate property="rmiBuild.notRequired">
      <srcfiles dir="${targetDir}">
        <patternset refid="rmic.files" />
      </srcfiles>
      <mapper type="regexp" from="(.*)(.class)" to="\1_Stub.class" />
    </uptodate>
    
    <if>
      <not>
        <isset property="rmiBuild.notRequired" />
      </not>
      <then>
	    <rmic base="${targetDir}">
          <patternset refid="rmic.files" />
    	</rmic>
      </then>
    </if>
  </target>
</project>
Comment 15 Pavel Krupets CLA 2006-10-16 15:20:03 EDT
Created attachment 52065 [details]
task main settings
Comment 16 Pavel Krupets CLA 2006-10-16 15:20:44 EDT
Created attachment 52066 [details]
task properties settings
Comment 17 Pavel Krupets CLA 2006-10-16 15:21:42 EDT
I attched 2 screen shots with ant builder settings
Comment 18 Pavel Krupets CLA 2006-11-05 08:39:55 EST
Once in a while I got the following error during clean-build process.

!ENTRY org.eclipse.ui 4 0 2006-11-05 16:38:44.984
!MESSAGE Build problems
!SUBENTRY 1 org.eclipse.core.resources 4 75 2006-11-05 16:38:44.984
!MESSAGE Errors during build.
!SUBENTRY 2 org.eclipse.ui.externaltools 2 75 2006-11-05 16:38:44.984
!MESSAGE Errors running builder "Integrated External Tool Builder" on project commons.
!SUBENTRY 2 org.eclipse.ui.externaltools 4 0 2006-11-05 16:38:44.984
!MESSAGE The file does not exist for the external tool named RMIC.
!SESSION 2006-11-05 16:38:56.937 -----------------------------------------------
eclipse.buildId=M20060921-0945
java.version=1.6.0-rc
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.core.resources 4 2 2006-11-05 16:41:34.421
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 1
org.eclipse.core.runtime.CoreException: The file does not exist for the external tool named RMIC.
	at org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil.abort(ExternalToolsUtil.java:49)
	at org.eclipse.ui.externaltools.internal.launchConfigurations.ExternalToolsUtil.getLocation(ExternalToolsUtil.java:80)
	at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate.launch(AntLaunchDelegate.java:122)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:639)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:565)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:558)
	at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.launchBuild(ExternalToolBuilder.java:177)
	at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.doBuildBasedOnScope(ExternalToolBuilder.java:165)
	at org.eclipse.ui.externaltools.internal.model.ExternalToolBuilder.build(ExternalToolBuilder.java:84)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:603)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:167)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:230)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:233)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:252)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:285)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:145)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:208)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
!SUBENTRY 1 org.eclipse.ui.externaltools 4 0 2006-11-05 16:41:34.421
!MESSAGE The file does not exist for the external tool named RMIC.
!SUBENTRY 1 org.eclipse.ui.externaltools 4 0 2006-11-05 16:41:34.421
!MESSAGE The file does not exist for the external tool named RMIC.

!ENTRY org.eclipse.core.resources 4 75 2006-11-05 16:41:41.156
!MESSAGE Errors during build.
!SUBENTRY 1 org.eclipse.ui.externaltools 2 75 2006-11-05 16:41:41.156
!MESSAGE Errors running builder "Integrated External Tool Builder" on project commons.
!SUBENTRY 1 org.eclipse.ui.externaltools 4 0 2006-11-05 16:41:41.156
!MESSAGE The file does not exist for the external tool named RMIC.
Comment 19 Martin Aeschlimann CLA 2007-01-19 04:01:32 EST
setting product to ANT
Comment 20 Barry Bai CLA 2008-07-06 10:42:53 EDT
follow with interest
Comment 21 Eclipse Webmaster CLA 2019-09-06 15:37:33 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.