[JBoss jBPM] - Un expected behavior observed with Token details
by Narasimha_Addanki
For our Application we have defined a Process Definition which consists of States. When a Process Instance is created of this Process Definition and the workflow is initiated, The Root Token flows throw the Workflow (which may result in the creation of Child Tokens) and these tokens will eventually stop or halt at certain states. The states they reside on is decided by certain parameters and the path followed by the token.
After the successful execution of a Process Instance we have a necessity to know the state (i.e. State Name) in which the token has halted. So we firstly find the Process Instance we require, get the Root Token, and then get the children of this Root Token. We then use the Token Class method getNode().getName(), which will return the Node Name on which this Token resides.
Expected Behavior:
This value of getNode().getName() can never be null as the Token has to be on a State at the point when the execution has completed successfully.
Deviation:
The State is returned as null, thus resulting in a NULLPOINTEREXCEPTION.
On later inspecting the database we found that in the table JBPM_TOKEN where the details of the token are stored, the column value of Node for this particular token is NULL.
We have attached an Excel Sheet with the details of this table and have highlighted the NULL field.
I have exported database details for JBPM_TOKEN to an spreadsheet which depicts null value under the NODE_ column
I intended to attach the excel sheet but couldn't find a way to attach to this message.
Can any one help in:
1) for attaching the spread sheet
2) to find the solution for NODE_ attribute becoming NULL.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039730#4039730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039730
19 years
[JBoss Seam] - Problem by inserting of entities
by music
Hi,
I use JBoss Seam 1.2.1 GA, Jboss 4.0.5 GA and JSF for one project. I have made one new Session bean for inserting/deleting some data in/from database.
It's look something like this:
|
| @Stateless
| @Name("initialize")
| public class InitializeData implements Initialize
| {
| @PersistenceContext
| private EntityManager em = null;
|
| public void insertData()
| {
| try
| {
|
| PriceCategory cat1 = new PriceCategory("Old", new BigDecimal(3.2));
| PriceCategory cat2 = new PriceCategory("New", new BigDecimal(5.2));
|
| em.persist(cat1);
| em.persist(cat2);
|
| em.flush();
| }
| catch(Exception e)
| {
| e.printStackTrace();
| }
| }
|
But when I call this method from JSF, I get always this exception by first em.persist()-call:
|
| 09:27:45,078 INFO [STDOUT] Hibernate: insert into PriceCategory (priceCategoryId, name, dailyFee, optLock) values (null, ?, ?, ?)
| 09:27:45,093 WARN [JDBCExceptionReporter] SQL Error: -104, SQLState: 23000
| 09:27:45,093 ERROR [JDBCExceptionReporter] Unique constraint violation: SYS_CT_61 in statement [insert into PriceCategory (priceCategoryId, name, dailyFee, optLock) values (null, ?
| , ?, ?)]
| 09:27:45,093 ERROR [STDERR] javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not insert: [model.PriceCategory]
| 09:27:45,093 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:622)
| 09:27:45,093 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:218)
|
|
I don't really understand what happend there. Perheps my entity bean PriceCategory:
|
| @Entity
| @Table(name = "PriceCategory")
| @Name("pricecategory")
| public class PriceCategory implements Serializable {
|
| @Id
| @GeneratedValue(strategy=GenerationType.IDENTITY)
| @Column(name = "priceCategoryId")
| private Integer id;
|
| @Column(name = "name", nullable = false, length = 20, unique=true)
| private String name;
|
| @Column(name = "dailyFee", nullable = false, precision = 4, scale = 2)
| private BigDecimal dailyFee;
|
| @Version
| @Column(name = "optLock")
| private Integer version;
| ...
|
|
I am really stuck at this point and without data in database cann't do anything more.
Could anyone give me some hint for get over it?
Thanks a lot for every help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039725#4039725
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039725
19 years
[JCA/JBoss] - c3p0 connection not being involved in business transaction?
by swiety
I am using JBoss4 with c3p0 datasources connecting to MySQL 5 DB. I
have recently realised that all c3p0 connections are not managed by
business transaction. So if in my SessionBean I'm obtaining c3p0 DS
connection (by lookup in JNDI) and then calling setRollbackOnly() on
this session context, the DB transaction is not being rolled back.
I am very surprised - when I replace this DS with standard
local-tx-datasource it works perfectly - by calling
ctx.setRollbackOnly() DB transaction is being rolled back.
Cannot find any way to specify which transaction manager c3p0 should
use. And actually I believe described behaviour doesn't conform to
J2EE 1.4 spec - specification says that every JDBC connection obtained
from JNDI inside business transaction should be controlled by this
transaction.
Can you help me? Is C3P0 capable of joining the business transaction?
Configuration of C3P0 DS I'm using is:
| <server>
| <mbean code="com.mchange.v2.c3p0.mbean.C3P0PooledDataSource"
| name="XXX:service=XXXPooledDataSource">
|
| <attribute name="JndiName">java:XXXDS</attribute>
| <attribute name="JdbcUrl">jdbc:mysql://localhost:3306/dbXXX</attribute>
| <attribute name="DriverClass">com.mysql.jdbc.Driver</attribute>
| <attribute name="User">XXX</attribute>
| <attribute name="Password">XXX</attribute>
| <attribute name="AcquireIncrement">1</attribute>
| <attribute name="AcquireRetryAttempts">30</attribute>
| <attribute name="AcquireRetryDelay">1000</attribute>
| <attribute name="AutoCommitOnClose">false</attribute>
| <attribute name="AutomaticTestTable"></attribute>
| <attribute name="BreakAfterAcquireFailure">false</attribute>
| <attribute name="CheckoutTimeout">0</attribute>
| <attribute name="Description">XXX</attribute>
| <attribute name="FactoryClassLocation"></attribute>
| <attribute name="ForceIgnoreUnresolvedTransactions">false</attribute>
| <attribute name="IdleConnectionTestPeriod">60</attribute>
| <attribute name="InitialPoolSize">1</attribute>
| <attribute name="MaxIdleTime">60</attribute>
| <attribute name="MaxPoolSize">3</attribute>
| <attribute name="MaxStatements">0</attribute>
| <attribute name="MaxStatementsPerConnection">0</attribute>
| <attribute name="MinPoolSize">0</attribute>
| <attribute name="NumHelperThreads">3</attribute>
| <attribute name="PreferredTestQuery"></attribute>
| <attribute name="TestConnectionOnCheckin">true</attribute>
| <attribute name="TestConnectionOnCheckout">false</attribute>
| <attribute name="UsesTraditionalReflectiveProxies">false</attribute>
| <depends>jboss:service=Naming</depends>
| </mbean>
| </server>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039724#4039724
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039724
19 years
[JBossWS] - Re: Providing your own wsdl instead of the generated one.
by sgof
I followed this steps, but wsconsume generate only 2 class: the interface and the class which implement it.
I create the web.xml, generate the war file, and when I put it in jboss I obtain this:
09:39:15,267 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.
0.5.GA/server/default/deploy/WPM3.war
org.jboss.deployment.DeploymentException: Cannot create service endpoint; - nest
ed throwable: (org.jboss.ws.WSException: Cannot find required security resource:
WEB-INF/wsse.keystore)
So, I create an empty file called wsse.keystore, and I obtain this:
09:40:26,803 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.
0.5.GA/server/default/deploy/WPM3.war
org.jboss.deployment.DeploymentException: Cannot create service endpoint; - nest
ed throwable: (org.jboss.ws.WSException: Cannot find required security resource:
WEB-INF/wsse.truststore)
So, I create an empty file called wsse.truststore, and I obtain this:
09:45:19,415 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.
0.5.GA/server/default/deploy/WPM3.war
org.jboss.deployment.DeploymentException: Cannot create service endpoint; - nest
ed throwable: (org.jboss.ws.WSException: Cannot find port in wsdl: {http://local
host:8080/WPM3}wpmPort)
Can you help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039723#4039723
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039723
19 years