[JBoss Seam] - Re: Problem with JBPM nodes and transitions
by chawax
I have another problem with transitions. I have a task-node with 2 transitions "Accepter" and "Refuser". These transitions can be fired from two command buttons in a JSF. These transitions go to nodes with Seam actions binded to them. But when JBPM calls these actions, the processInstance I get with the @In annotation is null ... Why is this processInstance null ?
Here is my JSF :
<h:dataTable value="#{taskInstanceList}" var="task" rendered="#{not empty taskInstanceList}">
| <h:column>
| <f:facet name="header">
| <h:outputText value="Description"/>
| </f:facet>
| <h:outputText value="#{task.description}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="Effectuée le"/>
| </f:facet>
| <h:outputText value="#{task.taskMgmtInstance.processInstance.start}">
| <f:convertDateTime type="date"/>
| </h:outputText>
| </h:column>
| <h:column>
| <s:button value="Accepter" action="#{afficherMessageConsole.accepterDemande}" taskInstance="#{task}" />
| <s:button value="Refuser" action="#{afficherMessageConsole.refuserDemande}" taskInstance="#{task}" />
| </h:column>
| </h:dataTable>
Here is my Java class :
public class AfficherMessageConsole {
|
| @In
| private ProcessInstance processInstance;
|
| @StartTask
| @EndTask (transition="Accepter")
| public String accepterDemande() throws Exception {
| return "validationDemandes";
| }
|
| @StartTask
| @EndTask (transition="Refuser")
| public String refuserDemande() throws Exception {
| return "validationDemandes";
| }
|
| public void demandeAcceptee() throws Exception {
| log("Demande acceptee !");
| processInstance.getRootToken().signal();
| }
|
| public void demandeRefusee() throws Exception {
| log("Demande refusee !");
| processInstance.getRootToken().signal();
| }
| }
And finally a part of the JPDL :
<task-node name="Avis de la RH">
| <task name="Validation de la RH">
| <assignment actor-id="#{actor.id}" />
| </task>
| <transition name="Refuser" to="Refus"></transition>
| <transition name="Accepter" to="Acceptation"></transition>
| </task-node>
| <node name="Refus">
| <action expression="#{afficherMessageConsole.demandeRefusee}" />
| <transition name="" to="End"></transition>
| </node>
| <node name="Acceptation">
| <transition to="End" />
| <action expression="#{afficherMessageConsole.demandeAcceptee}" />
| </node>
| <end-state name="End"></end-state>
|
I looked for samples in the source code, but there are no examples with nodes (and it's a shame). I'm not sure I understood well how to integrate Seam and JBPM, so feel free to tell me if I do something wrong !
Thanks in advance ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080569#4080569
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080569
18 years, 7 months
[JBoss Seam] - NotLoggedInException and no redirect to login page again
by gena777
Hello,
i'm trying to use the built-in security handling. With the pages.xml it works fine. But, if i try to restrict some controller action, no redirect occurs and the application just throws an exception
| 17:34:57,328 ERROR [[default]] Servlet.service() for servlet default threw exception
| org.jboss.seam.security.NotLoggedInException
| at org.jboss.seam.security.Identity.checkRestriction(Identity.java:222)
| at de.rwo.login.Identity.checkRestriction(Identity.java:59)
| at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:38)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
| at org.javassist.tmp.java.lang.Object_$$_javassist_22.buyNow(Object_$$_javassist_22.java)
The de.rwo.login.Identity.checkRestriction extends the Identity and only wraps the original checkRestriction call. If i catch the NotLoggedInException in such a wrapper and redirect manually (by using Pages.instance()...) to the login page, it works, but expect the correct behavior also/especially in case of NotLoggedInException.
Some application data(configuration as in the docu):
This view should be visible to all, but the only action of the page requires successful login to be proceeded.
Firing action in view
| <h:commandButton action="#{buyNowController.buyNow}" styleClass="submit" value="Kaufen" >
| <s:conversationId/>
| </h:commandButton>
The action itself
@Restrict("#{identity.loggedIn}")
| public String buyNow() {...}
|
Sounds simple but doesn't work :-(
Thanks for any help,
Gena
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080567#4080567
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080567
18 years, 7 months
[JBoss jBPM] - Help required
by muddsar
Hi
i have configured jbpm-starters-kit-3.1.4 with oracle 9i.......when i try to run example process websale...it gives me following exception
Caused by: org.jbpm.identity.assignment.ExpressionAssignmentException: couldn't interpr
first term in expression 'user(ernie);'
at org.jbpm.identity.assignment.ExpressionAssignmentHandler.resolveFirstTerm(Ex
ssionAssignmentHandler.java:155)
at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAs
nmentHandler.java:75)
... 79 more
if i click on save then no exception occurs and data is saved in database but if i click on Save and Close button then above exception occurs....thats most likely occurs when transaction from one task to other task take place....
if anybody can help me out in this problem i shall be really thankful..
Thanks
Muddsar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080562#4080562
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080562
18 years, 7 months
[Installation, Configuration & DEPLOYMENT] - Java heap size problem
by nicdo77
Hi,
I'm using JBoss 4.0.5 and i have two applications deployed on it: the application i'm developing and JIRA.
Since i have installed JIRA, i have had performance problems, such as gettin this in the log:
15:20:37,984 ERROR [STDERR] Exception in thread "ScannerThread"
| 15:20:38,703 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
| Server daemon died!
| 15:21:00,937 ERROR [STDERR] at java.util.TreeMap.buildFromSorted(TreeMap.java:1611)
| 15:21:02,781 ERROR [STDERR] at java.util.TreeMap.buildFromSorted(TreeMap.java:1548)
| 15:21:02,781 ERROR [STDERR] at java.util.TreeMap.putAll(TreeMap.java:320)
| 15:21:02,781 ERROR [STDERR] at javax.management.modelmbean.DescriptorSupport.init(DescriptorSupport.java:467)
| 15:21:02,781 ERROR [STDERR] at javax.management.modelmbean.DescriptorSupport.<init>(DescriptorSupport.java:210)
| 15:21:02,781 ERROR [STDERR] at javax.management.modelmbean.DescriptorSupport.clone(DescriptorSupport.java:801)
| 15:21:02,781 ERROR [STDERR] at javax.management.modelmbean.ModelMBeanAttributeInfo.getDescriptor(ModelMBeanAttributeInfo.java:348)
| 15:21:02,781 ERROR [STDERR] at javax.management.modelmbean.ModelMBeanAttributeInfo.<init>(ModelMBeanAttributeInfo.java:316)
| 15:21:02,781 ERROR [STDERR] at javax.management.modelmbean.ModelMBeanAttributeInfo.clone(ModelMBeanAttributeInfo.java:407)
| 15:21:02,781 ERROR [STDERR] at javax.management.modelmbean.ModelMBeanInfoSupport.getAttribute(ModelMBeanInfoSupport.java:731)
| 15:21:02,781 ERROR [STDERR] at javax.management.modelmbean.ModelMBeanInfoSupport.getDescriptor(ModelMBeanInfoSupport.java:544)
| 15:21:02,781 ERROR [STDERR] at org.jboss.mx.modelmbean.ModelMBeanInvoker.override(ModelMBeanInvoker.java:830)
| 15:21:02,796 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.getAttribute(AbstractMBeanInvoker.java:350)
| 15:21:02,796 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.getAttribute(MBeanServerImpl.java:556)
| 15:21:02,796 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:140)
| 15:21:02,796 ERROR [velocity] Method getSelectListOptions threw exception for reference $searcher in template templates/jira/issue/searchers/edit/user-searcher-edit.vm at [148,30]
| 15:21:02,796 ERROR [STDERR] at $Proxy11.getSuffixOrder(Unknown Source)
| 15:21:02,796 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.updateSorter(URLDeploymentScanner.java:671)
| 15:21:02,796 ERROR [DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.OutOfMemoryError: Java heap space
| java.lang.OutOfMemoryError: Java heap space
| 15:21:02,796 ERROR [STDERR] at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:640)
| 15:21:02,796 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| 15:21:02,796 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| 15:21:02,796 ERROR [STDERR] at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| 15:21:02,796 ERROR [STDERR] Exception in thread "JiraQuartzScheduler_Worker-0"
| 15:21:02,796 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
| 15:21:02,796 ERROR [STDERR] at java.nio.ByteBuffer.wrap(ByteBuffer.java:350)
| 15:21:02,796 ERROR [STDERR] at java.lang.StringCoding$CharsetSD.decode(StringCoding.java:187)
| 15:21:02,796 ERROR [STDERR] at java.lang.StringCoding.decode(StringCoding.java:228)
| 15:21:02,796 ERROR [STDERR] at java.lang.StringCoding.decode(StringCoding.java:234)
| 15:21:02,796 ERROR [STDERR] at java.lang.String.<init>(String.java:458)
| 15:21:02,796 ERROR [STDERR] at org.tanukisoftware.wrapper.WrapperManager.handleSocket(WrapperManager.java:3759)
| 15:21:02,796 ERROR [STDERR] at org.tanukisoftware.wrapper.WrapperManager.run(WrapperManager.java:4084)
| 15:21:02,796 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
| 15:21:02,796 ERROR [STDERR] Exception in thread "HSQLDB Timer @75be38"
| 15:21:02,796 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
| 15:21:02,796 ERROR [STDERR] at java.lang.String.<init>(String.java:208)
| 15:21:02,796 ERROR [STDERR] at java.lang.StringBuffer.toString(StringBuffer.java:586)
| 15:21:02,796 ERROR [STDERR] at org.apache.log4j.PatternLayout.format(PatternLayout.java:498)
| 15:21:02,796 ERROR [STDERR] at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:292)
| 15:21:03,437 ERROR [STDERR] at org.apache.log4j.DailyRollingFileAppender.subAppend(DailyRollingFileAppender.java:349)
| 15:21:03,437 ERROR [STDERR] at org.apache.log4j.WriterAppender.append(WriterAppender.java:150)
| 15:21:03,437 ERROR [STDERR] at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221)
| 15:21:03,437 ERROR [STDERR] at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:57)
| 15:21:03,437 ERROR [STDERR] at org.apache.log4j.Category.callAppenders(Category.java:187)
| 15:21:03,437 ERROR [STDERR] at org.apache.log4j.Category.forcedLog(Category.java:372)
| 15:21:03,437 ERROR [STDERR] at org.apache.log4j.Category.debug(Category.java:241)
| 15:21:03,437 ERROR [STDERR] at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:96)
| 15:21:03,437 ERROR [STDERR] at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
| 15:21:03,437 ERROR [STDERR] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)
| 15:21:03,437 ERROR [STDERR] java.lang.OutOfMemoryError: Java heap space
| 15:21:07,375 ERROR [velocity] Method getSelectListOptions threw exception for reference $searcher in template templates/jira/issue/searchers/edit/user-searcher-edit.vm at [34,22]
| 15:21:07,375 ERROR [DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.OutOfMemoryError: Java heap space
| java.lang.OutOfMemoryError: Java heap space
| 15:21:07,390 INFO [velocity] ResourceManager : found templates/jira/issue/searchers/edit/constants-searcher-edit.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
| 15:21:10,875 ERROR [velocity] Method getText threw exception for reference $i18n in template templates/jira/issue/searchers/edit/constants-searcher-edit.vm at [3,43]
| 15:21:10,875 ERROR [DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.OutOfMemoryError: Java heap space
| java.lang.OutOfMemoryError: Java heap space
| 15:21:16,312 ERROR [ServletValueStack] METHOD: "searcherEditHtml", exception:
| java.lang.OutOfMemoryError: Java heap space
| JVM appears hung: Timed out waiting for signal from JVM.
| JVM did not exit on request, terminated
| Launching a JVM...
| Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
| Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
|
As you can see, i'm using JBoss as a Service Windows using a wrapper (see here for more details:
http://wrapper.tanukisoftware.org/doc/english/jmx.html#jboss)
So i have the following wrapper.conf:
#********************************************************************
| # Wrapper Properties
| #********************************************************************
| # Java Application
| wrapper.java.command=%JAVA_HOME%\bin\java
|
| # Java Main class. This class must implement the WrapperListener interface
| # or guarantee that the WrapperManager class is initialized. Helper
| # classes are provided to do this for you. See the Integration section
| # of the documentation for details.
| wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
|
| # Java Classpath (include wrapper.jar) Add class path elements as
| # needed starting from 1
| wrapper.java.classpath.1=%JBOSS_HOME%/server/default/lib/wrapper.jar
| wrapper.java.classpath.2=%JAVA_HOME%/lib/tools.jar
| wrapper.java.classpath.3=./run.jar
|
| # Java Library Path (location of Wrapper.DLL or libwrapper.so)
| wrapper.java.library.path.1=%JBOSS_HOME%/server/default/lib
|
| # Java Additional Parameters
| #wrapper.java.additional.1=
|
| # Initial Java Heap Size (in MB)
| #wrapper.java.initmemory=1024
|
| # Maximum Java Heap Size (in MB)
| #wrapper.java.maxmemory=2048
|
| # Application parameters. Add parameters as needed starting from 1
| wrapper.app.parameter.1=org.jboss.Main
|
| #********************************************************************
| # Wrapper Logging Properties
| #********************************************************************
| # Format of output for the console. (See docs for formats)
| wrapper.console.format=M
|
| # Log Level for console output. (See docs for log levels)
| wrapper.console.loglevel=INFO
|
| # Log file to use for wrapper output logging.
| wrapper.logfile=%JBOSS_HOME%/server/default/log/wrapper.log
|
| # Format of output for the log file. (See docs for formats)
| wrapper.logfile.format=M
|
| # Log Level for log file output. (See docs for log levels)
| wrapper.logfile.loglevel=INFO
|
| # Maximum size that the log file will be allowed to grow to before
| # the log is rolled. Size is specified in bytes. The default value
| # of 0, disables log rolling. May abbreviate with the 'k' (kb) or
| # 'm' (mb) suffix. For example: 10m = 10 megabytes.
| wrapper.logfile.maxsize=10m
|
| # Maximum number of rolled log files which will be allowed before old
| # files are deleted. The default value of 0 implies no limit.
| wrapper.logfile.maxfiles=10
|
| # Log Level for sys/event log output. (See docs for log levels)
| wrapper.syslog.loglevel=NONE
|
| #********************************************************************
| # Wrapper Windows Properties
| #********************************************************************
| # Title to use when running as a console
| wrapper.console.title=(a)app.long.name@
|
| #********************************************************************
| # Wrapper Windows NT/2000/XP Service Properties
| #********************************************************************
| # WARNING - Do not modify any of these properties when an application
| # using this configuration file has been installed as a service.
| # Please uninstall the service before modifying this section. The
| # service can then be reinstalled.
|
| # Name of the service
| wrapper.ntservice.name=JBoss Opalys
|
| # Display name of the service
| wrapper.ntservice.displayname=JBoss Opalys
|
| # Description of the service
| wrapper.ntservice.description=J2EE Application Server for Opalys Application
|
| # Service dependencies. Add dependencies as needed starting from 1
| wrapper.ntservice.dependency.1=
|
| # Mode in which the service is installed. AUTO_START or DEMAND_START
| wrapper.ntservice.starttype=AUTO_START
|
| # Allow the service to interact with the desktop.
| wrapper.ntservice.interactive=false
As you can see, i set the minimal java memory size at 1024 and the max at 2048. Thinking it should be enough :)
But the point is, i keep getting Java heap size problems (as i said earlier) and i don't know where they are coming. I don't think my apps are resource-consuming: they work perfectly locally, i can let my JBoss turn all day long without any problems, inside or outside my IDE.
But once it came to production, i get problems.
So, i had a look at the JMX Console, and in the Mbean {Jboss.system, type=ServerInfo}, i get the following data:
FreeMemory java.lang.Long R 42816 MBean Attribute.
| TotalMemory java.lang.Long R 66650112 MBean Attribute.
| MaxMemory java.lang.Long R 66650112 MBean Attribute.
So apparently from this data i understand that the actual memory of my JBoss is only 64mb... but why???
Please help me
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080558#4080558
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080558
18 years, 7 months