AnsweredAssumed Answered

Act. Explorer Exception: unknown variable type jpa-entity

Question asked by n.s. on Nov 11, 2011
Latest reply on Nov 15, 2011 by n.s.
Hello,


I'm trying to use a custom process which involves references to custom JPA entities.

As noted in the manual and forum topics http://forums.activiti.org/en/viewtopic.php?f=6&t=2373&start=0
I provided a activity.cfg.xml in which I use my custom JPA Entity Manager Factory:


<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">


    <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
        <property name="jpaVendorAdapter">
            <bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
            </bean>
        </property>

        <property name="jpaProperties">
            <bean id="jpaProperties"
                  class="org.springframework.beans.factory.config.PropertiesFactoryBean">
                <property name="properties">
                    <props>
                        <prop key="eclipselink.weaving">false</prop>
                    </props>
                </property>
            </bean>
        </property>

    </bean>


    <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">

        <!– Database configurations –>
        <property name="databaseSchemaUpdate" value="true"/>
        <property name="jdbcUrl" value="jdbc:h2:tcp://localhost:9092/~/test"/>
        <property name="jdbcDriver" value="org.h2.Driver"/>
        <property name="jdbcUsername" value="Testuser"/>
        <property name="jdbcPassword" value="start"/>
        <property name="jpaEntityManagerFactory" ref="entityManagerFactory"/>
        <property name="jpaHandleTransaction" value="true"/>
        <property name="jpaCloseEntityManager" value="true"/>

        <!– job executor configurations –>
        <property name="jobExecutorActivate" value="false"/>
    </bean>

</beans>

My persistence.xml declares a persistence-unit "myentities" which includes my entities. I'm able to start/control my process within a unit-test / own servlet. So JPA inside the Acitiviti Engine works.


But if I try to access my process within Activiti Explorer I receive an
"ActivitiException: unknown variable type name jpa-entity"

I guess the explorer still uses a custom persistence unit (where is it defined?) which is not aware of my JPA mappings. How can I extend Activiti Explorer so it knows my JPA entities?

Best regards, Nikola

Outcomes