ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Burdairon <t.burdai...@gmail.com>
Subject Re: Problems with telnet task during an ant migration
Date Mon, 19 Apr 2010 09:13:46 GMT
Maybe it was the wrong mailing list. Should I send a mail to the dev mailing
list or file a bug directly?

2010/4/15 Thomas Burdairon <t.burdairon@gmail.com>

> We are in a migration from ant 1.6.2 to 1.8.0 and are encountering troubles
> using telnet task :
>
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <project name="testtelnet" default="compile" basedir=".">
>
> <target name="telnet">
>     <telnet userid="XXX" password="YYY" server="ZZZ">
>        <read>></read>
>        <write>ls</write>
>        <read string="/home/bob"/>
>     </telnet>
> </target>
> </project>
>
> throws an OOM
>
> Distant server is Sun OS 5.8 (Solaris 8)
>
> This simple script is OK with 1.6.2, but not with 1.8.0 :
>
> java.lang.OutOfMemoryError: Java heap space
>
>      [java] 	at java.util.Arrays.copyOf(Arrays.java:2882)
>      [java] 	at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
>      [java] 	at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:572)
>
>
>
>      [java] 	at java.lang.StringBuffer.append(StringBuffer.java:320)
>      [java] 	at org.apache.tools.ant.taskdefs.optional.net.TelnetTask$AntTelnetClient.waitForString(TelnetTask.java:347)
>      [java] 	at org.apache.tools.ant.taskdefs.optional.net.TelnetTask$AntTelnetClient.waitForString(TelnetTask.java:330)
>
>
>
>      [java] 	at org.apache.tools.ant.taskdefs.optional.net.TelnetTask.login(TelnetTask.java:140)
>      [java] 	at org.apache.tools.ant.taskdefs.optional.net.TelnetTask.execute(TelnetTask.java:109)
>
>
>
> We replaced TelnetTask with the old one from 1.6.2 as a workaround.
> After a quick look to the source, it seems that the change
> http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/net/TelnetTask.java?r1=677886&r2=677887&is
wrong, especially the replacement of a String.indexOf by a
> String.substring
>
>
> Greetings
>
> Tom
>
>


-- 
Thomas Burdairon
t.burdairon@gmail.com
06 74 43 02 31

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message