[JBoss jBPM] - LazyInitializationException
by ricardomarques
Hi guys, while getting the comments for a task instance using the command interface, i'm having this exception:
| 12:19:00,265 ERROR [LazyInitializationException] failed to lazily initialize a collection of role: org.jbpm.taskmgmt.exe.TaskInstance.comments, no session or session was closed
| org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.jbpm.taskmgmt.exe.TaskInstance.comments, no session or session was closed
| at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
| at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
| at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97)
| at org.hibernate.collection.PersistentList.size(PersistentList.java:91)
| at com.pep.workflow.console.beans.Task.fetchComments(Task.java:189)
| at com.pep.workflow.console.beans.Task.initialize(Task.java:240)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
| at javax.faces.component.UICommand.broadcast(UICommand.java:106)
| at javax.faces.component.UIData.broadcast(UIData.java:513)
| at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
|
|
I've have read some other post's regarding this issue but still have some question, i'm complitely newbie in hibernate, and I trying to figure out the best way to solve this.
I'm wandering if the best approach is to write my hibernate query?
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055170#4055170
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055170
18Â years, 10Â months
[JBoss Seam] - Seam namespaces.
by Phantom
Please help me! I don't have much time and resources for experiment and in documentation I didn't find the answer to my question...
In components.xml we can define XML namespaces in the header. Is it correct, that Jboss Seam looking for components only in this namespaces?
My problem is: I have several subprojects on my Jboss AS instance. In each subproject I have separate WAR and, for example, such Entity component as "user". Can I use namespaces for components division to separate projects? Now I should make some differences in names, for example: in first project user components called as "pr1user", in second "pr2user" and so on.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055167#4055167
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055167
18Â years, 10Â months
[Beginners Corner] - Context an Deployment of uncompiled apps (only dir)
by Schludi
Hello!
I am trying to deploy an old Tomcat application to JBoss and have some problems.
The first problem is, that i have no archives but an directory which needs to be copied. That leads to a hot deployment error - is the /deploy dir only accepting compiled archives?
The second problem is, that i have to set the context like it was in Tomcat. How can i do like this: (the file was in conf/catalina):
<?xml version='1.0' encoding='utf-8'?>
| <Context docBase="D:\dev\workspace\FAQ-DB-Backend\target\bbraun-faq-db-backend" path="/faqdb" workDir="work\Catalina\localhost\faqdb" reloadable="true">
| <Resource name="jdbc/FAQ_DB" type="javax.sql.DataSource"/>
| <ResourceParams name="jdbc/FAQ_DB">
| <parameter>
| <name>username</name>
| <value>user</value>
| </parameter>
| <parameter>
| <name>password</name>
| <value>pass</value>
| </parameter>
| <parameter>
| <name>url</name>
| <value>jdbc:microsoft:sqlserver://localhost:1433;SelectMethod=cursor</value>
| </parameter>
| <parameter>
| <name>driverClassName</name>
| <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
| </parameter>
| <parameter>
| <name>maxWait</name>
| <value>5000</value>
| </parameter>
| <parameter>
| <name>maxActive</name>
| <value>4</value>
| </parameter>
| <parameter>
| <name>maxIdle</name>
| <value>2</value>
| </parameter>
| </ResourceParams>
| </Context>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055166#4055166
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055166
18Â years, 10Â months