[JBoss jBPM] - JBPM fails to evaluate expression in pageflow decision after
by mrwaves
Environment configuration: JBoss Seam 1.2.1.GA, JBoss Server 4.0.5.GA, JBoss Eclipse IDE 2.0.0.Beta2
I need to import about 2900 data records into a local database which takes about 30 minutes to complete.
With less than about 1700 records everything works fine: No error messages and all data records are written to db.
Bu as soon as I start importing more than ca 1700 data records (~17 minutes), I receive the following output (most interesting part only):
| [...]
| Caused by: org.jbpm.JbpmException: couldn't evaluate expression '#{dataLoader.loadOK}'
| at org.jbpm.jpdl.el.impl.JbpmExpressionEvaluator.evaluate(JbpmExpressionEvaluator.java:38)
| at org.jbpm.graph.node.Decision.execute(Decision.java:108)
| ... 58 more
| Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.io.IOException
| at org.jboss.ejb3.interceptor.LifecycleInterceptorHandler.postActivate(LifecycleInterceptorHandler.java:152)
| at org.jboss.ejb3.stateful.StatefulContainer.invokePostActivate(StatefulContainer.java:376)
| at org.jboss.ejb3.stateful.StatefulBeanContext.postActivate(StatefulBeanContext.java:183)
| at org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.activateSession(StatefulSessionFilePersistenceManager
| .java:312)
| [...]
|
This just seems to affect the pageflow. All data records are written to the local db without any problems.
I already set TransactionTimeout in component.xml to 3600 sec (one hour!).
The @Begin and @End annotations within the source code are placed correctly and the pageflow-definition diagram is also ok.
Is there any other timeout parameter I oversaw? I couldn't find any appropriate else.
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060055#4060055
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060055
18Â years, 9Â months
[JBoss Portal] - Re: JBoss AS 4.2.0GA + JBoss Portal 2.6 + JSF 1.2 + JSFPortl
by viggo.navarsete
I'm not bundling with the jsf-impl.jar and jsf-api.jar. Only libraries bundled are:
portlet-api-1.0.jar
ajax-wrapper-comp.jar
jsf-portlet.jar (the portlet brigde I referred to earlier in this thread)
Can I send you the whole war file so that you can take a look at it?
Some general questions:
1. Which JSF implementation do you recommend? Since JBoss 4.2.0 bundles with the sun JSF 1.2 RI, does it mean that JBoss thinks that's a better implementation than MyFaces?
2. Is it correct that I'm supposed to declare com.sun.faces.portlet.FacesPortlet as portlet-class in portlet.xml, or am I supposed to declare the class that I use that extends the com.sun.faces.portlet.FacesPortlet class? I have a class com.test.Search which extends the FacesPortlet.
The war file that I deployed on JBoss 4.2.0 runs perfectly in the Open Source Portlet Container used in Netbeans.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060045#4060045
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060045
18Â years, 9Â months
[JBoss Seam] - Re: validation / exception handling patterns with EntityHome
by mbertelsen
Is it possible to implement a hibernate validator with this functionality (run a query to determine uniqueness)? It's not clear from looking at the hibernate validator docs how i would inject a persistence context to use.
BTW, I got the above strategy to work, but had to change a few things to get it to validate the unique property field itself. It wasn't clear how to set up the view to validate the *entire* object.
| @Name("clusterConfigUniqueValidator")
| @Validator
| @Transactional
| public class ClusterConfigUniqueNameValidator implements javax.faces.validator.Validator, Serializable{
| @In
| EntityManager entityManager;
|
| @In EntityHome<ClusterConfig> clusterConfigHome;
|
| public void validate(FacesContext facesContext, UIComponent component,
| Object value) throws ValidatorException {
| String name = (String) value;
| ClusterConfig cc = clusterConfigHome.getInstance();
| try {
| ClusterConfig cc1 = (ClusterConfig) entityManager.createQuery("select cc from ClusterConfig cc where cc.name = :name")
| .setParameter("name", name).getSingleResult();
| if (cc1 != null && !cc1.getId().equals(cc.getId())) {
| throw new ValidatorException(new FacesMessage("Name must be unique"));
| }
| } catch (NoResultException nre) {
| // that's fine - this name is unique.
| }
| }
|
| }
|
| And then on the edit page:
|
| <s:decorate id="nameDecoration" template="layout/textField.xhtml">
| <ui:define name="label">Name:</ui:define>
| <h:inputText fieldIdBase="name" id="name" value="#{clusterConfig.name}" required="true">
| <f:validator validatorId="clusterConfigUniqueValidator"/>
| <s:validate/>
| </h:inputText>
| </s:decorate>
|
|
Also, what about dealing with SQLException when you delete something and violate a foreign key constraint? Does anybody have a recommendation for how to avoid this gracefully? Should I not display the delete link/button on my list page if it's referenced (which would require an extra query per entity listed)? Write a custom exception handler in pages.xml to catch SQLException and a custom error page/handler that somehow parses the message?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060043#4060043
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060043
18Â years, 9Â months