[jBPM] - Migration JBPM 3.2.3 to JBPM 5
by mlsreekanth
mlsreekanth [https://community.jboss.org/people/mlsreekanth] created the discussion
"Migration JBPM 3.2.3 to JBPM 5"
To view the discussion, visit: https://community.jboss.org/message/754250#754250
--------------------------------------------------------------
Hello all,
We have been using JBPM 3.2.3 in production environment for last three years. Now client wants the whole stack to be upgraded to newer technology. We have the following stack,
1. JBPM 3.2.3
2. Seam 1.2.1 GA
3. Hibernate 2
4. Jboss 4.2.3
JBPM is embedded into the application using Seam.
While Jboss moved towards Jee6 compliant servers, we were also planning to migrate newer Jboss implementation that is Jboss 7. But JBPM 3 may not be supported as the way it is used by us. We need sugestions on this migration. There are blogs/posts which explains the process defintion migration from 3.2.X to 5.X, but there are no pointers on execution data migration which is must for live environment. Please suggest.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/754250#754250]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 7 months
[jBPM] - OSGI + human task persistence
by Grischan Engel
Grischan Engel [https://community.jboss.org/people/grischan] created the discussion
"OSGI + human task persistence"
To view the discussion, visit: https://community.jboss.org/message/754461#754461
--------------------------------------------------------------
Hi,
I am currently trying to use human tasks (jBPM 5.3) in an application based on OSGI (Equinox).
As far as I know Hibernate doesn’t really support OSGI. So I decided to use Eclipse Gemini JPA for persistence. Though I can`t make it work. Seemingly the OSGI JPA specification requires all entities and metadata to be contained in a single persistence bundle.
I get the following Exception:
javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [jbpm.unit] failed.
Internal Exception: Exception [EclipseLink-7215] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Could not load the field named [processInstanceId] on the class [class org.jbpm.persistence.processinstance.ProcessInstanceInfo]. Ensure there is a corresponding field with that name defined on the class.
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createPredeployFailedPersistenceException(EntityManagerSetupImpl.java:1541)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1532)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:98)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:306)
at org.eclipse.gemini.jpa.provider.GeminiOSGiInitializer.initializeFromBundle(GeminiOSGiInitializer.java:120)
at org.eclipse.gemini.jpa.provider.EclipseLinkOSGiProvider.assignPersistenceUnitsInBundle(EclipseLinkOSGiProvider.java:193)
at org.eclipse.gemini.jpa.PersistenceBundleExtender.tryAssigningPersistenceUnitsInBundle(PersistenceBundleExtender.java:175)
at org.eclipse.gemini.jpa.PersistenceBundleExtender.bundleChanged(PersistenceBundleExtender.java:317)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEventPrivileged(Framework.java:1569)
at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1505)
at org.eclipse.osgi.framework.internal.core.Framework.publishBundleEvent(Framework.java:1500)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.processDelta(PackageAdminImpl.java:486)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl.doResolveBundles(PackageAdminImpl.java:251)
at org.eclipse.osgi.framework.internal.core.PackageAdminImpl$1.run(PackageAdminImpl.java:174)
at java.lang.Thread.run(Unknown Source)
Could you give me some hints which setup might work to use human tasks in an OSGI environment? Does someone have a working project in an OSGI environment which uses Eclipse Gemini JPA, Hibernate or some other JPA Provider?
Thanks,
Grischan
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/754461#754461]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 7 months
[Datasource Configuration] - JBOSS AS7, SPRING MVC, MYSQLDATASOURCE
by shuo li
shuo li [https://community.jboss.org/people/alonemoon6616] created the discussion
"JBOSS AS7,SPRING MVC,MYSQLDATASOURCE"
To view the discussion, visit: https://community.jboss.org/message/754677#754677
--------------------------------------------------------------
*I use the JBOSS of ECLIPSE plugin, create a SPRING MVC project:*
https://community.jboss.org/servlet/JiveServlet/showImage/2-754677-19250/... https://community.jboss.org/servlet/JiveServlet/downloadImage/2-754677-19...
*After that, I was JBOSS AS 7 server standalone \ configuration \ standalone.xml create a datasource.*
<datasources>
<datasource jndi-name="java:jboss/datasources/MySqlDS" pool-name="MySqlDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/activiti?useUnicode=true&characterEncoding=UTF-8</connection-url>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
<password>123456</password>
</security>
</datasource>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="mysql" module="com.mysqldatabase.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
*After that, I modified the spring-quickstart-ds.xml datasource,look like this:*
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is an unmanaged datasource. It should be used for proofs of concept
or testing only. It uses H2, an in memory database that ships with JBoss
AS. -->
<datasources xmlns=" http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://www.jboss.org/ironjacamar/schema http://www.jboss.org/ironjacamar/schema http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd http://docs.jboss.org/ironjacamar/schema/datasources_1_0.xsd">
<!-- The datasource is bound into JNDI at this location. We reference
this in META-INF/persistence.xml -->
<datasource jndi-name="java:jboss/datasources/SpringQuickstartDS"
pool-name="mysqlds" enabled="true"
use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/activiti?useUnicode=true&characterEncoding=UTF-8</connection-url>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
<password>123456</password>
</security>
</datasource>
</datasources>
*After that,in the jboss-deployment-structure.xml , I increased a module like :* *<module name="com.mysqldatabase.mysql"/>*
https://community.jboss.org/servlet/JiveServlet/showImage/2-754677-19251/... https://community.jboss.org/servlet/JiveServlet/downloadImage/2-754677-19...
*last , I start service.an error like*
13:30:53,796 INFO [org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator] (MSC service thread 1-1) HHH000130: Instantiating explicit connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
13:30:54,015 WARN [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (MSC service thread 1-1) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:277)
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:235)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:761)
at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:343)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397)
at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)
at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:67) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl$ConnectionProviderJdbcConnectionAccess.obtainConnection(JdbcServicesImpl.java:253) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:119) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2270) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2266) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1735) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]
Caused by: java.sql.SQLException: java.lang.NoClassDefFoundError: com/mysql/jdbc/authentication/Sha256PasswordPlugin
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074) [mysql-connector-java-5.1.21.jar:]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988) [mysql-connector-java-5.1.21.jar:]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974) [mysql-connector-java-5.1.21.jar:]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) [mysql-connector-java-5.1.21.jar:]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:435) [mysql-connector-java-5.1.21.jar:]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399) [mysql-connector-java-5.1.21.jar:]
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334) [mysql-connector-java-5.1.21.jar:]
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:249)
... 30 more
13:30:54,093 WARN [org.hibernate.engine.jdbc.internal.JdbcServicesImpl] (MSC service thread 1-1) HHH000342: Could not obtain connection to query metadata : javax.resource.ResourceException: IJ000453: Unable to get managed connection for java:jboss/datasources/SpringQuickstartDS
13:30:54,109 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.persistenceunit."springmvc.war#primary": org.jboss.msc.service.StartException in service jboss.persistenceunit."springmvc.war#primary": Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: primary] Unable to build EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
... 3 more
Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set
at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:97)
at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:67)
at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:172)
at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:71)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2270)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2266)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1735)
at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
... 9 more
13:30:54,156 INFO [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990 http://127.0.0.1:9990
13:30:54,156 ERROR [org.jboss.as] (MSC service thread 1-1) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 9422ms - Started 275 of 467 services (114 services failed or missing dependencies, 76 services are passive or on-demand)
13:30:54,375 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "springmvc.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"springmvc.war#primary\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"springmvc.war#primary\": Failed to start service"}}
13:30:54,453 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010409: Unbound data source [jboss/datasources/SpringQuickstartDS]
13:30:54,531 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment springmvc.war in 162ms
13:30:54,531 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.persistenceunit."springmvc.war#primary": org.jboss.msc.service.StartException in service jboss.persistenceunit."springmvc.war#primary": Failed to start service
13:30:54,546 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"springmvc.war#primary\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"springmvc.war#primary\": Failed to start service"}}}}
*please help me!!!!thank you*
*
*
*
*
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/754677#754677]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 7 months
[jBPM] - BPMN Timers - threads and persistence
by M Arnold
M Arnold [https://community.jboss.org/people/m_arnold123] created the discussion
"BPMN Timers - threads and persistence"
To view the discussion, visit: https://community.jboss.org/message/753768#753768
--------------------------------------------------------------
I have a problem using BPMN2 Timers with jBPM 5.3. I can't see how to resolve my problem, so looking for help from the community...
I have read: jBPM5 timers and persistence https://community.jboss.org/thread/164992 https://community.jboss.org/thread/164992 and the bug https://issues.jboss.org/browse/JBPM-3170 https://issues.jboss.org/browse/JBPM-3170 , which closed as not a bug, but doesn't seem to provide or refer to a full solution.
I am using jBPM5 deployed in a 4 node JBoss AS 5.1 cluster, used from an EJB 3 application. We handle about 100K new process instances per day, bursting at 20 per second. We want to use BPMN2 Timers to make our processes wait for durations from a couple of seconds to a couple of months.
1. If I have a 1 million process instances waiting for timers, jBPM surely won't create 1 million threads all sleeping until their timeout? This is obviously not scalable.
2. Does jBPM ever create, join or synchronise threads? As we are using jBPM in an application server, I am worried about it performing its own thread management.
3. Until now, we have been disposing and reloading StatefulKnowledgeSession as our processes execute. I understand this will prevent the timers from firing. Instead I should never dispose sessions and reload sessions when the application server starts? How do I know which sessions may be waiting for timers in order to know which to reload?
4. Do events (for BPMN2 receive and catch) also require the session to not be disposed in the same way as timers?
Thanks for any help. Basically I'm trying to get jBPM to work well with JBoss in a scalable way...
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/753768#753768]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 7 months