[jBPM] - JPAKnowledgeService Exception
by Jonathan Albornoz
Jonathan Albornoz [https://community.jboss.org/people/betoflint] created the discussion
"JPAKnowledgeService Exception"
To view the discussion, visit: https://community.jboss.org/message/790106#790106
--------------------------------------------------------------
Hi people, i'm running the project that comes with the book of jbpm development guide, the chapter 8.
I run everything, i have configured jbpm 5.4 with jboss 7.1.1 and oracle like my db persistence.
but when i want runit appear the next exception. Any idea why??
The code where appear the exception is the next.
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(new ClassPathResource("process-async-interactions.bpmn"), ResourceType.BPMN2);
if (kbuilder.hasErrors()) {
for (KnowledgeBuilderError error : kbuilder.getErrors()) {
System.out.println(">>> Error:" + error.getMessage());
}
System.out.println(">>> Hay problemas con el archivo .bpmn! ");
}
KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
Environment env = EnvironmentFactory.newEnvironment();
EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.runtime");
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
env.set(EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager());
// Let's create a Persistence Knowledge Session
System.out.println(" >>> Let's create a Persistent Knowledge Session");
StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env); //here generate the exception.
The exception code....
Exception in thread "main" java.lang.NoSuchMethodError: org.drools.SessionConfiguration.addDefaultProperties(Ljava/util/Properties;)V
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.mergeConfig(KnowledgeStoreServiceImpl.java:147)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:66)
at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
at com.salaboy.jbpm5.correr.crearProceso(correr.java:90)
at com.salaboy.jbpm5.correr.main(correr.java:41)
thanks!!!!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/790106#790106]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months
http connector monitoring
by Fernando Lozano
Hi there,
On previous AS and EAP releases I ued to monitor many performance
metrics, such as busy http connector threads using JMX. On AS 7 and EAP
6 I'm supposed to get those from the CLI or its REST API, but I can't
find most metrics I used to get through JMX.
Among the "essential" metrics (http thread pools, web context requests,
ejb instance pool, database connections and heap usage) I can find just
database connection pool usage, and of course heap usage as those are
provided by the JVM and not JBoss AS itself.
If it's just me and those are actually availabe through the cli, can
someone point me to some examples about which resource path and
attributes I should be looking for?
[]s, Fernando Lozano
11 years, 5 months
[JNDI and Naming] - JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.db
by Nicola Modugno
Nicola Modugno [https://community.jboss.org/people/nichisoft] created the discussion
"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.db"
To view the discussion, visit: https://community.jboss.org/message/807444#807444
--------------------------------------------------------------
*14:52:31,473 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.dbjboss.naming.context.java.module.s3ar-ear.\"s3ar-ejb-0.0.1-SNAPSHOT\".env.dbMissing[jboss.naming.context.java.dbjboss.naming.context.java.module.s3ar-ear.\"s3ar-ejb-0.0.1-SNAPSHOT\".env.db]"]}}}*
*persistence.xml*
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns=" http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence"
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance"
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"
version="1.0">
<persistence-unit name="db">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/S3arDataSource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.max_fetch_depth" value="2" />
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />
<property name="hibernate.transaction.auto_close_session" value="false" />
<property name="hibernate.current_session_context_class" value="jta" />
<property name="hibernate.archive.autodetection" value="class"/>
<property name="hibernate.cache.use_second_level_cache" value="true"/>
<property name="hibernate.cache.use_query_cache" value="true"/>
<property name="hibernate.generate_statistics" value="true"/>
<property name="hibernate.cache.use_structured_entries" value="true"/>
</properties>
</persistence-unit>
</persistence>
*module.xml*
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="oracle.jdbc">
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
*standalone.xml*
<datasource jndi-name="java:jboss/datasources/S3arDataSource" pool-name="S3arDS" enabled="true" use-java-context="true" jta="true" use-ccm="true">
<connection-url>jdbc:oracle:oci:@CUPS3AR</connection-url>
<driver>OracleJDBCDriver</driver>
<security>
<user-name>USER_S3AR_EJB</user-name>
<password>EUROPA</password>
</security>
</datasource>
<drivers>
<driver name="OracleJDBCDriver" module="oracle.jdbc">
<xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
</driver>
</drivers>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/807444#807444]
Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
11 years, 5 months