resteasy-spring与activity工作流无法整合的问题

fengcaho0616 2018-05-28 11:38:50
最近要整合工作流,搭在resst框架下却无法使用,最后无奈下沉到dubbo了,倒也没啥 就是好奇为啥不行。跟了下源码,貌似因为resteasy-spring下对于factory-method属性解析的问题。

报错内容:
java.lang.IllegalStateException: could not find the type for bean named repositoryService
at org.jboss.resteasy.plugins.spring.SpringBeanProcessor.getBeanClass(SpringBeanProcessor.java:437) ~[resteasy-spring-3.0.9.Final.jar:?]
at org.jboss.resteasy.plugins.spring.SpringBeanProcessor.processBean(SpringBeanProcessor.java:294) ~[resteasy-spring-3.0.9.Final.jar:?]
at org.jboss.resteasy.plugins.spring.SpringBeanProcessor.postProcessBeanFactory(SpringBeanProcessor.java:272) ~[resteasy-spring-3.0.9.Final.jar:?]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:663) ~[spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:603) ~[spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407) ~[spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282) ~[spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204) ~[spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) ~[spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
at org.jboss.resteasy.plugins.spring.SpringContextLoaderListener.contextInitialized(SpringContextLoaderListener.java:48) ~[resteasy-spring-3.0.9.Final.jar:?]
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549) ~[jetty-6.1.26.jar:6.1.26]
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) ~[jetty-6.1.26.jar:6.1.26]
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282) ~[jetty-6.1.26.jar:6.1.26]
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518) ~[jetty-6.1.26.jar:6.1.26]
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499) ~[jetty-6.1.26.jar:6.1.26]
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) ~[jetty-util-6.1.26.jar:6.1.26]
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) ~[jetty-6.1.26.jar:6.1.26]
at org.mortbay.jetty.Server.doStart(Server.java:224) ~[jetty-6.1.26.jar:6.1.26]
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) ~[jetty-util-6.1.26.jar:6.1.26]
at runjettyrun.Bootstrap.main(Bootstrap.java:97) ~[run-jetty-run-bootstrap.jar:?]



配置文件:


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
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
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">



<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
<!-- 数据库连接池 -->
<property name="dataSource" ref="dataSource" />
<!-- 事务 -->
<property name="transactionManager" ref="transactionManager" />
<!-- 数据库自动升级 true/ignore-->
<property name="databaseSchemaUpdate" value="ignore" />
<!-- 作业执行器 -->
<property name="jobExecutorActivate" value="false" />
<!-- 生成流程图的字体 -->
<property name="activityFontName" value="宋体" />
<property name="labelFontName" value="宋体" />
<property name="annotationFontName" value="宋体" />
<!-- 注入自定义工厂类,用户扩展用户与组 -->
<property name="customSessionFactories">
<list>
<bean class="com.sitech.miso.ecosp.bpm.ext.identity.ExtUserEntityManagerFactory"/>
<bean class="com.sitech.miso.ecosp.bpm.ext.identity.ExtGroupEntityManagerFactory"/>
</list>
</property>
<property name="customMybatisMappers">
<set>
<value>com.sitech.miso.ecosp.bpm.ext.identity.ecospbase.EcospBaseMapper</value>
</set>
</property>
</bean>
<!-- 注入自定义用户与组的管理器 -->
<bean id="extUserEntityManager" class="com.sitech.miso.ecosp.bpm.ext.identity.ExtUserEntityManager"/>
<bean id="extGroupEntityManager" class="com.sitech.miso.ecosp.bpm.ext.identity.ExtGroupEntityManager"/>
<!-- 注入对接第三方用户与组的处理器 -->
<bean id="thirdIdentityHandler" class="com.sitech.miso.ecosp.bpm.ext.identity.ecospbase.EcospBaseIdentityHandler"/>


<bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration" />
</bean>

<bean id="repositoryService" factory-bean="processEngine"
factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine"
factory-method="getRuntimeService" />
<bean id="formService" factory-bean="processEngine"
factory-method="getFormService" />
<bean id="identityService" factory-bean="processEngine"
factory-method="getIdentityService" />
<bean id="taskService" factory-bean="processEngine"
factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine"
factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine"
factory-method="getManagementService" />

<bean id="activitiNativeFactory" class="com.sitech.miso.ecosp.bpm.ActivitiNativeFactory" init-method="init">
<property name="processEngine" ref="processEngine"/>
</bean>

<!-- 工作流流程处理服务-->
<bean id="bpmService" class="com.sitech.miso.ecosp.bpm.api.impl.BpmServiceImpl" />


</beans>



...全文
871 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
fengcaho0616 2018-05-28
  • 打赏
  • 举报
回复
有大神帮忙不

679

社区成员

发帖
与我相关
我的任务
社区描述
智能路由器通常具有独立的操作系统,包括OpenWRT、eCos、VxWorks等,可以由用户自行安装各种应用,实现网络和设备的智能化管理。
linuxpython 技术论坛(原bbs)
社区管理员
  • 智能路由器社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