Hi,
before looking into what is the cause of the OutOfMemory Exception, maybe you
should try to use a BeanShell service where you define your jar as dependency
and then you do an API call.
See here:
http://dev.mygrid.org.uk/wiki/display/taverna/Beanshell
Drop your Programm.jar in the Taverna 'lib' directory and declare the
dependency in the Beanshell.
Then you can create objects and invoke methods from classes of the jar within
your BeanShell.
Generally, if you have a plain java application, it should not be necessary to
invoke an external command using Runtime.exec().
If you want to stick to your approach, consider ProcessBuilder:
http://www.java-tips.org/java-se-tips/java.util/from-runtime.exec-to-processbuilder.html
Best,
Sven
-----Original message-----
From:stylz2k <[email protected]>
Sent:Mon 25-11-2013 21:04
Subject:[Taverna-users] Use Beanshell to launch external .jar outofmemoryError
To:[email protected];
Hi everyone,
I'm trying to create a workflow for processing data from next generation
sequencing data. So i have big files.
Input ~ 15 GB.
Basically I'm trying to use a beanshell script that looks like the following:
String command = "java -Xms256m -Xmx512m -jar /path/to/Programm.jar"; Process
proc = null; Runtime rt = Runtime.getRuntime(); proc = rt.exec(command +
input1 + input2 + input3 + output); int exitVal =
proc.waitFor(); When running the workflow I get the following error:
java.lang.OutOfMemoryError: Requested array size exceeds VM limit My linux
machine has 16 gb of memory and I have already tried to give taverna more
memory at the start. On gnome-terminal the command runs without any errors.
Are there any suggestions? I'm really thankful for any help on this topic.
Best Regards, Julian
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
taverna-users mailing list
[email protected]
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/