[jBPM] - Using JBoss 7 datasource in jBPM5.2
by Paul Werder
Paul Werder [http://community.jboss.org/people/paul1972] created the discussion
"Using JBoss 7 datasource in jBPM5.2"
To view the discussion, visit: http://community.jboss.org/message/643621#643621
--------------------------------------------------------------
Hi all JBPM users,
I'd need to prepare a demo jbpm 5 application so that I can convince the management staff to use it :-)
I've found a sample demo application on bpmn2's blog which uses jBPM5.2 features to start a process, *in the same JVM* as the TaskService:
| | | try { |
| | | | DeleteDbFiles.execute("", "JPADroolsFlow", true); |
| | | | Server h2Server = Server.createTcpServer(new String[0]); |
| | | | h2Server.start(); |
| | | } catch (SQLException e) { |
| | | | throw new RuntimeException("can't start h2 server db",e); |
| | | } |
| | |
| | | |
| | | try { |
| | | | |
| | | | UserTransaction ut = (UserTransaction) new InitialContext().lookup( "java:comp/UserTransaction" ); |
| | |
| | | PoolingDataSource ds1 = new PoolingDataSource(); |
|
| | |
|
| | | ds1.setClassName("bitronix.tm.resource.jdbc.lrc.LrcXADataSource"); | |
| | | ds1.setUniqueName("jdbc/jbpm-ds"); | |
| | | ds1.setMaxPoolSize(5); | |
| | | ds1.setAllowLocalTransactions(true); | |
| | | ds1.getDriverProperties().setProperty("driverClassName", "org.h2.Driver"); | |
| | | ds1.getDriverProperties().setProperty("url", "jdbc:h2:tcp://localhost/JPADroolsFlow"); | |
| | | ds1.getDriverProperties().setProperty("user", "sa"); | |
| | | ds1.getDriverProperties().setProperty("password", ""); | |
| | | |
|
| | | ut.begin(); |
|
| | | |
|
| | | System.setProperty("jbpm.usergroup.callback", "org.jbpm.task.service.DefaultUserGroupCallbackImpl"); |
|
| | | |
|
| | | EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa"); | |
| | | |
|
| | | StatefulKnowledgeSession ksession = JbpmAPIUtil.createKnowledgeSession("HelloProcess.bpmn",emf); |
|
That would be perfect, except that it uses a PollingDatasource for the example- I'd rather need to connect to JBoss 7 datasource, or at least use Hibernate configuration file to define the connection properties. Can anybody suggest me how to modify this example ???
Thanks a lot
Paul
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/643621#643621]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[Datasource Configuration] - Error in JBoss 7.1.0 datasource configuration
by Peter Penzov
Peter Penzov [http://community.jboss.org/people/rcbandit] created the discussion
"Error in JBoss 7.1.0 datasource configuration"
To view the discussion, visit: http://community.jboss.org/message/643334#643334
--------------------------------------------------------------
Hi,
I tried to configure datasource configuration in JBoss 7.1.0. This is the configuration:
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="Oracle" pool-name="Oracle_Pool" enabled="true" jta="true" use-java-context="true" use-ccm="true">
<connection-url>
jdbc:oracle:thin:@localhost:oracle
</connection-url>
<driver>
ojdbc6.jar
</driver>
<transaction-isolation> TRANSACTION_READ_COMMITTED </transaction-isolation>
<pool>
<min-pool-size> 20 </min-pool-size>
<max-pool-size> 300</max-pool-size>
</pool>
<security>
<user-name>
admin
</user-name>
<password>
qwerty
</password>
</security>
<validation>
<validate-on-match> false </validate-on-match>
<background-validation> false </background-validation>
<useFastFail> false </useFastFail>
</validation>
<statement>
<prepared-statement-cache-size> 100 </prepared-statement-cache-size>
<share-prepared-statements/>
</statement>
</datasource>
</datasources>
</subsystem>
When I start JBoss this error appears:
[root@Testserver bin]# ./standalone.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /opt/jboss-as-7.1.0.CR1b
JAVA: /opt/jdk1.7.0_01/bin/java
JAVA_OPTS: -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
15:30:58,473 INFO [org.jboss.modules] JBoss Modules version 1.1.0.CR6
15:30:58,858 INFO [org.jboss.msc] JBoss MSC version 1.0.1.GA
15:30:58,921 INFO [org.jboss.as] JBoss AS 7.1.0.CR1b "Flux Capacitor" starting
15:30:59,903 INFO [org.jboss.as] JBoss AS 7.1.0.CR1b "Flux Capacitor" stopped in 8ms
15:30:59,894 ERROR [org.jboss.as.controller] JBAS014601: Error booting the container: java.lang.RuntimeException: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:161) [jboss-as-controller-7.1.0.CR1b.jar:7.1.0.CR1b]
at java.lang.Thread.run(Thread.java:722) [:1.7.0_01]
Caused by: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:125) [jboss-as-controller-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:187) [jboss-as-controller-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.as.server.ServerService.boot(ServerService.java:256) [jboss-as-server-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155) [jboss-as-controller-7.1.0.CR1b.jar:7.1.0.CR1b]
... 1 more
Caused by: javax.xml.stream.XMLStreamException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[90,17]
Message: "Jndi name have to start with java:/ or java:jboss/"
at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$NewDataSourceSubsystemParser.readElement(DataSourcesExtension.java:723)
at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$NewDataSourceSubsystemParser.readElement(DataSourcesExtension.java:279)
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:100) [staxmapper-1.0.0.Final.jar:1.0.0.Final]
at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtendedStreamReaderImpl.java:69) [staxmapper-1.0.0.Final.jar:1.0.0.Final]
at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(StandaloneXml.java:897) [jboss-as-server-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_1(StandaloneXml.java:319) [jboss-as-server-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:120) [jboss-as-server-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.java:97) [jboss-as-server-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:100) [staxmapper-1.0.0.Final.jar:1.0.0.Final]
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:59) [staxmapper-1.0.0.Final.jar:1.0.0.Final]
at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(XmlConfigurationPersister.java:117) [jboss-as-controller-7.1.0.CR1b.jar:7.1.0.CR1b]
... 4 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[90,17]
Message: "Jndi name have to start with java:/ or java:jboss/"
at org.jboss.as.controller.SimpleAttributeDefinition.parse(SimpleAttributeDefinition.java:154) [jboss-as-controller-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.as.controller.SimpleAttributeDefinition.parseAndSetParameter(SimpleAttributeDefinition.java:207) [jboss-as-controller-7.1.0.CR1b.jar:7.1.0.CR1b]
at org.jboss.as.connector.subsystems.datasources.DsParser.parseDataSource(DsParser.java:544)
at org.jboss.as.connector.subsystems.datasources.DsParser.parseDataSources(DsParser.java:193)
at org.jboss.as.connector.subsystems.datasources.DsParser.parse(DsParser.java:164)
at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$NewDataSourceSubsystemParser.readElement(DataSourcesExtension.java:715)
... 14 more
[root@Testserver bin]#
Can you give me some advice how to fix the problem?
Regards
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/643334#643334]
Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years
[jBPM] - Re: JBPM5 on JBoss AS 7
by Adam Bach
Adam Bach [http://community.jboss.org/people/heathcliff] created the discussion
"Re: JBPM5 on JBoss AS 7"
To view the discussion, visit: http://community.jboss.org/message/643589#643589
--------------------------------------------------------------
Hello,
I have just downloaded and installed demo. but start.demo didnt work, it said that jboss didnt start on time. so I tryed this:
1) set JAVA_OPTS=
2) (...)\bin>standalone.bat -b localhost -Djbpm.console.directory=C:\Download\jbpm-5.2.0.Final-installer-full\jbpm-installer\sample\evaluation\src\main\resources -Dreporting.needcontext=true
but I always get the same eror:
Caused by: java.lang.NumberFormatException: For input string: "R"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.valueOf(Integer.java:553)
at org.jboss.as.platform.mbean.PlatformMBeanUtil.<clinit>(PlatformMBeanUtil.java:55)
at org.jboss.as.platform.mbean.PlatformMBeanConstants.<clinit>(PlatformMBeanConstants.ja
at org.jboss.as.platform.mbean.PlatformMBeanResourceRegistrar.registerPlatformMBeanResou
gistrar.java:80)
at org.jboss.as.server.ServerControllerModelUtil.initOperations(ServerControllerModelUti
at org.jboss.as.server.ServerService.initModel(ServerService.java:216)
at org.jboss.as.controller.AbstractControllerService.start(AbstractControllerService.jav
at org.jboss.as.server.ServerService.start(ServerService.java:135)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerI
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
... 1 more
s.as] JBoss AS 7.0.2.Final "Arc" stopped in 8ms
. .
Does any 1 have idea on what to do? I have java 1.6 and using Windows XP.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/643589#643589]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years