2017-04-21 14 views
0

BeanでDMNエンジンを構築します。 BPMNビジネスルールタスクを持つDMNエンジンは正常に動作しますが、スタンドアロンの方法では機能しません。 Camunda 7.6はJBoss-EAP 7(Same WildFly Distribution)に移行し、モジュールは適切な場所にあると思います。しかし、次のコードはエラーメッセージをスローします。BeanでDMNエンジンを起動すると動作しません。

DmnEngine dmnEngine = DmnEngineConfiguration.createDefaultDmnEngineConfiguration().buildEngine(); 

DecisionService私はDecisionLogicから入力を読みたいので、私にとっては十分ではありません。

Caused by: java.lang.NoClassDefFoundError: javax/el/ELContext 
    at org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration.initElProvider(DefaultDmnEngineConfiguration.java:128) 
    at org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration.init(DefaultDmnEngineConfiguration.java:78) 
    at org.camunda.bpm.dmn.engine.impl.DefaultDmnEngineConfiguration.buildEngine(DefaultDmnEngineConfiguration.java:69) 
    at // DmnEngineConfiguration.createDefaultDmnEngineConfiguration().buildEngine(); 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:498) 
    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) 
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 
    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437) 
    at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82) 
    at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93) 
    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) 
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 
    at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) 
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 
    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) 
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 
    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437) 
    at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64) 
    at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83) 
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 
    at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) 
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 
    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) 
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) 
    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52) 
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 
    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) 
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340) 
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:254) 
    ... 324 more 
Caused by: java.lang.ClassNotFoundException: javax.el.ELContext from [Module "org.camunda.bpm.dmn.camunda-engine-dmn:main" from local module loader @66133adc (finder: local module finder @7bfcd12c (roots: [JBOSS_HOME]\modules, [JBOSS_HOME]\modules\system\layers\base))] 
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) 
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363) 
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351) 
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) 
    ... 357 more 

MODUL org.camunda.bpm.dmn.camunda-engine-dmn:mainあなたはELContextの実装を提供する必要が

Maven依存

<dependencyManagement> 
    <dependencies> 
     <dependency> 
      <groupId>org.camunda.bpm</groupId> 
      <artifactId>camunda-bom</artifactId> 
      <version>${camunda.version}</version> 
      <scope>import</scope> 
      <type>pom</type> 
     </dependency> 
     <dependency> 
      <groupId>org.camunda.bpm.dmn</groupId> 
      <artifactId>camunda-engine-dmn-bom</artifactId> 
      <version>${camunda.version}</version> 
      <type>pom</type> 
      <scope>import</scope> 
     </dependency> 
     ... 
    </dependencies> 
</dependencyManagement> 

<dependencies> 
    <dependency> 
     <groupId>org.camunda.bpm</groupId> 
     <artifactId>camunda-engine</artifactId> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.camunda.bpm.dmn</groupId> 
     <artifactId>camunda-engine-dmn</artifactId> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.camunda.bpm.javaee</groupId> 
     <artifactId>camunda-ejb-client</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.camunda.bpm</groupId> 
     <artifactId>camunda-engine-cdi</artifactId> 
    </dependency> 
    ... 
<dependencies> 

答えて

0

processEngineからDMNEngineを取得するには、回避策/ハックを使用します。

ProcessEngineConfiguration processEngineConfiguration = processEngine.getProcessEngineConfiguration(); 

Method method; 
DmnEngine dmnEngine; 
try { 
    method = ProcessEngineConfigurationImpl.class.getMethod("getDmnEngine"); 
    dmnEngine = (DmnEngine) method.invoke(processEngineConfiguration); 

} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException 
     | SecurityException e) { 
    e.printStackTrace(); 
} 
1

があります。

あなたの依存関係に

<dependency> 
    <groupId>de.odysseus.juel</groupId> 
    <artifactId>juel</artifactId> 
    <version>2.1.3</version> 
</dependency> 

を追加します。

+0

こんにちはジャーン、例外はまだ来ています。 camunda-engine-feel-juel-7.6.0.jarとcamunda-engine-feel-api-7.6.0.jarには、必要な依存関係が含まれていると思います。 – jklee

関連する問題