[
https://issues.apache.org/jira/browse/FINERACT-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hitesh Prajapati updated FINERACT-1895:
---------------------------------------
Description:
When I run fineract with activeMqEnabled profile, it doesn't start and failed
with below excpetion. I have standalone ActiveMQ running with default port. so
the MessagingConfiguration should work with it.
java -Dspring.profiles.active=activeMqEnabled -jar
fineract-provider/build/libs/fineract-provider-0.0.0-6c86e15e.jar
{code:java}
Error starting ApplicationContext. To display the conditions report re-run your
application with 'debug' enabled.
2023-04-08 19:45:48.484 -ERROR 11140 --- [ main]
o.s.b.d.LoggingFailureAnalysisReporter :***************************
APPLICATION FAILED TO START
***************************Description:The dependencies of some of the beans in
the application context form a cycle:
tenantAwareBasicAuthenticationFilterRegistration defined in class path resource
[org/apache/fineract/infrastructure/core/config/SecurityConfig.class]
?
tenantAwareBasicAuthenticationFilter (field private
org.apache.fineract.notification.service.UserNotificationService
org.apache.fineract.infrastructure.security.filter.TenantAwareBasicAuthenticationFilter.userNotificationService)
???????
| userNotificationServiceImpl defined in URL
[jar:file:/D:/Work/fineract/source/fineract/fineract-provider/build/libs/fineract-provider-0.0.0-185551c5.jar!/BOOT-INF/classes!/org/apache/fineract/notification/service/UserNotificationServiceImpl.class]
? ?
| activeMQNotificationEventPublisher defined in URL
[jar:file:/D:/Work/fineract/source/fineract/fineract-provider/build/libs/fineract-provider-0.0.0-185551c5.jar!/BOOT-INF/classes!/org/apache/fineract/notification/eventandlistener/ActiveMQNotificationEventPublisher.class]
? ?
| messagingConfiguration (field private
org.apache.fineract.notification.eventandlistener.NotificationEventListener
org.apache.fineract.notification.config.MessagingConfiguration.notificationEventListener)
? ?
| notificationEventListener defined in URL
[jar:file:/D:/Work/fineract/source/fineract/fineract-provider/build/libs/fineract-provider-0.0.0-185551c5.jar!/BOOT-INF/classes!/org/apache/fineract/notification/eventandlistener/NotificationEventListener.class]
???????
Action:Relying upon circular references is discouraged and they are prohibited
by default. Update your application to remove the dependency cycle between
beans. As a last resort, it may be possible to break the cycle automatically by
setting spring.main.allow-circular-references to true.{code}
was:
When I run fineract with activeMqEnabled profile, it doesn't start and failed
with below excpetion. I have standalone ActiveMQ running with default port. so
the MessagingConfiguration should work with it.
java -Dspring.profiles.active=activeMqEnabled -jar
fineract-provider/build/libs/fineract-provider-0.0.0-6c86e15e.jar
{code:java}
2023-04-08 18:05:59.166 -ERROR 23580 --- [ main]
o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context.
Exception: org.springframework.beans.factory.BeanCreationException. Message:
Error creating bean with name
'tenantAwareBasicAuthenticationFilterRegistration' defined in class path
resource [org/apache/fineract/infrastructure/core/config/SecurityConfig.class]:
Bean instantiation via factory method failed; nested exception is
org.springframework.beans.BeanInstantiationException: Failed to instantiate
[org.springframework.boot.web.servlet.FilterRegistrationBean]: Factory method
'tenantAwareBasicAuthenticationFilterRegistration' threw exception; nested
exception is org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'tenantAwareBasicAuthenticationFilter':
Unsatisfied dependency expressed through field 'userNotificationService';
nested exception is
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
creating bean with name 'userNotificationServiceImpl' defined in URL
[jar:file:/D:/Work/fineract/source/fineract/fineract-provider/build/libs/fineract-provider-0.0.0-185551c5.jar!/BOOT-INF/classes!/org/apache/fineract/notification/service/UserNotificationServiceImpl.class]:
Unsatisfied dependency expressed through constructor parameter 0; nested
exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
No qualifying bean of type
'org.apache.fineract.notification.eventandlistener.NotificationEventPublisher'
available: expected at least 1 bean which qualifies as autowire candidate.
Dependency annotations: {}
2023-04-08 18:05:59.280 - INFO 23580 --- [ main]
o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2023-04-08 18:05:59.289 - WARN 23580 --- [ main]
o.a.c.loader.WebappClassLoaderBase : The web application
[fineract-provider] appears to have started a thread named [HikariPool-1
housekeeper] but has failed to stop it. This is very likely to create a memory
leak. Stack trace of thread:
[email protected]/jdk.internal.misc.Unsafe.park(Native Method)
[email protected]/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
[email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1672)
[email protected]/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
[email protected]/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
[email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
[email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1122)
[email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[email protected]/java.lang.Thread.run(Thread.java:833)
2023-04-08 18:05:59.290 - WARN 23580 --- [ main]
o.a.c.loader.WebappClassLoaderBase : The web application
[fineract-provider] appears to have started a thread named [HikariPool-2
housekeeper] but has failed to stop it. This is very likely to create a memory
leak. Stack trace of thread:
[email protected]/jdk.internal.misc.Unsafe.park(Native Method)
[email protected]/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
[email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:1672)
[email protected]/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
[email protected]/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
[email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1062)
[email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1122)
[email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[email protected]/java.lang.Thread.run(Thread.java:833)
2023-04-08 18:05:59.298 - WARN 23580 --- [ main]
ConfigServletWebServerApplicationContext : Exception encountered during context
initialization - cancelling refresh attempt:
org.springframework.context.ApplicationContextException: Unable to start web
server; nested exception is
org.springframework.boot.web.server.WebServerException: Unable to start
embedded Tomcat
2023-04-08 18:05:59.306 - INFO 23580 --- [ main]
j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for
persistence unit 'jpa-pu'
2023-04-08 18:05:59.314 - INFO 23580 --- [ main]
com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2023-04-08 18:05:59.337 - INFO 23580 --- [ main]
com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2023-04-08 18:05:59.385 - INFO 23580 --- [ main]
ConditionEvaluationReportLoggingListener :Error starting ApplicationContext. To
display the conditions report re-run your application with 'debug' enabled.
2023-04-08 18:05:59.494 -ERROR 23580 --- [ main]
o.s.b.d.LoggingFailureAnalysisReporter :***************************
APPLICATION FAILED TO START
***************************Description:Parameter 0 of constructor in
org.apache.fineract.notification.service.UserNotificationServiceImpl required a
bean of type
'org.apache.fineract.notification.eventandlistener.NotificationEventPublisher'
that could not be found.The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:Consider defining a bean of type
'org.apache.fineract.notification.eventandlistener.NotificationEventPublisher'
in your configuration.{code}
> Fineract doesn't start with spring profile activeMqEnabled
> ----------------------------------------------------------
>
> Key: FINERACT-1895
> URL: https://issues.apache.org/jira/browse/FINERACT-1895
> Project: Apache Fineract
> Issue Type: Bug
> Components: System
> Reporter: Hitesh Prajapati
> Priority: Minor
>
> When I run fineract with activeMqEnabled profile, it doesn't start and failed
> with below excpetion. I have standalone ActiveMQ running with default port.
> so the MessagingConfiguration should work with it.
> java -Dspring.profiles.active=activeMqEnabled -jar
> fineract-provider/build/libs/fineract-provider-0.0.0-6c86e15e.jar
> {code:java}
> Error starting ApplicationContext. To display the conditions report re-run
> your application with 'debug' enabled.
> 2023-04-08 19:45:48.484 -ERROR 11140 --- [ main]
> o.s.b.d.LoggingFailureAnalysisReporter :***************************
> APPLICATION FAILED TO START
> ***************************Description:The dependencies of some of the beans
> in the application context form a cycle:
> tenantAwareBasicAuthenticationFilterRegistration defined in class path
> resource [org/apache/fineract/infrastructure/core/config/SecurityConfig.class]
> ?
> tenantAwareBasicAuthenticationFilter (field private
> org.apache.fineract.notification.service.UserNotificationService
> org.apache.fineract.infrastructure.security.filter.TenantAwareBasicAuthenticationFilter.userNotificationService)
> ???????
> | userNotificationServiceImpl defined in URL
> [jar:file:/D:/Work/fineract/source/fineract/fineract-provider/build/libs/fineract-provider-0.0.0-185551c5.jar!/BOOT-INF/classes!/org/apache/fineract/notification/service/UserNotificationServiceImpl.class]
> ? ?
> | activeMQNotificationEventPublisher defined in URL
> [jar:file:/D:/Work/fineract/source/fineract/fineract-provider/build/libs/fineract-provider-0.0.0-185551c5.jar!/BOOT-INF/classes!/org/apache/fineract/notification/eventandlistener/ActiveMQNotificationEventPublisher.class]
> ? ?
> | messagingConfiguration (field private
> org.apache.fineract.notification.eventandlistener.NotificationEventListener
> org.apache.fineract.notification.config.MessagingConfiguration.notificationEventListener)
> ? ?
> | notificationEventListener defined in URL
> [jar:file:/D:/Work/fineract/source/fineract/fineract-provider/build/libs/fineract-provider-0.0.0-185551c5.jar!/BOOT-INF/classes!/org/apache/fineract/notification/eventandlistener/NotificationEventListener.class]
> ???????
> Action:Relying upon circular references is discouraged and they are
> prohibited by default. Update your application to remove the dependency cycle
> between beans. As a last resort, it may be possible to break the cycle
> automatically by setting spring.main.allow-circular-references to true.{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)