[jBPM Users] - Re: Problem moving from 4.1 to 4.2 using Spring configuratio
by RockerRocker
I was getting NullPointerException but after adding command service name i am getting this error -
Caused by:
org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.jbpm.api.ProcessEngine org.jbpm.pv
m.internal.cfg.SpringConfiguration.buildProcessEngine()] threw exception; nested exception is org.springframework.transaction
.IllegalTransactionStateException: No existing transaction found for transaction marked with propagation 'mandatory'
Caused by:
org.springframework.transaction.IllegalTransactionStateException: No existing transaction found for transaction marked with p
ropagation 'mandatory'
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransact
ionManager.java:339)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:124)
at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:77)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:177)
at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.buildProcessEngine(ProcessEngineImpl.java:170)
at org.jbpm.pvm.internal.cfg.SpringConfiguration.buildProcessEngine(SpringConfiguration.java:81)
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)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265968#4265968
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265968
16 years, 6 months
[jBPM Users] - Re: [jBPM 4.2] MySQLIntegrityConstraintViolationException en
by xalperte
Yep! sorry.
I deleted some stuff from the previous process definition in order to run it without problems (some custom listeners).
Here the process definition:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process name="Test Websale" xmlns="http://jbpm.org/4.2/jpdl">
| <swimlane assignee="${buyer}" name="Buyer"/>
| <swimlane candidate-groups="sales" name="Sales Representative"/>
| <swimlane assignee="jim" name="Finantial Department"/>
| <swimlane assignee="luci" name="Shippment Department"/>
|
| <start form="tasks/form.create.xhtml" g="81,126,48,48" name="Create new web sale order">
| <transition g="-51,-24" name="Start web sale" to="Evaluate web order"/>
| </start>
|
| <task form="tasks/form.evaluate.xhtml" g="209,110,153,80" name="Evaluate web order" swimlane="Sales Representative">
| <reminder duedate="1 day" repeat="4 hours"/>
| <transition g="220,245:-67,-3" name="More info needed" to="Fix web order data"/>
| <transition g="-31,-24" name="Order ok" to="Processing Fork"/>
| </task>
|
| <task form="tasks/form.fix.xhtml" g="204,300,169,43" name="Fix web order data" swimlane="Buyer">
| <transition g="363,246:-62,-2" name="More info added" to="Evaluate web order"/>
| </task>
|
| <fork g="432,126,48,48" name="Processing Fork">
| <transition g="457,78:-83,-22" name="Process payment" to="Wait for money"/>
| <transition g="457,220:-67,4" name="Process shipping" to="Ship item"/>
| </fork>
|
| <task form="tasks/form.money.xhtml" g="509,38,116,80" name="Wait for money" swimlane="Finantial Department">
| <transition g="-42,-24" name="Update stock" to="Update books"/>
| </task>
|
| <state g="615,180,100,80" name="Ship item">
| <transition g="862,221:-136,-23" name="Items sent" to="Processing Join"/>
| </state>
|
| <join g="839,126,48,48" name="Processing Join">
| <transition g="-39,-31" name="Close order" to="Web sale processed"/>
| </join>
|
| <end g="949,126,48,48" name="Web sale processed" state="completed"/>
|
| <state g="714,39,117,78" name="Update books">
| <transition g="862,76:-30,-26" name="Stock updated" to="Processing Join"/>
| </state>
|
| </process>
|
And here the test case that force the error:
| public class EndProcessInstanceTest extends JbpmTestCase {
| // Process deployment id
| String deploymentId;
|
| // Identities
| String salesDept;
| String finantialDept;
| String logisticDept;
| String clients;
|
| String processInstanceId;
| String processDefinitionId;
|
| // Mail server
| Wiser wiser = new Wiser();
|
| protected void setUp() throws Exception {
| super.setUp();
|
| // create identities
| salesDept = identityService.createGroup("sales");
| finantialDept = identityService.createGroup("finantial");
| logisticDept = identityService.createGroup("logistic");
| clients = identityService.createGroup("clients");
|
| identityService.createUser("john", "John", "Doe", "john@doe");
| identityService.createMembership("john", salesDept, "manager");
|
| identityService.createUser("joe", "Joe", "Smoe", "joe@smoe");
| identityService.createMembership("joe", salesDept, "sales-repre");
|
| identityService.createUser("jim", "Jim", "Cue", "jim@cue");
| identityService.createMembership("jim", finantialDept, "employee");
|
| identityService.createUser("luci", "Luci", "Lee", "luci@lee");
| identityService.createMembership("luci", logisticDept, "employee");
|
| identityService.createUser("rex", "Rex", "Frez", "rex@frez");
| identityService.createMembership("rex", clients, "client");
|
| // deploy process
| deploymentId = repositoryService.createDeployment()
| .addResourceFromClasspath("jboss-test-websale.jpdl.xml")
| .deploy();
|
| // the tearDown of the parent class will dispose the registered deployments
| registerDeployment(deploymentId);
|
| processDefinitionId = repositoryService.createProcessDefinitionQuery().
| deploymentId(deploymentId).uniqueResult().getId();
|
| // start mail server
| wiser.setPort(2525);
| wiser.start();
| }
|
| protected void tearDown() throws Exception {
| // stop mail server
| wiser.stop();
|
| // delete identities
| identityService.deleteUser("john");
| identityService.deleteUser("joe");
| identityService.deleteUser("jim");
| identityService.deleteUser("luci");
|
| identityService.deleteUser("rex");
|
| identityService.deleteGroup(salesDept);
| identityService.deleteGroup(finantialDept);
| identityService.deleteGroup(logisticDept);
| identityService.deleteGroup(clients);
|
| super.tearDown();
| }
|
| /**
| * Start a new process instance and force the instance end
| *
| * - One task and one Job will be created at process startup
| *
| * @throws Throwable
| */
| public void testEndInstance() throws Throwable {
| // Prepare start variables and start new process instance
| startProcess();
|
| // Force the process instance end with a "cancelled" state
| executionService.endProcessInstance(processInstanceId, "cancelled");
|
| assertProcessInstanceEnded(processDefinitionId);
|
| // Looking for the jobs for the given instance
| List<Job> jobs = managementService.createJobQuery()
| .processInstanceId(processInstanceId)
| .list();
|
| // No jobs should exists
| assertEquals("Unexpected number of jobs", 0, jobs.size());
|
| // No group tasks should exists for "joe"
| List<Task> taskList = taskService.findGroupTasks("joe");
| assertEquals("Expected a single task in joe's task list", 0, taskList.size());
| }
|
| private void startProcess() throws Throwable {
| ProcessDefinition procDef = repositoryService.createProcessDefinitionQuery().deploymentId(deploymentId).uniqueResult();
|
| // Prepare process variables
| Map<String, Object> orderData = new Hashtable<String, Object>();
| orderData.put("buyer", "rex"); // Used by the "Buyer" Swimlane.
|
| // Starting a process instance with variables
| ProcessInstance instance = executionService.startProcessInstanceByKey("Test_Websale", orderData);
| processInstanceId = instance.getId();
|
| // Looking for the jobs for the given instance
| List<Job> jobs = managementService.createJobQuery()
| .processInstanceId(processInstanceId)
| .list();
|
| // One job must be started at the first activity
| assertEquals("Unexpected number of jobs", 1, jobs.size());
|
| // A group task must be created for swimlane "Sales Representatives", where joe belongs to
| // Cheking the group task for joe
| List<Task> taskList = taskService.findGroupTasks("joe");
| assertEquals("Expected a single task in joe's task list", 1, taskList.size());
| }
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265967#4265967
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265967
16 years, 6 months
[JBoss Web Services Users] - JBoss 4.2.2 JDK1.5 Webservice user-defined Exception handlin
by pa12399
Hi
I am trying to write a webservice, that throws a user-defined exception. I am using bottom-up approach and when I package and deploy the webservice in JBoss 4.2.2 AS, I am getting exceptions. Looks like it does not like the way the BaseErrorType (user-defined exception) is defined. How do I fix this issue?
Here is my webservice:
ServiceRequests.java
@WebService
public class ServiceRequests {
public List GetNpaNxxList(
@WebParam(name="postalCode") String postalCode,
@WebParam(name="npa") String npa, @WebParam(name="npaNxx") String npaNxx,
@WebParam(name="transactionId") String transactionId,
@WebParam(name="restrictedFlag") boolean restrictedFlag)
throws BaseErrorType
{
List list = new ArrayList();
return list;
}
BaseErrorType.java
import javax.xml.bind.annotation.XmlType;
@XmlType(name="com.vzw.opc.ws.BaseErrorType")
public class BaseErrorType extends java.lang.Exception{
public BaseErrorType() {}
public BaseErrorType(String msg)
{
super(msg);
}
}
When I package and deploy my webservice in Jboss, I am getting this exception:
2009-11-16 11:19:21,803 ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/opt/vzw/webserver/jboss-4.2.2.GA/server/provapi-ws/deploy/OnstarWebService.war
javax.xml.ws.WebServiceException: @XmlType missing from fault bean: com.vzw.opc.ws.jaxws.BaseErrorTypeBean
at org.jboss.ws.metadata.umdm.FaultMetaData.initializeFaultBean(FaultMetaData.java:256)
at org.jboss.ws.metadata.umdm.FaultMetaData.eagerInitialize(FaultMetaData.java:226)
at org.jboss.ws.metadata.umdm.OperationMetaData.eagerInitialize(OperationMetaData.java:464)
at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitializeOperations(EndpointMetaData.java:533)
at org.jboss.ws.metadata.umdm.EndpointMetaData.initializeInternal(EndpointMetaData.java:519)
at org.jboss.ws.metadata.umdm.EndpointMetaData.eagerInitialize(EndpointMetaData.java:507)
at org.jboss.ws.metadata.umdm.ServiceMetaData.eagerInitialize(ServiceMetaData.java:429)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265965#4265965
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265965
16 years, 6 months
[JBoss Portal Users] - ERROR when I try to start JSF/RichFaces portlet on JBoss Por
by SDF1
Hi,
I have problem with start JSF/RichFaces portlet. I use jdk1.5_17, JBoss Portal 2.7.2 (+JBoss AS 4.2.3),
two JAR files took from JBoss Portlet Bridge (portletbridge-api-1.0.0.CR3.jar, portletbridge-impl-1.0.0.CR3.jar).
My files for which I think that are keys for the starting the simplest JSP fajl with RichFaces tags are:
portlet.xml
| <?xml version="1.0" encoding="UTF-8"?><portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
| version="2.0">
| <portlet>
| <description>My Catalog Portlet</description>
| <portlet-name>MyCatalog</portlet-name>
| <display-name>My Catalog Portlet</display-name>
| <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
| <init-param>
| <name>javax.portlet.faces.defaultViewId.view</name>
| <value>/WEB-INF/jsp/CatalogJsp.jsp</value>
| </init-param>
| <init-param>
| <name>javax.portlet.faces.preserveActionParams</name>
| <value>true</value>
| </init-param>
| <expiration-cache>0</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| <portlet-mode>EDIT</portlet-mode>
| <portlet-mode>HELP</portlet-mode>
| </supports>
| <portlet-info>
| <title>My Catalog Portlet</title>
| <keywords>sample,event,catalog</keywords>
| </portlet-info>
| <supported-publishing-event>
| <qname xmlns:jbp='urn:jboss:portal:samples:event'>jbp:CartEvent</qname>
| </supported-publishing-event>
| </portlet>
|
| <portlet>
| <description>My Test Portlet</description>
| <portlet-name>MyTest</portlet-name>
| <display-name>My Test Portlet</display-name>
| <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
| <init-param>
| <name>javax.portlet.faces.defaultViewId.view</name>
| <value>/WEB-INF/jsp/test.jsp</value>
| </init-param>
| <init-param>
| <name>javax.portlet.faces.preserveActionParams</name>
| <value>true</value>
| </init-param>
| <expiration-cache>0</expiration-cache>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| <portlet-mode>EDIT</portlet-mode>
| <portlet-mode>HELP</portlet-mode>
| </supports>
| <portlet-info>
| <title>My Catalog Portlet</title>
| <keywords>sample,event,catalog</keywords>
| </portlet-info>
| <supported-publishing-event>
| <qname xmlns:jbp='urn:jboss:portal:samples:event'>jbp:CartEvent</qname>
| </supported-publishing-event>
| </portlet>
|
| <event-definition>
| <qname xmlns:jbp='urn:jboss:portal:samples:event'>jbp:CartEvent</qname>
| <value-type>org.jboss.portal.portlet.samples.shoppingcart.CartEvent</value-type>
| </event-definition>
| </portlet-app>
|
web.xml
| <?xml version="1.0"?>
| <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
| <display-name>ShoppingPortlet</display-name>
| <context-param>
| <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
| <param-value>server</param-value>
| </context-param>
| <context-param>
| <param-name>org.richfaces.SKIN</param-name>
| <param-value>blueSky</param-value>
| </context-param>
| <context-param>
| <param-name>org.richfaces.LoadScriptStrategy</param-name>
| <param-value>ALL</param-value>
| </context-param>
| <context-param>
| <param-name>org.ajax4jsf.handleViewExpiredOnClient</param-name>
| <param-value>true</param-value>
| </context-param>
| <filter>
| <display-name>Ajax4jsf Filter</display-name>
| <filter-name>ajax4jsf</filter-name>
| <filter-class>org.ajax4jsf.Filter</filter-class>
| </filter>
| <filter-mapping>
| <filter-name>ajax4jsf</filter-name>
| <servlet-name>Faces Servlet</servlet-name>
| <dispatcher>REQUEST</dispatcher>
| <dispatcher>FORWARD</dispatcher>
| <dispatcher>INCLUDE</dispatcher>
| </filter-mapping>
| <listener>
| <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
| </listener>
| <!-- Faces Servlet -->
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <!-- Faces Servlet Mapping -->
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.jsf</url-pattern>
| </servlet-mapping>
| <login-config>
| <auth-method>BASIC</auth-method>
| </login-config>
| </web-app>
|
faces-config.xml (for now I didn't connect JSF with anyone Managed Bean class)
| <?xml version="1.0" encoding="UTF-8"?>
| <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xi="http://www.w3.org/2001/XInclude"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
| </faces-config>
|
CatalogJsp.jsp
| <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
| <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
| <%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
| <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
|
| <html>
| <body>
| <rich:dataTable border="1" width="100%">
| <rich:column width="25%">
| Tree View
| </rich:column>
| <rich:column width="75%">
| Table
| </rich:column>
| </rich:dataTable>
| </body>
| </html>
|
ERROR
| ERROR
| Cause: javax.portlet.PortletException: Error process faces request
| Message: Error process faces request
| StackTrace:
|
| javax.portlet.PortletException: Error process faces request
| at javax.portlet.faces.GenericFacesPortlet.doFacesDispatch(GenericFacesPortlet.java:354)
| at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:312)
| at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
| at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:293)
| at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
| at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:568)
| at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
| at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80)
| at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:505)
| at org.jboss.portal.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
| at org.jboss.portal.portlet.PortletInvokerInterceptor.invoke(PortletInvokerInterceptor.java:82)
| .....
| ...
|
This ERROR shows me when ever I want to start more simplest Test.jsp (normal JSP page)
Test.jsp
| <html>
| <body>
| <p> Simple JSP Test Page </p>
| </body>
| </html>
|
Could somebody help me? Is it something missing here, or something is not necessary?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265962#4265962
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265962
16 years, 6 months
[JBoss Cache Users] - Re: Memory growth even after pojo is deattached from pojo ca
by anandhs
So here is what I have found so far. The problem is the usage of Map/HashMap that the Order and Item uses to store its children.
Order has many Items
Item has many Attributes.
Interestingly I am not even using Attributes, just the presence of that causes the test to take about 30-40% more memory.
Here is what I have observed for a test that I am running
test, Heap, PermGen, CPU, Classes loaded
With Maps for both, 468M , 112M, 8%, 11,000
No Attribute Map, 285M, 64M, 5%, 7,000
No Item and Attribute Map, 74M, 16M, 1%, 3,300
I am going to continue to try other things, but looks like I have my culprit. The question is if this is a bug or expected??
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265958#4265958
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265958
16 years, 6 months