[Beginner's Corner] - EJB-JAR.XML AND JBOSS.XML SETUP
by Bruce Sanders
Bruce Sanders [http://community.jboss.org/people/brucesanders63] created the discussion
"EJB-JAR.XML AND JBOSS.XML SETUP"
To view the discussion, visit: http://community.jboss.org/message/629471#629471
--------------------------------------------------------------
Does someone one have a simple explaination w/example showing how to setup the jboss.xml from an ejb-jar.xml? I find nothing on JBOSS or Goggle? Specifically I'm looking for the enterprise beans and resource section. Below is the contents of my ejb-jar.xml.
<enterprise-beans>
<session>
<description>Calculation Appeals Manager EJB</description>
<display-name>CalculationAppealsPortalManagerBean</display-name>
<ejb-name>CalculationAppealsPortalManagerBean</ejb-name>
<home>com.spcs.intranet.calculationAppeals.business.ejb.CalculationAppealsManagerHome</home>
<remote>com.spcs.intranet.calculationAppeals.business.ejb.CalculationAppealsManager</remote>
<ejb-class>com.spcs.intranet.calculationAppeals.business.ejb.CalculationAppealsManagerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<env-entry-name>ejb.sessionTimeout</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>600</env-entry-value>
</env-entry>
</session>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/629471#629471]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - ClassCastException on .splitNode().constraint()
by Connie Yang
Connie Yang [http://community.jboss.org/people/connie.yang] created the discussion
"ClassCastException on .splitNode().constraint()"
To view the discussion, visit: http://community.jboss.org/message/629111#629111
--------------------------------------------------------------
Hi,
I'm using jbpm-flow-5.2.0-SNAPSHOT.jar and got a ClassCastException below with the following Drools flow snippet. I've tried mvel dialet as well and got the same error.
.splitNode(1010).type(Split.TYPE_XOR).name("splitOnShouldActivate")
.constraint(305, "should activate", "code", "Java",
"(Boolean)(context.getVariable(\"shouldActivate\")) == Boolean.TRUE")
.constraint(2000, "should not activate", "code", "Java",
"(Boolean)(context.getVariable(\"shouldActivate\")) == Boolean.FALSE")
.done
Exception in thread "main" java.lang.ClassCastException: org.jbpm.workflow.core.impl.ConstraintImpl incompatible with org.jbpm.process.instance.impl.ConstraintEvaluator
at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:69)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)
at org.jbpm.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:55)
at org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:51)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)
at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:47)
at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:162)
at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:143)
at org.jbpm.workflow.instance.node.SubProcessNodeInstance.internalTrigger(SubProcessNodeInstance.java:130)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)
at org.jbpm.workflow.instance.node.ActionNodeInstance.triggerCompleted(ActionNodeInstance.java:55)
at org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:51)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)
at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.workflow.instance.node.CompositeNodeInstance.internalTrigger(CompositeNodeInstance.java:106)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.workflow.instance.node.ForEachNodeInstance$ForEachSplitNodeInstance.internalTrigger(ForEachNodeInstance.java:97)
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/629111#629111]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - JBPM4 Migrating from Oracle to Postgres, Transaction Error on JBPM4_LOB
by Jeff Maas
Jeff Maas [http://community.jboss.org/people/jeff_maas] created the discussion
"JBPM4 Migrating from Oracle to Postgres, Transaction Error on JBPM4_LOB"
To view the discussion, visit: http://community.jboss.org/message/629406#629406
--------------------------------------------------------------
I have inherited an enterprise service bus style application (MULE,JBPM4,Hibernate,Spring) and have been tasked with migrating the application from Oracle to Postgres. Much of this has gone without a hitch however I have run into a problem that I beleve others have seen before. Specifically Postgres8.4 does not appear to like auto-commits on OID -> LOB, which appears to be key with how JBPM4_LOB works.
[http-80-2] [org.hibernate.util.JDBCExceptionReporter] Large Objects may not be used in auto-commit mode.
Root Exception stack trace:
org.postgresql.util.PSQLException: Large Objects may not be used in auto-commit mode.
at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:200)
at org.postgresql.largeobject.LargeObjectManager.open(LargeObjectManager.java:172)
at org.postgresql.jdbc2.AbstractJdbc2BlobClob.<init>(AbstractJdbc2BlobClob.java:47)
at org.postgresql.jdbc2.AbstractJdbc2Blob.<init>(AbstractJdbc2Blob.java:21)
at org.postgresql.jdbc3.AbstractJdbc3Blob.<init>(AbstractJdbc3Blob.java:19)
at org.postgresql.jdbc4.AbstractJdbc4Blob.<init>(AbstractJdbc4Blob.java:20)
at org.postgresql.jdbc4.Jdbc4Blob.<init>(Jdbc4Blob.java:20)
at org.postgresql.jdbc4.Jdbc4ResultSet.getBlob(Jdbc4ResultSet.java:52)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBlob(AbstractJdbc2ResultSet.java:335)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.getBlob(NewProxyResultSet.java:285)
at org.hibernate.type.BlobType.get(BlobType.java:80)
Admittedly I'm a bit out of my element, I've tried various forum searched and googles but haven't found a beginners guide to a none beginneres topic. It would appear I must add a transaction around JBPM4_LOB even though in the context that it is used it is absolutely reaad only.
Nowehere else do I use BLOB's and right now I've got the various jbpm4 libraries (maven) on my classpath. But I'm at a loss on how to deal with this issue surrounding auto-commit. I've tried various forms of turning auto-commit off at the hibernate level but to no avail. Previous seraches in the forum suggest others have had this issue but I'm not sure if anyone has recieved an answer. Any help or sympathy is greatly appreciated.
Thanks
Jeff
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/629406#629406]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months
[jBPM] - Re: jBPM 5.1 with SQL Server
by Dominique Paquin
Dominique Paquin [http://community.jboss.org/people/paqman] created the discussion
"Re: jBPM 5.1 with SQL Server"
To view the discussion, visit: http://community.jboss.org/message/627492#627492
--------------------------------------------------------------
While waiting for feedback on the above, I decided to try approach number 2
It will use this persistence.xml file (contrary to the above post, I uncommented the node "jta-data-source" ):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence version="1.0" xsi:schemaLocation=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
xmlns:orm=" http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/processInstanceDS</jta-data-source>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
<property name="hibernate.max_fetch_depth" value="3"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup"/>
</properties>
</persistence-unit>
</persistence>
I try to initiate the database connection like proposed in the jBPM documentation:
PoolingDataSource ds = new PoolingDataSource();
ds.setUniqueName("jdbc/processInstanceDS");
ds.setClassName("net.sourceforge.jtds.jdbc.Driver");
ds.setMaxPoolSize(3);
ds.setAllowLocalTransactions(true);
ds.getDriverProperties().setProperty("user", "myUser");
ds.getDriverProperties().setProperty("password", "myPassword");
ds.getDriverProperties().put("URL", "jdbc:jtds:sqlserver://192.168.117.129:1433;databaseName=myDatabase");
ds.init();
But when I start everything, the above code crashes with:
...
Caused by: bitronix.tm.utils.PropertyException: no writeable property 'URL' in class 'net.sourceforge.jtds.jdbc.Driver'
at bitronix.tm.utils.PropertyUtils.getSetter(PropertyUtils.java:318)
at bitronix.tm.utils.PropertyUtils.setDirectProperty(PropertyUtils.java:217)
at bitronix.tm.utils.PropertyUtils.setProperty(PropertyUtils.java:83)
at bitronix.tm.resource.common.XAPool.createXAFactory(XAPool.java:314)
at bitronix.tm.resource.common.XAPool.<init>(XAPool.java:63)
at bitronix.tm.resource.jdbc.PoolingDataSource.buildXAPool(PoolingDataSource.java:85)
at bitronix.tm.resource.jdbc.PoolingDataSource.init(PoolingDataSource.java:72)
... 58 more
I looked this up on the net for a while and found that I could defin each parts of the URL in separate components like this (Though I have no clue as to how the connection will be initiaterd since the server type is not provided):
...
ds.getDriverProperties().setProperty("serverName", "192.168.117.129");
ds.getDriverProperties().setProperty("portNumber", "1433");
ds.getDriverProperties().setProperty("databaseName", "racm_identity_data");
In anycase, this also crashes with:
Caused by: bitronix.tm.utils.PropertyException: no writeable property 'user' in class 'net.sourceforge.jtds.jdbc.Driver'
at bitronix.tm.utils.PropertyUtils.getSetter(PropertyUtils.java:318)
at bitronix.tm.utils.PropertyUtils.setDirectProperty(PropertyUtils.java:217)
at bitronix.tm.utils.PropertyUtils.setProperty(PropertyUtils.java:83)
at bitronix.tm.resource.common.XAPool.createXAFactory(XAPool.java:314)
at bitronix.tm.resource.common.XAPool.<init>(XAPool.java:63)
at bitronix.tm.resource.jdbc.PoolingDataSource.buildXAPool(PoolingDataSource.java:85)
at bitronix.tm.resource.jdbc.PoolingDataSource.init(PoolingDataSource.java:72)
... 58 more
So with one technique or the other, I always get countered by some obscure problems time after time
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/627492#627492]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 3 months