2

如何将 OSwor​​kflow 与 spring 和 hibernate 集成。我需要在 xml 文件中指定哪些配置以及它需要哪些 jar 文件。

更新

我已将 applicationContext.xml 定义如下

<bean id="workflowStore" class="com.opensymphony.workflow.spi.hibernate.SpringHibernateWorkflowStore" autowire="byName"> <property name="resource" value="workflow-defs.xml"/>
    <property name="reload" value="true"/>  </bean>

  <bean id="workflowFactory" class="com.opensymphony.workflow.loader.XMLWorkflowFactory" init-method="initDone"/>

    <bean id="workflowConfiguration" class="com.opensymphony.workflow.config.SpringConfiguration">
        <property name="store"><ref local="workflowStore"/></property>
        <property name="factory"><ref local="workflowFactory"/></property>
    </bean>


<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">



        <property name="dataSource" ref="dataSource" />
        <property name="namingStrategy">
            <bean class="org.hibernate.cfg.ImprovedNamingStrategy" />
        </property>
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">${hibernate.dialect}</prop>
                <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
                <prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
                <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop>
                <prop key="hibernate.cache.provider_configuration_file_resource_path">ehcache/ehcache-hibernate-local.xml</prop>
                <prop key="hibernate.hbm2ddl.auto">update</prop>
            </props>
        </property>
        <property name="packagesToScan" value="net.top.*.entity.*" />

        <property name="mappingResources">
    <list>
        <value>com/opensymphony/workflow/spi/hibernate/WorkflowDescriptor.hbm.xml</value>
        <value>com/opensymphony/workflow/spi/hibernate/HibernateCurrentStep.hbm.xml</value>
        <value>com/opensymphony/workflow/spi/hibernate/HibernateHistoryStep.hbm.xml</value>
        <value>com/opensymphony/workflow/spi/hibernate/HibernateWorkflowEntry.hbm.xml</value>               
        <value>com/opensymphony/module/propertyset/hibernate/PropertySetItemImpl.hbm.xml</value>
  </list>
  </property>
    </bean>

它显示错误为

Could not determine type for: com.opensymphony.workflow.loader.NotNullStringType, for columns: [org.hibernate.mapping.Column(value)]

我错过了什么吗?

4

0 回答 0