-
1. Re: jBPM5.3 and EJB3
salaboy21 Apr 9, 2012 7:19 AM (in response to ous2k)yes.. for sure ..
You need to ask more specific quesitons.. your question is extremely generic and the title says jBPM5.3 and EJB3 and your question is about Drools.. which makes me think that you are getting some strange problems with dependencies missing in your classpath.
Cheers
-
2. Re: jBPM5.3 and EJB3
ous2k Apr 9, 2012 8:03 AM (in response to salaboy21)i've a sample code which invokes drools/jbpm which is working correctly using static main method
i've made a sample jsf page which invokes a hello EJB it is working correctly
now i'd like to invoke the EJB which runs the same code(invoke drools rules )
when i made the change in EJB i'm getting this msg , first i thougth it is not possible to use drools/jbpm with EJB,now i've the answer
-Drools Libraries i'm using drools-distribution-5.3.0.Final binaries
code:
package com.himilco.ocana.workflow.core.bo;
import java.util.Date;
import javax.ejb.EJB;
import javax.ejb.Stateful;
import javax.ejb.Stateless;
import org.drools.KnowledgeBase;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderError;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
import org.drools.runtime.StatefulKnowledgeSession;
import com.himilco.ocana.workflow.core.bo.model.OperatorInterventionStateBean;
import com.himilco.ocana.workflow.core.dao.entities.Ticket;
@Stateful
public class OperatorBO {
private static String DLRFileAssociated = "OperatorIntervention.drl";
public void processOperatorInterventionChoice(String choice) {
System.out.println("processing operator choice...");
System.out.println("operator choice is: " + choice);
invokeOperatorChoiceRules();
}
public static void invokeOperatorChoiceRules() {
try {
StatefulKnowledgeSession ksession = createKnowledgeSession();
KnowledgeRuntimeLoggerFactory.newConsoleLogger(ksession);
// Fireing DISPATCH rule
Ticket ticket = new Ticket();
ticket.setStatus("NCPCOM");
ticket.setContent("testing content");
ticket.setStartTime(new Date());
ticket.setIdTicket(1);
ksession.insert(ticket);
MailManager mailManager = new MailManager();
ksession.insert(mailManager);
OperatorInterventionStateBean oi = new OperatorInterventionStateBean();
oi.setCheckCashTask(true);
oi.setRestartTask(true);
ksession.insert(oi);
ksession.fireAllRules();
} catch (Throwable t) {
t.printStackTrace();
}
}
private static StatefulKnowledgeSession createKnowledgeSession() {
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
.newKnowledgeBuilder();
kbuilder.add(
ResourceFactory.newClassPathResource(getDLRFileAssociated()),
ResourceType.DRL);
if (kbuilder.hasErrors()) {
if (kbuilder.getErrors().size() > 0) {
for (KnowledgeBuilderError kerror : kbuilder.getErrors()) {
System.err.println(kerror);
}
}
}
KnowledgeBase kbase = ((KnowledgeBuilder) kbuilder).newKnowledgeBase();
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
return ksession;
}
public static String getDLRFileAssociated() {
return DLRFileAssociated;
}
public void setDLRFileAssociated(String dLRFileAssociated) {
DLRFileAssociated = dLRFileAssociated;
}
}
error Msg:
13:00:11,197 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "earExt2.ear"
13:00:11,383 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "ocanaExt2.war"
13:00:11,384 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "ocana-coreExt2.jar"
13:00:11,729 WARN [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Tomcat6InjectionProvider:org.apache.catalina.util.DefaultAnnotationProcessor' for service type 'com.sun.faces.spi.injectionprovider'
13:00:11,731 WARN [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015893: Encountered invalid class name 'com.sun.faces.vendor.Jetty6InjectionProvider:org.mortbay.jetty.plus.annotation.InjectionCollection' for service type 'com.sun.faces.spi.injectionprovider'
13:00:11,890 INFO [org.jboss.as.jpa] (MSC service thread 1-8) JBAS011401: Read persistence.xml for PU_OCANA
13:00:11,920 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.subunit."earExt2.ear"."ocana-coreExt2.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."earExt2.ear"."ocana-coreExt2.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "ocana-coreExt2.jar" of deployment "earExt2.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
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]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]
Caused by: java.lang.RuntimeException: Error getting reflective information for class com.himilco.ocana.workflow.core.bo.OperatorBO with ClassLoader ModuleClassLoader for Module "deployment.earExt2.ear.ocana-coreExt2.jar:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:70)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:117)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:54)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
Caused by: java.lang.NoClassDefFoundError: org/drools/event/KnowledgeRuntimeEventManager
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0]
at java.lang.Class.privateGetDeclaredFields(Class.java:2308) [rt.jar:1.7.0]
at java.lang.Class.getDeclaredFields(Class.java:1760) [rt.jar:1.7.0]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.drools.event.KnowledgeRuntimeEventManager from [Module "deployment.earExt2.ear.ocana-coreExt2.jar:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
... 15 more
13:00:12,210 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "earExt2.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.subunit.\"earExt2.ear\".\"ocana-coreExt2.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"earExt2.ear\".\"ocana-coreExt2.jar\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"ocana-coreExt2.jar\" of deployment \"earExt2.ear\""}}
13:00:12,210 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment ocana-coreExt2.jar in 3ms
13:00:12,230 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment ocanaExt2.war in 19ms
13:00:12,231 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015877: Stopped deployment earExt2.ear in 21ms
13:00:12,231 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.subunit."earExt2.ear"."ocana-coreExt2.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."earExt2.ear"."ocana-coreExt2.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "ocana-coreExt2.jar" of deployment "earExt2.ear"
13:00:12,231 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.deployment.subunit.\"earExt2.ear\".\"ocana-coreExt2.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"earExt2.ear\".\"ocana-coreExt2.jar\".POST_MODULE: Failed to process phase POST_MODULE of subdeployment \"ocana-coreExt2.jar\" of deployment \"earExt2.ear\""}}}}
I'm using:ide:eclipse 3.7 Indigo
AS:Jboss7
db:mysql 5
gui:JSF/PrimeFaces
bo:EJB3.1
Drools/jbpm 5.3
-
3. Re: jBPM5.3 and EJB3
salaboy21 Apr 9, 2012 8:37 AM (in response to ous2k)Two options here:
1) you are missing a dep inside your application: org/drools/event/KnowledgeRuntimeEventManager
2) there is a problem with that class inside the container. Can you check that you are including the jar that contains that class/interface?
Cheers
-
4. Re: jBPM5.3 and EJB3
ous2k Apr 9, 2012 9:27 AM (in response to salaboy21)Hi,
i've checked the project
For Option2: the two projects are related with an ear and the build path of the web project it requires ejb project shall i add some thing else i'm using EJB3.1 there is no iterface.
For Option1: i checked the log the No class def exists in knowledge-api-5.3.0.Beta1.jar but no change
shall i transform the two projects to maven one to resolve this problem depandencies ?
if it is the case the two projects should be modules under a parent one or the web one if refrering the EjbProject like i'm using
Cheers
-
-
6. Re: jBPM5.3 and EJB3
ous2k Apr 10, 2012 8:24 AM (in response to salaboy21)i've changed my project to maven one but i'm getting this execption i've read about it is eclipse plugins dependecy jdt, i've add it but i staill have exeption
it seems that there are others JDT eclipse dependency can you give some help please:
ide:netbeans
OS:win7
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>ocana</artifactId>
<groupId>com.mycompany</groupId>
<version>0.0.9-SNAPSHOT</version>
</parent>
<groupId>com.mycompany</groupId>
<artifactId>ocana-web</artifactId>
<version>0.0.9-SNAPSHOT</version>
<packaging>war</packaging>
<name>ocana-web</name>
<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server>
</properties>
<repositories>
<!-- JBOSS REPOSITORY-->
<repository>
<id>JBoss Repo</id>
<url>http://repository.jboss.com/maven2</url>
</repository>
<repository>
<id>JBoss</id>
<name>JBoss repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
</repository>
<repository>
<url>http://download.java.net/maven/2</url>
<id>hibernate-support</id>
<layout>default</layout>
<name>Repository for library Library[hibernate-support]</name>
</repository>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
<repository>
<url>http://download.java.net/maven/2/</url>
<id>jsf20</id>
<layout>default</layout>
<name>Repository for library Library[jsf20]</name>
</repository>
<repository>
<url>http://download.eclipse.org/rt/eclipselink/maven.repo/</url>
<id>eclipselink</id>
<layout>default</layout>
<name>Repository for library Library[eclipselink]</name>
</repository>
</repositories>
<dependencies>
<!-- ocana-EJB module -->
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>ocana-ejb</artifactId>
<version>0.0.9-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>hibernate-core</artifactId>
<groupId>org.hibernate</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Persistence Dependencies -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.0.Final</version>
<exclusions>
<exclusion>
<artifactId>hibernate-core</artifactId>
<groupId>org.hibernate</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>4.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-testing</artifactId>
<version>4.1.1.Final</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.16.1-GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-api</artifactId>
<version>1.0.0-cr-3</version>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-impl-base</artifactId>
<version>1.0.0-cr-3</version>
</dependency>
<!-- Validation-->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<!--EJB3 persistance -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
<version>1.0.1.GA</version>
</dependency>
<!--MySQL Driver-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<!-- Transaction Management -->
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.0.1B</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.1_spec</artifactId>
<version>1.0.1.Final</version>
</dependency>
<!-- Logging-->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.1.0.GA</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.6.4</version>
</dependency>
<!--Test-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
</dependency>
<!-- WEB -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<!-- primefaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.1.1</version>
<!-- <scope>compile</scope> -->
</dependency>
<!-- JSF 2 -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.2</version>
</dependency>
<!-- JSTL 1.1 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<!-- taglib -->
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<type>maven-plugin</type>
</dependency>
<!--- drools -->
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
<version>3.4.2.v_883_R34x</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>knowledge-api</artifactId>
<version>5.4.0.Beta2</version>
</dependency>
<!-- Internal dependencies -->
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>5.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>5.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-decisiontables</artifactId>
<version>5.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-templates</artifactId>
<version>5.2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.swinglabs</groupId>
<artifactId>swing-layout</artifactId>
<version>1.0.3</version>
</dependency>
</dependencies>
<build>
<!-- <pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
Needed for runExamples.sh and runExamples.bat
<addClasspath>true</addClasspath>
<classpathPrefix>../../binaries/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>-->
<plugins>
<!-- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<additionalBuildcommands>
<buildcommand>org.drools.eclipse.droolsbuilder</buildcommand>
</additionalBuildcommands>
</configuration>
</plugin>-->
<!-- eclipse plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.5</version>
<configuration>
<!--<downloadSources>true</downloadSources>-->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<executable>java</executable>
<!-- only waltz12 is configured at the moment -->
<!-- TODO waltz50, manners64 and manners128 -->
<arguments>
<argument>-Xms1024M</argument>
<argument>-Xmx1024M</argument>
<argument>-cp</argument>
<classpath/>
<argument>org.drools.benchmark.waltz.WaltzBenchmark</argument>
<argument>waltz12.dat</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>
Error:
run:
org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:277)
at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:262)
at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:175)
at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:153)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:252)
at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:180)
at org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilder(KnowledgeBuilderFactoryServiceImpl.java:34)
at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:46)
at com.himilco.ocana.workflow.core.bo.sm.ServiceNotifiedClient.createKnowledgeSession(ServiceNotifiedClient.java:37)
at com.himilco.ocana.workflow.core.bo.sm.ServiceNotifiedClient.main(ServiceNotifiedClient.java:21)
Caused by: org.drools.RuntimeDroolsException: value '1.7' is not a valid language level
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.getDefaultLanguageLevel(JavaDialectConfiguration.java:161)
at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:56)
at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:273)
... 9 more
BUILD SUCCESSFUL (total time: 1 second)
-
7. Re: jBPM5.3 and EJB3
ous2k Apr 10, 2012 11:16 AM (in response to ous2k)it is running no drools pb sill hibernate problem
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>ocana</artifactId>
<groupId>com.mycompany</groupId>
<version>0.0.9-SNAPSHOT</version>
</parent>
<groupId>com.mycompany</groupId>
<artifactId>ocana-web</artifactId>
<version>0.0.9-SNAPSHOT</version>
<packaging>war</packaging>
<name>ocana-web</name>
<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server>
<drools.version>5.4.0-SNAPSHOT</drools.version>
<jbpm.version>5.2.0-SNAPSHOT</jbpm.version>
<hornetq.version>2.2.2.Final</hornetq.version>
<infinispan.version>4.2.1.FINAL</infinispan.version>
<netty.version>3.2.0.Final</netty.version>
<lwjgl.version>2.6</lwjgl.version>
</properties>
<repositories>
<!-- JBOSS REPOSITORY-->
<repository>
<id>JBoss Repo</id>
<url>http://repository.jboss.com/maven2</url>
</repository>
<repository>
<id>JBoss</id>
<name>JBoss repository</name>
<url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
</repository>
<repository>
<url>http://download.java.net/maven/2</url>
<id>hibernate-support</id>
<layout>default</layout>
<name>Repository for library Library[hibernate-support]</name>
</repository>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
<repository>
<url>http://download.java.net/maven/2/</url>
<id>jsf20</id>
<layout>default</layout>
<name>Repository for library Library[jsf20]</name>
</repository>
<repository>
<url>http://download.eclipse.org/rt/eclipselink/maven.repo/</url>
<id>eclipselink</id>
<layout>default</layout>
<name>Repository for library Library[eclipselink]</name>
</repository>
</repositories>
<dependencies>
<!-- ocana-EJB module -->
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>ocana-ejb</artifactId>
<version>0.0.9-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>hibernate-core</artifactId>
<groupId>org.hibernate</groupId>
</exclusion>
<exclusion>
<artifactId>ejb3-persistence</artifactId>
<groupId>org.hibernate</groupId>
</exclusion>
<exclusion>
<artifactId>jta</artifactId>
<groupId>javax.transaction</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Persistence Dependencies -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.0.Final</version>
<exclusions>
<exclusion>
<artifactId>hibernate-core</artifactId>
<groupId>org.hibernate</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>4.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-testing</artifactId>
<version>4.1.1.Final</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.16.1-GA</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-api</artifactId>
<version>1.0.0-cr-3</version>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap</groupId>
<artifactId>shrinkwrap-impl-base</artifactId>
<version>1.0.0-cr-3</version>
</dependency>
<!-- Validation-->
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<!--EJB3 persistance -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
<version>1.0.2.GA</version>
</dependency>
<!--MySQL Driver-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
<!-- Transaction Management -->
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.1_spec</artifactId>
<version>1.0.1.Final</version>
</dependency>
<!-- Logging-->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.1.0.GA</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.6.4</version>
</dependency>
<!--Test-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
</dependency>
<!-- WEB -->
<dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3_min</artifactId>
<version>1.1.4c</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<!-- primefaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.1.1</version>
<!-- <scope>compile</scope> -->
</dependency>
<!-- JSF 2 -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.2</version>
</dependency>
<!-- JSTL 1.1 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<!-- taglib -->
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<type>maven-plugin</type>
</dependency>
<!--- drools -->
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
<version>3.4.2.v_883_R34x</version>
</dependency>
<!--drools-->
<dependency>
<groupId>org.drools</groupId>
<artifactId>knowledge-api</artifactId>
<version>5.4.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-core</artifactId>
<version>5.4.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>5.4.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-persistence-jpa</artifactId>
<version>5.4.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-grid-impl</artifactId>
<version>5.4.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-spring</artifactId>
<version>5.4.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-flow</artifactId>
<version>${jbpm.version}</version>
</dependency>
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-flow-builder</artifactId>
<version>${jbpm.version}</version>
</dependency>
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-bpmn2</artifactId>
<version>${jbpm.version}</version>
</dependency>
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-human-task</artifactId>
<version>${jbpm.version}</version>
<exclusions>
<exclusion>
<artifactId>xpp3_min</artifactId>
<groupId>xpp3</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-persistence-jpa</artifactId>
<version>${jbpm.version}</version>
</dependency>
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-bam</artifactId>
<version>${jbpm.version}</version>
</dependency>-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.5</version>
<configuration>
<additionalBuildcommands>
<buildcommand>org.drools.eclipse.droolsbuilder</buildcommand>
</additionalBuildcommands>
</configuration>
</plugin>
<!-- eclipse plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<executable>java</executable>
<!-- only waltz12 is configured at the moment -->
<!-- TODO waltz50, manners64 and manners128 -->
<arguments>
<argument>-Xms1024M</argument>
<argument>-Xmx1024M</argument>
<argument>-cp</argument>
<classpath/>
<argument>org.drools.benchmark.waltz.WaltzBenchmark</argument>
<argument>waltz12.dat</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>