[jBPM Users] - Hibernate LazyInitializationException
by remiel512
Hello all,
I have a question in setting Hibernate/jBPM. When I use the api [HistoryTaskInstanceImpl.getHistoryTask], it throws an exception [LazyInitializationException] and shows [could not initialize proxy - no Session]. Anyone knows how to fix it? Really thanks a lot!
=== Environment ==============================
- jBPM Version : 4.1
- Database : oracle
- JDK : 1.6
- Container : which Java version are you using? use 'java -version' to find out
- Configuration : using jbpm.cfg.xml only importing files from the jbpm.jar
lib itself.
- Libraries : no
=== Process ==================================
<?xml version="1.0" encoding="UTF-8"?>
<task candidate-users="mike,peter" form="org/jbpm/examples/taskform/verify_request.ftl" g="96,54,178,52" name="verify_request">
=== API ===================================
past the relevant code snippet that you use to invoke jBPM
=== Stacktrace ==============================
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:498)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.gaia.jbpm.action.GetActiveNodeInfo.execute(GetActiveNodeInfo.java:56)
com.gaia.jbpm.action.GetActiveNodeInfo.doGet(GetActiveNodeInfo.java:33)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:86)
org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:140)
org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:190)
org.jbpm.pvm.internal.history.model.HistoryTaskImpl_$$_javassist_18.getId(HistoryTaskImpl_$$_javassist_18.java)
org.apache.jsp.st_005fview_jsp._jspService(st_005fview_jsp.java:162)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
com.gaia.jbpm.action.GetActiveNodeInfo.execute(GetActiveNodeInfo.java:56)
com.gaia.jbpm.action.GetActiveNodeInfo.doGet(GetActiveNodeInfo.java:33)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260972#4260972
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260972
16 years, 8 months
[JCA] - ClassNotFoundException when moving JCA adaptor from 4.2.3 ->
by pwnell
I have written a JCA adaptor some years ago on JCA 1.5, for JBoss 3.x. I later moved it to JBoss 4.x without problems. However when I tried to deploy it under JBoss 5.1.0 GA it fails. I managed to fix most of the issues but I cannot seem to get around this one:
| 17:06:26,781 ERROR [[/LogMon]] StandardWrapper.Throwable
| java.lang.NoClassDefFoundError: net/za/pwnconsulting/logmon/rar/cci/data/client/LogMessage
| at net.za.pwnconsulting.logmon.clientapi.LogMonClientAPIFactory.getCCILogMonAPI(LogMonClientAPIFactory.java:30)
| at net.za.pwnconsulting.javaconfig.core.LMS.(LMS.java:28)
| at net.za.pwnconsulting.javaconfig.core.BasicConfiguration.initConfig(BasicConfiguration.java:144)
| at net.za.pwnconsulting.javaconfig.core.AbstractConfiguration.init(AbstractConfiguration.java:189)
| at net.za.pwnconsulting.webmvc.config.WebConfiguration.(WebConfiguration.java:85)
| at net.za.pwnconsulting.webmvc.servlet.BootstrapServlet.initServlet(BootstrapServlet.java:75)
| at net.za.pwnconsulting.webmvc.servlet.AbstractBootstrapServlet.init(AbstractBootstrapServlet.java:105)
| at javax.servlet.GenericServlet.init(GenericServlet.java:212)
| at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
| at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:950)
| at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4122)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4421)
|
|
| Now the class in question (net/za/pwnconsulting/logmon/rar/cci/data/client/LogMessage) is deployed inside the LogMonJCA.rar file in the deploy directory. The code trying to access it resides in a LogMonConsole.ear package also in the deploy directory.
|
| Why would this work previously on JBoss 4.x and 3.x, but not in JBoss 5.x? Somewhere the classloader behaviour changed and is not loading classes from the RAR file.
|
| So either my deployment is incorrect, or I need to change the classloader behaviour in JBoss. When I bundled this class with the .ear file, I got another error where the InteractionSpec the client code sent via .execute() is not compatible with the InteractionSpec used in the RAR file. This makes sense as they are loaded by two different class loaders - hence even though they are binary compatible they are still distinct classes.
|
| Any help would be much appreciated.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260970#4260970
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260970
16 years, 8 months
[Getting Started Documentation] - Login exception with app-client in Duke's Bank
by cye_09
Hi,
The web client works fine, and the app-client launches properly. But if I try to use any button (view customer information, for example)- I get the following error:
| 13:36:03,636 ERROR [SecurityInterceptor] Error in Security Interceptor
| java.lang.SecurityException: Authentication exception, principal=null
| at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityContext(SecurityInterceptor.java:321)
| at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:243)
| at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
| at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterc
| eptor.java:156)
| at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterce
| ptor.java:348)
| at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
| at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
| at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
| at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
| at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:134)
|
| at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
| at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
| at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:
| 138)
| at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
| at org.jboss.ejb.Container.invoke(Container.java:1029)
| 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:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
| at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
| at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:551)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
|
|
I am guessing it's silent login failure during launch and only manifests itself when I try to use it. I am using Jboss 5.1 in windows vista. Thanks in advance.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260956#4260956
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260956
16 years, 8 months
[jBPM Users] - Re: sub process event propagation
by aapthorp
So my final (JBPM 3) solution for this requirement is as follows.
An actionhandler in the subprocess which propagates the event to the superprocess.
public void execute(ExecutionContext executionContext) throws Exception {
|
| if (eventType == null) {
| eventType = executionContext.getEvent().getEventType();
| }
| Token superToken = executionContext.getProcessInstance()
| .getSuperProcessToken();
| ExecutionContext superContext = new ExecutionContext(superToken);
| superToken.getProcessInstance().getProcessDefinition().fireEvent(eventType, superContext);
| }
and another action handler to handle the propogated event in the superprocess:
|
| String nodeName=null;
| String transitionName=null;
|
| public void execute(ExecutionContext executionContext) throws Exception {
|
| List tokenList = executionContext.getProcessInstance().findAllTokens();
| for (Iterator it = tokenList.iterator(); it.hasNext();) {
| Token token = (Token) it.next();
| if (token.getNode().getName().equals(nodeName)) {
| token.signal(transitionName);
| }
| }
| }
The propagated event can then be sent to a state that transitions to a join to control the main flow of the superprocess. I'm sure there are some other ways of getting the same effect but this seems to work quite well. I have also refined it further to consolidate events of the same type from multiple instances of the same subprocess.
Now need to see how this is achieved in JBPM4.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260947#4260947
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260947
16 years, 8 months
[jBPM Users] - Re: jBPM 4: how to transition via Java handler/listener?
by sebastian.s
Since I haven't been working with jbpm 3.x it's hard for me to get what exactly you are trying to achieve. I tried your unit test and I got the message that the execution was not found.
I can be wrong but doesn't this create a new process engine?
| ExecutionService executionService =
| new Configuration().buildProcessEngine().getExecutionService();
|
I am really not sure how to retrieve a reference on the process eninge already created in the context of an EventListener but I tried using the following:
| ExecutionService executionService =
| Configuration.getProcessEngine().getExecutionService();
|
The error that the execution was not found did not occur anymore but there was an assertion failure:
| 12:24:14,734 SEV | [BaseJbpmTestCase] ASSERTION FAILURE: expected:<TransitionedTo[ByListener]> but was:<TransitionedTo[Manually]>
| junit.framework.ComparisonFailure: expected:<TransitionedTo[ByListener]> but was:<TransitionedTo[Manually]>
|
Hope this helps at least bit. If this does not I'd be eager to know if it's possible and how.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260928#4260928
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4260928
16 years, 8 months