[JBoss jBPM] - Problems with Taskforms: forms cannot be found / NullPointer
by sebastian.s
Hello!
I used the following process to play around with jBPM. Everything worked fine. Lately I added forms to the user tasks. At first just for the first task which is named "request". I could login, open the task and I saw the form. Submitting also worked fine. Afterwards I loggged in as a different user to perform the following tasks and the the form for "hr_review" did not work. Instead an Exception was thrown.
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process description="Urlaubsantrag zum Test der Process Engine" name="demonstration_vacation_request" xmlns="http://jbpm.org/4.0/jpdl" key="demo" version="1">
| <start g="152,6,48,48" name="start1">
| <transition g="-72,-19" name="to request" to="request"/>
| </start>
| <end g="149,456,48,48" name="end1"/>
| <task assignee="mary" form="request.ftl" g="130,87,92,52" name="request">
| <transition g="-49,-21" name="to fork1" to="fork1"/>
| </task>
| <fork g="153,174,48,48" name="fork1">
| <transition g="22,-21" name="to proj_review" to="proj_review"/>
| <transition g="-68,-24" name="to hr_review" to="hr_review"/>
| </fork>
| <task assignee="mike" form="proj_review.ftl" g="236,257,92,52" name="proj_review">
| <transition g="16,-6" name="to exclusive1" to="decision"/>
| </task>
| <java class="Vacation" g="321,349,101,52" method="save" name="save_vacation">
| <transition g="-48,-21" name="to end1" to="end1"/>
| </java>
| <task assignee="alex" form="hr_review.ftl" g="47,257,92,52" name="hr_review">
| <transition g="-105,-13" name="to exclusive1" to="decision"/>
| </task>
| <decision g="155,341,48,48" name="decision">
| <handler class="Evaluation" />
| <transition g="-48,-21" name="to end1" to="end1"/>
| <transition g="-51,-21" name="to save_vacation" to="save_vacation"/>
| </decision>
| </process>
|
| 13:00:08,481 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exc
| eption
| org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Unexpecte
| d invocation exception: null
| at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationExcept
| ion(SynchronousDispatcher.java:319)
| at org.jboss.resteasy.core.SynchronousDispatcher.handleException(Synchro
| nousDispatcher.java:230)
| at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(
| SynchronousDispatcher.java:206)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:360)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:173)
| at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
| ce(HttpServletDispatcher.java:93)
| at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
| ce(HttpServletDispatcher.java:68)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilte
| r.java:59)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:190)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
| torBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
| ss(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
| e(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
| onnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :828)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
| ss(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
| 7)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.RuntimeException: Unexpected invocation exception: null
| at org.jboss.bpm.console.server.util.InvocationProxy.invoke(InvocationPr
| oxy.java:80)
| at $Proxy143.provideForm(Unknown Source)
| at org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormPro
| cessingFacade.java:181)
| at org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormPr
| ocessingFacade.java:120)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
| java:117)
| at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
| java:260)
| at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232
| )
| at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166
| )
| at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(Dispatch
| erUtilities.java:142)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:356)
| ... 28 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.bpm.console.server.util.InvocationProxy.invoke(InvocationPr
| oxy.java:64)
| ... 41 more
| Caused by: java.lang.NullPointerException
| at org.jbpm.integration.console.forms.TaskFormDispatcher.provideForm(Tas
| kFormDispatcher.java:149)
| at org.jbpm.integration.console.forms.FormDispatcherComposite.provideFor
| m(FormDispatcherComposite.java:65)
| ... 46 more
| 13:00:08,559 ERROR [[Resteasy]] Servlet.service() for servlet Resteasy threw exc
| eption
| org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Unexpecte
| d invocation exception: null
| at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationExcept
| ion(SynchronousDispatcher.java:319)
| at org.jboss.resteasy.core.SynchronousDispatcher.handleException(Synchro
| nousDispatcher.java:230)
| at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(
| SynchronousDispatcher.java:206)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:360)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:173)
| at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
| ce(HttpServletDispatcher.java:93)
| at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.servi
| ce(HttpServletDispatcher.java:68)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilte
| r.java:59)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:190)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
| torBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.proce
| ss(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invok
| e(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
| onnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :828)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
| ss(Http11Protocol.java:601)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
| 7)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.RuntimeException: Unexpected invocation exception: null
| at org.jboss.bpm.console.server.util.InvocationProxy.invoke(InvocationPr
| oxy.java:80)
| at $Proxy143.provideForm(Unknown Source)
| at org.jboss.bpm.console.server.FormProcessingFacade.provideForm(FormPro
| cessingFacade.java:181)
| at org.jboss.bpm.console.server.FormProcessingFacade.renderTaskUI(FormPr
| ocessingFacade.java:120)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.
| java:117)
| at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.
| java:260)
| at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232
| )
| at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166
| )
| at org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(Dispatch
| erUtilities.java:142)
| at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispa
| tcher.java:356)
| ... 28 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.bpm.console.server.util.InvocationProxy.invoke(InvocationPr
| oxy.java:64)
| ... 41 more
| Caused by: java.lang.NullPointerException
| at org.jbpm.integration.console.forms.TaskFormDispatcher.provideForm(Tas
| kFormDispatcher.java:149)
| at org.jbpm.integration.console.forms.FormDispatcherComposite.provideFor
| m(FormDispatcherComposite.java:65)
| ... 46 more
|
Here are the two forms. The first one is taken from one of the examples.
| <html>
| <body>
|
| <h2>How many days would you like to go on vacation?</h2>
| <form action="${form.action}" method="POST" enctype="multipart/form-data">
| <select name="number_of_days">
| <option value="3">3 days</option>
| <option value="5">5 days</option>
| <option value="10">10 days</option>
| </select><br>
|
| <#list outcome.values as transition>
| <input type="submit" name="outcome" value="${transition}">
| </#list>
|
| </form>
| </body>
| </html>
|
| <html>
| <body>
|
| <h2>[Human Resources]Do you approve the vacation request?</h2>
| <form action="${form.action}" method="POST" enctype="multipart/form-data">
| <select name="acceptance_hr">
| <option value="yes">yes</option>
| <option value="no">no</option>
| </select><br>
|
| <#list outcome.values as transition>
| <input type="submit" name="outcome" value="${transition}">
| </#list>
|
| </form>
| </body>
| </html>
|
I am kind of confused since I do not really see a difference which would explain why the first one works properly and the second one does not.
Any hints?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249896#4249896
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249896
16 years, 11 months
[Microcontainer] - simple: bean name of ejb local in inject tag
by jjfraney
0Sorry for the simple question. I think its too simple to show up on searches of this forum.
I use the jndi name of an ejb for the bean attribute of the inject tag and am not successful. What am I not understanding correctly?
Here is the log from AS when the ejb is deployed:
| 2009-08-15 17:44:49,087 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) Created KernelDeployment for: engine-beans.jar
| 2009-08-15 17:44:49,089 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) installing bean: jboss.j2ee:jar=engine-beans.jar,name=GooGooEngine,service=EJB3
| 2009-08-15 17:44:49,089 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) with dependencies:
| 2009-08-15 17:44:49,090 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) and demands:
| 2009-08-15 17:44:49,090 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) jboss.ejb:service=EJBTimerService
| 2009-08-15 17:44:49,090 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) and supplies:
| 2009-08-15 17:44:49,090 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) jndi:GooGooEngine/remote
| 2009-08-15 17:44:49,090 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) Class:com.gc.bluejay.beans.EngineLocal
| 2009-08-15 17:44:49,090 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) jndi:GooGooEngine/local-com.gc.bluejay.beans.EngineLocal
| 2009-08-15 17:44:49,090 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) jndi:GooGooEngine/local
| 2009-08-15 17:44:49,090 INFO [org.jboss.ejb3.deployers.JBossASKernel] (main) Added bean(jboss.j2ee:jar=engine-beans.jar,name=GooGooEngine,service=EJB3) to K
| ernelDeployment of: engine-beans.jar
|
Here is the segment from my jboss-beans.xml file:
| <inspect bean="GooGooEngine/local"/>
|
This is the error that shows in the AS server.log:
| org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
|
| DEPLOYMENTS MISSING DEPENDENCIES:
| Deployment "HWService" is missing the following dependencies:
| Dependency "GooGooEngine/local" (should be in state "Configured", but is actually in state "** NOT FOUND Depends on 'GooGooEngine/local' **")
|
| DEPLOYMENTS IN ERROR:
| Deployment "GooGooEngine/local" is in error due to the following reason(s): ** NOT FOUND Depends on 'GooGooEngine/local' **
|
| at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
| at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
| at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
| at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
|
Thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249894#4249894
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249894
16 years, 11 months
[Installation, Configuration & DEPLOYMENT] - Re: ClassCastException due to Xerces conflict during app dep
by jaikiran
I read about this, during the weekend, in the apache xerces project page. Turns out, this is a common issue with all application server and they have a FAQ for this specific issue which explains the details http://xerces.apache.org/xerces2-j/faq-general.html#faq-5. JBoss AS runs into this exact issue.
"rodos77" wrote :
| IMHO, I think the deployer should either do this after it instantiates the parser or it should temporarily swap out the context classloader and swap in the deployer classloader in its place
The deployers use JBossXB:
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:97)
| at org.jboss.xb.binding.UnmarshallerImpl.<init>(UnmarshallerImpl.java:56)
| at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(Unmarsha
| llerFactory.java:96)
|
So i guess its the responsibility of JBoss XB to switch the classloader.
I am not an expert of xml or JBossXB. So i guess the best place to bring this up, is the JBossXB forum here http://www.jboss.org/index.html?module=bb&op=viewforum&f=212
"jaikiran" wrote :
| From what i looked at, the deployment framework starts using the version of xerces jar present in your deployment because it sets the classloader to your deployment's classloader. I think this is the correct thing to do, because each deployment is expected to be started within its own classloader to ensure that it gets access to the right resources.
Switching the classloader should be done only for the xerces issue, the rest of the deployment process should continue to use the deployment's classloader.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249883#4249883
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249883
16 years, 11 months
[Installation, Configuration & DEPLOYMENT] - Environment and context.xml
by Mark.Eastman
In my tomcat deployed app I use the element in META-INF/context.xml to override the environment value in web.xml. This will be copied to the conf/engine-name/host-name/mywebappname.xml on the first deployment. The administrator can then amend the file to provide the real value he wants.
In JBoss I cannot get this type of process to work. I have read a number of forums and jira issues referring to using context.xml and I have moved the file to WEB-INF. I have added additional xml to the context.xml file to make sure it is being parsed but the environment variable is not overriding the value in web.xml.
Here is my file;
I have tried true and false for the override.
My questions are, will JBoss allow the web.xml env element (such as)
<env-entry>
A Test variable
<env-entry-name>TestVariable</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>TestValue</env-entry-value>
</env-entry>
to be overridden in the context.xml as per tomcat.
secondly how can I get the context.xml to be externalised from the war file so it is not overwritten upon subsequent deploys of the war file.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249876#4249876
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249876
16 years, 11 months