Hello Quickbuild support
I'm trying to use Groovy script to retrieve a specific build in history, to access the variables of that build.
And I don't see an easy method from "configuration" object to do this, so I use configuration.getBuilds()
and then try to identify the build I want. However, to access the collection of builds, it gives me this error
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.pmease.quickbuild.model.Configuration.builds, could not initialize proxy - no Session
at org.hibernate.collection.internal.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:576)
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:215)
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:555)
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:143)
at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:294)
at sun.reflect.GeneratedMethodAccessor28156.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at...
My groovy code is just a few lines right now:
groovy:
def all_builds = configuration.getBuilds() as List
all_builds.each(){
logger.warn(it.getVersion())
}
Could you help me? Thank you very much
- solved #2
- replies 3
- views 3297
- stars 0