Beanshell Console crashes / freezes on large script
Author: f_koenig
Publication Date: 11/25/2022 10:49
Hey there,
is there any known limit for a beanshell script executed via Beanshell console?
I'm currently developing a large script for migrating data inside a project. When the script gets too large both the Beanshell console window and the Sitearchitect window freeze. I have to kill the process via the task manager to close the windows.
Is this a known problem? Has anybody an idea how to mitigate this problem?
Thanks.
Best regards
Fabian
-
Author: Hendrik - 11/25/2022 14:11
Hi,
my first thought was that you might want to reconsider your chosen approach of implementing the migration, as you already stated out might the beanshell not the ideal approch to perform computationally intensive actions due to memory consumption and threading (Swing EDT). I would use an executable class in an schedule task on the server which also allows remote debugging via an IDE of your choice..
Just my two cents
Br, Hendrik0 -
Author: bIT_sosswald - 11/25/2022 15:06
Hi Fabian,
i agree with .
Personally i would never use the BeanShell console for more then single line commands or something else.
I like to use a small Spring Boot application which connects to the FirstSpirit Server using the isolated-runtime-jar. This way I have the full power of Java and Spring Boot and do not have to deal with module installations etc.
I have done a lot of migration stuff inside of FirstSpirit using this approach.
Greetings
Sandro0 -
Author: hoebbel - 12/6/2022 13:04
Hello Fabian,
In addition to what my predecessors have said (and what they are right about, of course)
It is a known problem that the beanshell console has problems with executing very many lines at once. The problem can be circumvented by executing only a few lines (about 4 lines) at a time or by simply using a script instead of the Beanshell console. By using the visibility settings there you can make sure that it is only executed by a certain group or a single user if the project is used by multiple users.Note: The console is only intended for trying something out quickly. But not for developing scripts
Best regards
Holger0
Please sign in to leave a comment.
Comments
3 comments