当前位置: 首页 > 知识库问答 >
问题:

JBPM、JBoss和RestEasy的传递依赖问题?

子车勇锐
2023-03-14

我的代码似乎突破了一个我找不到的可传递依赖性问题。我正在尝试从JBoss EAP 7.3和RedHat的PAM 7.9产品(即JBPM 7.48)迁移到JBoss EAP 7.4和PAM 7.12(即JBPM 7.59),并且在我的一个servlet中遇到了这个问题,该servlet通过kie客户端API调用kie服务器。我以前读过关于JBoss的文章,也遇到过RESTEasy的问题,所以根据我的错误,我删除了标签,希望能避免任何不一致的情况,但仍然有一个奇怪的错误。

这是我得到的堆栈跟踪,为简洁起见已进行了编辑:

5:37:57,975 ERROR [io.undertow.request] (default task-4) UT005023: Exception handling request to /PamHelper/pam/helper/pamQuery: org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchFieldError: _typeCache
        at org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:82)
        at org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:346)
        at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:193)
 ...
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:590)
 ...
        at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
        at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
...
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:841)
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
        at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1280)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchFieldError: _typeCache
        at org.kie.server.api.marshalling.json.FallbackableTypeFactory.withFallbackClassLoader(FallbackableTypeFactory.java:62)
        at org.kie.server.api.marshalling.json.JSONMarshaller.configureMarshaller(JSONMarshaller.java:284)
        at org.kie.server.api.marshalling.json.JSONMarshaller.<init>(JSONMarshaller.java:180)
        at org.kie.server.api.marshalling.BaseMarshallerBuilder.build(BaseMarshallerBuilder.java:45)
        at org.kie.server.api.marshalling.MarshallerFactory.getMarshaller(MarshallerFactory.java:50)
        at org.kie.server.client.impl.AbstractKieServicesClientImpl.<init>(AbstractKieServicesClientImpl.java:84)
        at org.kie.server.client.impl.KieServicesClientImpl.<init>(KieServicesClientImpl.java:74)
        at org.kie.server.client.KieServicesFactory.newKieServicesClient(KieServicesFactory.java:101)

这是我的依赖关系树。我猜RestEasy依赖关系中存在冲突,或者(从错误消息中)初始化封送时出现了一些奇怪的问题;我的代码或JBPM源代码中都没有typeCache字段。

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ PamServer ---
[INFO] com.gok.ams:PamServer:war:1.0-SNAPSHOT
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.12.3:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.12.3:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-core:jar:2.12.3:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.12.3:compile
[INFO] +- jakarta.persistence:jakarta.persistence-api:jar:2.2.3:compile
[INFO] +- com.gok.ams:ams-pam-util:jar:0.0.12-SNAPSHOT:compile
[INFO] |  +- org.hibernate:hibernate-core:jar:5.5.8.Final-redhat-00001:compile
[INFO] |  |  +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] |  |  +- org.javassist:javassist:jar:3.27.0.GA-redhat-00001:compile
[INFO] |  |  +- net.bytebuddy:byte-buddy:jar:1.11.12.redhat-00002:compile
[INFO] |  |  +- antlr:antlr:jar:2.7.7.redhat-7:compile
[INFO] |  |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.1.1.Final:compile
[INFO] |  |  +- org.jboss:jandex:jar:2.2.3.Final-redhat-00001:compile
[INFO] |  |  +- com.fasterxml:classmate:jar:1.5.1.redhat-00001:compile
[INFO] |  |  +- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  |  +- org.hibernate.common:hibernate-commons-annotations:jar:5.1.2.Final-redhat-00003:compile
[INFO] |  |  +- javax.xml.bind:jaxb-api:jar:2.3.1.redhat-00001:compile
[INFO] |  |  \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1.redhat-00002:compile
[INFO] |  |     +- org.glassfish.jaxb:txw2:jar:2.3.1.redhat-00002:compile
[INFO] |  |     +- com.sun.istack:istack-commons-runtime:jar:3.0.7.redhat-00001:compile
[INFO] |  |     +- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] |  |     \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
[INFO] |  \- org.apache.commons:commons-lang3:jar:3.12.0:compile
[INFO] +- com.gok.ams:ams-pam-workitemhandlers:jar:2.0.6.41-SNAPSHOT:compile
[INFO] |  \- com.gok.ams:amsObjectModel:jar:0.0.65-SNAPSHOT:compile
[INFO] +- org.jbpm:jbpm-workitems-core:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  +- org.drools:drools-core:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.kie.soup:kie-soup-xstream:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.drools:drools-core-reflective:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  \- org.kie:kie-memory-compiler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  \- org.drools:drools-core-dynamic:jar:7.59.0.Final-redhat-00006:runtime
[INFO] |  +- org.jbpm:jbpm-flow:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.drools:drools-mvel:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.drools:drools-serialization-protobuf:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.kie.soup:kie-soup-commons:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.kie.soup:kie-soup-project-datamodel-commons:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  \- org.kie.soup:kie-soup-project-datamodel-api:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.kie:kie-dmn-feel:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.antlr:antlr4-runtime:jar:4.8.0.redhat-00002:compile
[INFO] |  |  |  +- com.github.javaparser:javaparser-core:jar:3.13.10:compile
[INFO] |  |  |  +- org.drools:drools-mvel-parser:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  \- ch.obermuhlner:big-math:jar:2.0.1:compile
[INFO] |  |  +- org.kie:kie-dmn-core:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-dmn-backend:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.drools:drools-ruleunit:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.drools:drools-alphanetwork-compiler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  \- org.jpmml:pmml-model:jar:1.5.1:compile
[INFO] |  |  |     \- org.jpmml:pmml-agent:jar:1.5.1:compile
[INFO] |  |  +- com.google.protobuf:protobuf-java:jar:3.6.1:compile
[INFO] |  |  \- org.mvel:mvel2:jar:2.4.12.Final-redhat-00001:compile
[INFO] |  +- org.jbpm:jbpm-bpmn2:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.drools:drools-compiler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.drools:drools-ecj:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  \- org.jbpm:jbpm-flow-builder:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  +- org.kie:kie-internal:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  +- org.kie:kie-dmn-api:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  \- org.kie:kie-dmn-model:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  +- commons-io:commons-io:jar:2.7.0.redhat-00003:compile
[INFO] |  +- org.apache.commons:commons-exec:jar:1.3:compile
[INFO] |  \- org.antlr:ST4:jar:4.0.7:compile
[INFO] |     \- org.antlr:antlr-runtime:jar:3.5:compile
[INFO] |        \- org.antlr:stringtemplate:jar:3.2.1:compile
[INFO] +- org.jbpm:jbpm-services-api:jar:7.59.0.Final-redhat-00006:compile
[INFO] +- org.kie:kie-api:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  \- org.kie.soup:kie-soup-maven-support:jar:7.59.0.Final-redhat-00006:compile
[INFO] +- org.kie.server:kie-server-client:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  +- org.optaplanner:optaplanner-core:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.drools:drools-canonical-model:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.drools:drools-model-compiler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  \- org.drools:drools-mvel-compiler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.apache.commons:commons-math3:jar:3.4.1.redhat-3:compile
[INFO] |  |  +- org.reflections:reflections:jar:0.9.11.redhat-00004:compile
[INFO] |  |  |  \- com.google.guava:guava:jar:25.0.0.redhat-1:compile
[INFO] |  |  |     +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] |  |  |     +- org.checkerframework:checker-compat-qual:jar:2.0.0:compile
[INFO] |  |  |     +- com.google.errorprone:error_prone_annotations:jar:2.1.3:compile
[INFO] |  |  |     +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] |  |  |     \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
[INFO] |  |  \- com.thoughtworks.xstream:xstream:jar:1.4.18.redhat-00001:compile
[INFO] |  |     \- io.github.x-stream:mxparser:jar:1.2.2:compile
[INFO] |  |        \- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] |  +- org.kie.server:kie-server-api:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.optaplanner:optaplanner-persistence-xstream:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  \- org.optaplanner:optaplanner-persistence-common:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- org.optaplanner:optaplanner-persistence-jaxb:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.12.1.redhat-00002:compile
[INFO] |  |  +- org.kie:kie-pmml-dependencies:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-api:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-commons:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  |  \- org.apache.commons:commons-text:jar:1.9:compile
[INFO] |  |  |  +- org.kie:kie-pmml-compiler-api:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-compiler-core:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-compiler-commons:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-evaluator-api:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-evaluator-core:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-evaluator-assembler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-kie-internal:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-drools-common:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-regression-model:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-regression-compiler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-regression-evaluator:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-drools-tree-model:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-drools-tree-compiler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-drools-tree-evaluator:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  |  \- org.kie:kie-pmml-compiler-api:jar:tests:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-drools-scorecard-model:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-drools-scorecard-compiler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-drools-scorecard-evaluator:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-mining-model:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-mining-compiler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-mining-evaluator:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-clustering-model:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  +- org.kie:kie-pmml-models-clustering-compiler:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  |  \- org.kie:kie-pmml-models-clustering-evaluator:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  \- org.drools:kie-pmml:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  +- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6.redhat-00001:compile
[INFO] |  +- org.kie.server:kie-server-common:jar:7.59.0.Final-redhat-00006:compile
[INFO] |  |  \- jakarta.servlet:jakarta.servlet-api:jar:4.0.3.redhat-00002:compile
[INFO] |  +- jakarta.jms:jakarta.jms-api:jar:2.0.3.redhat-00001:compile
[INFO] |  +- com.sun.xml.bind:jaxb-core:jar:2.3.0.redhat-1:compile
[INFO] |  +- com.sun.xml.bind:jaxb-impl:jar:2.3.0.redhat-1:compile
[INFO] |  \- org.slf4j:jcl-over-slf4j:jar:1.7.30.redhat-00001:runtime
[INFO] +- org.slf4j:slf4j-api:jar:1.7.26:compile
[INFO] +- org.jboss.resteasy:resteasy-jaxrs:jar:3.0.14.Final:compile
[INFO] |  +- org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.0_spec:jar:1.0.0.Final:compile
[INFO] |  +- org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:jar:1.0.0.Final:compile
[INFO] |  +- javax.activation:activation:jar:1.1.1:compile
[INFO] |  +- org.apache.httpcomponents:httpclient:jar:4.3.6:compile
[INFO] |  |  +- org.apache.httpcomponents:httpcore:jar:4.3.3:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.1.3:compile
[INFO] |  +- net.jcip:jcip-annotations:jar:1.0:compile
[INFO] |  \- org.jboss.logging:jboss-logging:jar:3.1.4.GA:compile
[INFO] +- org.jboss.resteasy:resteasy-servlet-initializer:jar:6.0.0.Final:compile
[INFO] |  +- org.jboss.resteasy:resteasy-core:jar:6.0.0.Final:compile
[INFO] |  |  +- jakarta.annotation:jakarta.annotation-api:jar:2.0.0:compile
[INFO] |  |  +- jakarta.xml.bind:jakarta.xml.bind-api:jar:3.0.1:compile
[INFO] |  |  +- jakarta.activation:jakarta.activation-api:jar:2.0.0:compile
[INFO] |  |  +- jakarta.validation:jakarta.validation-api:jar:3.0.0:compile
[INFO] |  |  \- com.ibm.async:asyncutil:jar:0.1.0:compile
[INFO] |  \- org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_3.0_spec:jar:1.0.0.Final:compile
[INFO] +- org.jboss.resteasy:resteasy-client:jar:6.0.0.Final:compile
[INFO] |  +- org.jboss.resteasy:resteasy-client-api:jar:6.0.0.Final:compile
[INFO] |  +- org.jboss.resteasy:resteasy-core-spi:jar:6.0.0.Final:compile
[INFO] |  +- commons-codec:commons-codec:jar:1.15:compile
[INFO] |  \- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] +- junit:junit:jar:4.13.2:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] \- org.mockito:mockito-all:jar:1.10.16:test

这是我pom.xml的依赖部分,与测试无关。

    <properties>
        <version.org.kie>7.59.0.Final-redhat-00006</version.org.kie>
        <!--version.org.kie>7.48.0.Final-redhat-00004</version.org.kie-->
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <version.org.slf4j>1.7.26</version.org.slf4j>
        <jax-rs-version>3.0.14.Final</jax-rs-version>
        <version.object.model>0.0.65-SNAPSHOT</version.object.model>
        <version.utils>0.0.12-SNAPSHOT</version.utils>
        <version.workItemHandlers>2.0.6.41-SNAPSHOT</version.workItemHandlers>
        <version.jakarta.persistence-api>2.2.3</version.jakarta.persistence-api>
        <version.resteasy>6.0.0.Final</version.resteasy>
        <!--version.jackson>2.12.4.redhat-00001</version.jackson-->
        <version.jackson>2.12.3</version.jackson>
    </properties>

    <dependencies>  
     <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>${version.jackson}</version> 
      </dependency>
      <dependency>
         <groupId>com.fasterxml.jackson.core</groupId>
         <artifactId>jackson-databind</artifactId>
        <version>${version.jackson}</version> 
         <!--scope>provided</scope-->
       </dependency>    
      <dependency>
         <groupId>jakarta.persistence</groupId>
         <artifactId>jakarta.persistence-api</artifactId>
         <version>${version.jakarta.persistence-api}</version>
      </dependency>
      <dependency>
        <groupId>com.gok.ams</groupId>
        <artifactId>ams-pam-util</artifactId>
        <version>${version.utils}</version>
      </dependency>
      <dependency>
        <artifactId>ams-pam-workitemhandlers</artifactId>
        <version>${version.workItemHandlers}</version>
        <groupId>com.gok.ams</groupId>
      </dependency>       
      <dependency>  
          <groupId>org.jbpm</groupId>
          <artifactId>jbpm-workitems-core</artifactId>
          <version>${version.org.kie}</version>
      </dependency>
      <dependency>
         <groupId>org.jbpm</groupId>
         <artifactId>jbpm-services-api</artifactId>
         <version>${version.org.kie}</version>
      </dependency> 
      <dependency>
        <groupId>org.kie</groupId>
        <artifactId>kie-api</artifactId>
        <version>${version.org.kie}</version>
      </dependency>
      <dependency>
            <groupId>org.kie.server</groupId>
            <artifactId>kie-server-client</artifactId>
            <version>${version.org.kie}</version>
      </dependency>                     
    
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-api</artifactId>
         <version>${version.org.slf4j}</version>
      </dependency>
      <dependency>
          <groupId>org.jboss.resteasy</groupId>
          <artifactId>resteasy-jaxrs</artifactId>
          <version>3.0.14.Final</version> 
      </dependency> 
      <dependency>
          <groupId>org.jboss.resteasy</groupId>
          <artifactId>resteasy-servlet-initializer</artifactId>
          <version>${version.resteasy}</version> 
          <exclusions>
                <exclusion>
                        <artifactId>resteasy-jaxrs</artifactId>
                        <groupId>org.jboss.resteasy</groupId>
                </exclusion>
          </exclusions>
      </dependency>
      <dependency>
          <groupId>org.jboss.resteasy</groupId>
          <artifactId>resteasy-client</artifactId>
          <version>${version.resteasy}</version> 
      </dependency>
        

