Bonjour à tous,
J’essaie de récuperer un atelier depuis ScenariBatch sur un scenari 6. Je l’ai fait déjà depuis 1 ou 2 ans sans problème, mais sur la nouvelle version je n’y arrive pas. J’obtiens un java.lang.OutOfMemoryError: Java heap space
Voici le message d’erreur dans sa totalité.
Buildfile: /tmp/tmp9mefefw8.xml
main:
wsp.export:
[http] HTTP Request
[http] ********************
[http] URL: https://XXXXX/~~chain/web/u/export?mode=wspTree¶m=001K1OS4EMIp8Q2OFLknuf&scope=node&format=jar&refUris
[http] Method: GET
BUILD FAILED
/tmp/tmp9mefefw8.xml:15: The following error occurred while executing this line:
XXXX/ScenariBatch/lib/chain.transfer.ant:98: org.missinglink.http.exception.HttpInvocationException: java.lang.OutOfMemoryError: Java heap space
at org.missinglink.http.client.HttpClient.invoke(HttpClient.java:433)
at org.missinglink.ant.task.http.HttpClientTask.execute(HttpClientTask.java:332)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
at org.apache.tools.ant.Main.runBuild(Main.java:818)
at org.apache.tools.ant.Main.startAnt(Main.java:223)
at org.apache.tools.ant.Main.start(Main.java:190)
at org.apache.tools.ant.Main.main(Main.java:274)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.Arrays.copyOf(Arrays.java:3745)
at java.base/java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:120)
at java.base/java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:95)
at java.base/java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:156)
at java.base/java.io.OutputStream.write(OutputStream.java:122)
at org.missinglink.tools.StreamUtils.inputStreamToByteArrayOutputStream(StreamUtils.java:300)
at org.missinglink.tools.StreamUtils.inputStreamToByteArray(StreamUtils.java:273)
at org.missinglink.http.client.HttpClient.invoke(HttpClient.java:399)
at org.missinglink.ant.task.http.HttpClientTask.execute(HttpClientTask.java:332)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:437)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:299)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
Fichier de batch :
<taskdef name="scServer" classname="com.scenari.scant.batch.ScServerTask"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/>
<taskdef name="http" classname="org.missinglink.ant.task.http.HttpClientTask"/>
<property name="tmp.dir" location="XXXXXXX"/>
<property name="lib.dir" location="XXXXXXX"/>
<target name="main">
<ant antfile="${lib.dir}/chain.transfer.ant" target="wsp.export">
<property name="p.export.dir" value="XXXXXXX"/>
<property name="p.webapp.url" value="XXXXXXX"/>
<property name="p.wsp.id" value="XXXXXXX"/>
<property name="p.user" value="XXXXXXX"/>
<property name="p.password" value="XXXXXXX"/>
<property name="p.temp.dir" location="XXXXXXX"/>
</ant>
</target>
</project>
Solutions tentées:
- Ajouter une propriété dans le batch
<property name="javac.max.memory" value="2048M" />
- Ajouter de la mémoire avec le parametre -Xmx dans la commande java du scBatch.sh (dernière ligne)
- ajouter la variable d’environnement
ANT_OPTS=-Xmx1g
- Côté serveur, même chose en ajoutant 1Go de mémoire (-Xmx et -Xms)
Rien y fait j’ai toujours la même erreur de mémoire. Avec la meme configuration sur un serveur et un client en 5 je n’ai pas ce problème. Je suis un peu perdu, qu’en dites-vous ?
Merci !