无法创建构造函数::Kie工作台



我使用Kie workbench 6.3.0来创建规则。我试图在流模式下运行规则。我在kee -wb中创建了一个项目,并在其中创建了kee -base。为此,我们使用了kie服务器运行时。这是生成的kmodule代码:

<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <kbase name="myKieBase" default="false" eventProcessingMode="stream" equalsBehavior="identity" packages="*"/>
</kmodule>

下面是persistence.xml文件:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
    <persistence-unit name="com.sample:EventBusinessRules:2.6" transaction-type="JTA">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
        <class>com.sample.EventData</class>
        <exclude-unlisted-classes>true</exclude-unlisted-classes>
        <properties>
            <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
            <property name="hibernate.max_fetch_depth" value="3"/>
            <property name="hibernate.hbm2ddl.auto" value="update"/>
            <property name="hibernate.show_sql" value="false"/>
            <property name="hibernate.id.new_generator_mappings" value="false"/>
            <property name="hibernate.transaction.jta.platform" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform"/>
        </properties>
    </persistence-unit>
</persistence>

从Kie WB部署项目时,我得到以下错误

Deployment of unit com.sample:SampleBusinessRules:2.7 failed: [Error: could not create constructor: null] [Near : {... new org.drools.persistence.jpa.mar ....}] ^ [Line: 1, Column: 5]

请帮我解决这个错误谢谢你

我从key -deployment-descriptor.xml中删除了编组标记,并且在部署项目时没有出现任何错误。

<marshalling-strategy>
                <resolver>mvel</resolver>
                <identifier>new org.drools.persistence.jpa.marshaller.JPAPlaceholderResolverStrategy("com.sample.rules:EventBusinessRules:2.6", classLoader)</identifier>
                <parameters/>
            </marshalling-strategy>

这个标签出现在<marshalling-strategies>下。从key -deployment-descriptor.xml的编辑器中删除添加的行

这个persistence.xml文件是针对unit com.sample:EventBusinessRules:2.6.

<persistence-unit name="com.sample:EventBusinessRules:2.6" transaction-type="JTA">

您尝试部署的单元是com.sample:SampleBusinessRules:2.7。作为第一步,我认为您应该尝试更改xml中的名称。

相关内容

  • 没有找到相关文章

最新更新