我能想到的另一种可能性是,这与PAM中可能尚未解决的问题有关;我已经从Java 11降级到Java 8,使我在笔记本电脑上运行的代码看起来更像我公司的集成环境。

共有1个答案

羊昊苍
2023-03-14

您依赖于两个不同版本的RESTEasy。您不想使用6.0.0。最终版本是Jakarta REST 3.0,即Jakarta EE 9.1。您想使用最新的3.15. x版本,因为这是JBoss EAP 7.4使用的版本。您还想确保将这些依赖项标记为

我认为您也不需要org.jboss.resteasy: resteasy-servlet-初始化器

 类似资料:
  • 在应用中,您希望使用不同的类来处理不同的任务以保持代码的简洁。我们把这些类称为 依赖。如何将这些依赖关系传递给将在后台任务调用的方法呢? 当您在后台任务中调用静态方法时,仅限于应用程序的静态上下文,这需要您使用以下获取依赖关系的模式: 通过 new 手动实例化依赖 服务定位器模式 抽象工厂模式 或 建设者模式 单例模式 然而,所有这些模式使您的应用程序的单元可测试性方面变得非常复杂。为了解决这个问

  • 我是jBPM的新手。我正在测试jBPM 7.32.0。最终版本 安装程序(ant install.demo)已经设置了环境。 我正在尝试开发和测试自定义工作项处理程序(如中所示https://www.youtube.com/watch?v=_XIZ0KRTahE)它使用oracle jdbc驱动程序 我在jbpm控制台中创建了:一个新的工作项定义(CustomTask),使用自定义任务的新业务流程

  • 主要内容:依赖传递,依赖范围,依赖范围对传递依赖的影响,依赖调节Maven 依赖传递是 Maven 的核心机制之一,它能够一定程度上简化 Maven 的依赖配置。本节我们将详细介绍依赖传递及其相关概念。 依赖传递 如下图所示,项目 A 依赖于项目 B,B 又依赖于项目 C,此时 B 是 A 的直接依赖,C 是 A 的间接依赖。 Maven 的依赖传递机制是指:不管 Maven 项目存在多少间接依赖,POM 中都只需要定义其直接依赖,不必定义任何间接依赖,Mav

  • 本文向大家介绍DBMS中的传递依赖,包括了DBMS中的传递依赖的使用技巧和注意事项,需要的朋友参考一下 什么是传递依存关系 当间接关系引起功能依赖性时,称为传递依赖性。 如果P-> Q且Q-> R为真,则P-> R为传递依赖。 要实现3NF,请消除传递依赖性。 示例 <电影列表> Movie_ID Listing_ID Listing_Type DVD_价格($) M08 L09 犯罪 180 M

  • 问题内容: 我正在处理一个表,该表具有一个复合主键,该主键由1NF形式的两个属性(总共10个)组成。 在我的情况下,全功能的依赖项涉及依赖项, 这 依赖于我的主键中的 两个 属性。 部分依赖项依赖于主键中的任一属性。 传递依赖关系涉及功能依赖关系中的两个或多个非关键属性,其中一个非关键属性依赖于我的主键中的某个关键属性。 将可传递的依赖关系从表中拉出,似乎 在 规范化 之后 执行了此操作,但是我的

  • 我正在使用Spring Boot 1.4.0和Spring-Cloud-scuth,这里是我的pom: 这是我的依赖关系树: 看起来SpringBootSleuth已经覆盖了依赖项,因为SpringBoot1.4使用Spring4.3。2.释放。我不需要它,如何避免这种行为??