Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

与uflo集成失败,不支持吗? #29

Open
Jeadren opened this issue Apr 15, 2020 · 1 comment
Open

与uflo集成失败,不支持吗? #29

Jeadren opened this issue Apr 15, 2020 · 1 comment

Comments

@Jeadren
Copy link

Jeadren commented Apr 15, 2020

这个工程是不是无法和uflo2集成了,注入uflo需要的sessionfactory就会启动失败。

以下是错误详情:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uflo.instanceDetection' defined in class path resource [uflo-context-configs.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Already value [org.springframework.orm.jpa.EntityManagerHolder@407985b8] for key [org.hibernate.internal.SessionFactoryImpl@52063be6] bound to thread [restartedMain]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1710) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:388) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1234) [spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
at com.hthj.starvastweb.StarvastWebApplication.main(StarvastWebApplication.java:14) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.0.0.RELEASE.jar:2.0.0.RELEASE]
Caused by: java.lang.IllegalStateException: Already value [org.springframework.orm.jpa.EntityManagerHolder@407985b8] for key [org.hibernate.internal.SessionFactoryImpl@52063be6] bound to thread [restartedMain]
at org.springframework.transaction.support.TransactionSynchronizationManager.bindResource(TransactionSynchronizationManager.java:193) ~[spring-tx-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.orm.hibernate5.SpringSessionContext.currentSession(SpringSessionContext.java:131) ~[spring-orm-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:464) ~[hibernate-core-5.2.14.Final.jar:5.2.14.Final]
at com.bstek.uflo.env.impl.ContextImpl.getSession(ContextImpl.java:44) ~[uflo-core-2.1.5.jar:na]
at com.bstek.uflo.command.impl.GetTaskReminderCommand.execute(GetTaskReminderCommand.java:38) ~[uflo-core-2.1.5.jar:na]
at com.bstek.uflo.command.impl.GetTaskReminderCommand.execute(GetTaskReminderCommand.java:31) ~[uflo-core-2.1.5.jar:na]
at com.bstek.uflo.command.impl.SpringTransactionCommandService$1.doInTransaction(SpringTransactionCommandService.java:53) ~[uflo-core-2.1.5.jar:na]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at com.bstek.uflo.command.impl.SpringTransactionCommandService.executeCommand(SpringTransactionCommandService.java:51) ~[uflo-core-2.1.5.jar:na]
at com.bstek.uflo.service.impl.DefaultTaskService.getAllTaskReminders(DefaultTaskService.java:358) ~[uflo-core-2.1.5.jar:na]
at com.bstek.uflo.service.impl.SchedulerServiceImpl.initTaskReminders(SchedulerServiceImpl.java:193) ~[uflo-core-2.1.5.jar:na]
at com.bstek.uflo.service.impl.SchedulerServiceImpl.resetScheduer(SchedulerServiceImpl.java:172) ~[uflo-core-2.1.5.jar:na]
at com.bstek.uflo.heartbeat.InstanceDetection.startDaemonJob(InstanceDetection.java:61) ~[uflo-core-2.1.5.jar:na]
at com.bstek.uflo.heartbeat.InstanceDetection.afterPropertiesSet(InstanceDetection.java:116) ~[uflo-core-2.1.5.jar:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1769) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1706) ~[spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
... 21 common frames omitted

@muxiangqiu
Copy link
Owner

支持的,可以加群获取示例项目

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants