我已經包括在我的Maven項目.jar
寫這在pom.xml
:Camunda:不能轉換到(同一類)
<dependencies>
<dependency>
<groupId>org.loopingdoge.acme.model</groupId>
<artifactId>acme-model</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/acme-model.jar</systemPath>
</dependency>
</dependencies>
acme-model.jar
包含org.loopingdoge.acme.model.House
但這投
public class HouseAdder implements JavaDelegate {
public void execute(DelegateExecution delegateExecution) throws Exception {
House house = (House) delegateExecution.getVariable("house");
}
}
給我在部署在Wildfly服務器上時發生此錯誤:
18:50:20,255 ER ROR [org.camunda.bpm.engine.context](默認任務-45)ENGINE-16004關閉命令上下文時出現異常: org.loopingdoge.acme.model.House無法轉換爲org.loopingdoge.acme.model.House :java.lang.ClassCastException:org.loopingdoge.acme.model.House無法轉換爲org.loopingdoge.acme.model.House at org.loopingdoge.acme.services.HouseAdder.execute(HouseAdder.java:13)