crash on automated script step parameter replacement

Bug #1040672 reported by Ralf Claussnitzer on 2012-08-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Status tracked in 1.10
Henning Gerhardt

Bug Description

When using automated script steps one can use a set of dynamic parameters to pass process parameters to external programs. An automated script call can look like this: /usr/local/bin/ {<selector>.<property>}. Three variable sources can be selected by a <selector>. Within this variable source any property named <property> will be resolved. After resolving all variable templates the script /usr/local/bin/ is finally called.

By looking at the source code, three selectors are available:
1- template Referring to a processes template
2- process Referring to the process itself
3- product Referring to product description

Unfortunately, the variable resolving mechanism is bound to a hibernate session which seem to have disappeared at time of the resolving. The application crashes on execution of the defined step:

ERROR 2012-08-22 14:54:20,413 (<init>:42)
        failed to lazily initialize a collection of role: de.sub.goobi.beans.Prozess.vorlagen, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: de.sub.goobi.beans.Prozess.vorlagen, no session or session was closed
        at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(
        at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(
        at org.hibernate.collection.AbstractPersistentCollection.initialize(
        at org.hibernate.collection.PersistentSet.toArray(
        at java.util.ArrayList.<init>(
        at de.sub.goobi.beans.Prozess.getVorlagenList(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(
        at de.sub.goobi.beans.Prozess_$$_javassist_7.getVorlagenList(Prozess_$$
        at de.sub.goobi.helper.VariableReplacer.replace(
        at de.sub.goobi.helper.HelperSchritte.executeScript(
        at de.sub.goobi.helper.HelperSchritte.executeAllScripts(

Related branches

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers