My application stopped running with exception (Jmix 2.1.1)

My application runs in a development environment and it was running in my VPS server too but suddenly stopped running. Here is the exception and looks like it is related to the report add-on.

2023-11-27T06:13:59.984+01:00  INFO 2659136 --- [alina-utility-1] com.zaxxer.hikari.HikariDataSource       : HikariPool-7 - Shutdown completed.
27-Nov-2023 06:13:59.986 SEVERE [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/opt/tomcat/webapps/inteaccerp.war]
	java.lang.IllegalStateException: Error starting child
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:686)
		at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
		at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:713)
		at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:975)
		at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1949)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
		at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:776)
		at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)
		at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1705)
		at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:305)
		at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
		at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1098)
		at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1297)
		at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1301)
		at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1279)
		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
		at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
		at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.base/java.lang.Thread.run(Thread.java:833)
	Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/inteaccerp]]
		at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
		at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)
		... 24 more
	Caused by: org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [io.jmix.reports.ReportImportExportManagementFacade@5502a406] with key 'report_ReportImportExportManagementFacade'
		at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:629)
		at org.springframework.jmx.export.MBeanExporter.lambda$registerBeans$2(MBeanExporter.java:556)
		at java.base/java.util.HashMap.forEach(HashMap.java:1421)
		at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:556)
		at org.springframework.jmx.export.MBeanExporter.afterSingletonsInstantiated(MBeanExporter.java:439)
		at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:984)
		at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
		at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608)
		at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
		at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
		at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439)
		at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
		at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:174)
		at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:154)
		at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:96)
		at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4886)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		... 25 more
	Caused by: javax.management.InstanceAlreadyExistsException: inteaccerp.jmix.reports:type=ReportImportExport
		at java.management/com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:436)
		at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1865)
		at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:960)
		at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:895)
		at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:320)
		at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:523)
		at org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(MBeanRegistrationSupport.java:138)
		at org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBeanExporter.java:683)
		at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstance(MBeanExporter.java:619)
		... 42 more
27-Nov-2023 06:13:59.987 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat/webapps/inteaccerp.war] has finished in [39,964] ms
2023-11-27T06:17:16.052+01:00 DEBUG 2659136 --- [io-8080-exec-31] io.jmix.core.AccessLogger                : Denied access to [menu item: mdg_WorkflowTaskListStatus.list] for user [Munni] by io.jmix.securityflowui.constraint.UiMenuConstraint

Hi!

Could you please provide a test project?
Judging by the stacktrace, the problem is not related to Jmix.
At least I don’t see any package path for Jmix.

Regards,
Dmitriy

Caused by: javax.management.InstanceAlreadyExistsException: inteaccerp.jmix.reports:type=ReportImportExport

I think it may be this again:
https://forum.jmix.io/t/deployment-error-flowui/3463
https://forum.jmix.io/t/instancealreadyexistsexception/2027

2 Likes

Hi Dmitriy
As I see it is related to the report add-on, can you check again, please? There is no link to my application code though.

Please also take a look at the link Mladen shared, might have a link. But thing is, I have this line in my application.properties already this time.
spring.jmx.default-domain=myapp

Thanks in advance for your help.
regards

I’ve just tested an app with the Reports and JMX Console add-ons.
After setting spring.jmx.default-domain=myapp the JMX bean from Reports has the correct name:

image

Please double-check your application settings.

1 Like

Thank you. I’ve recreated the war files for all 3 applications (from the same project) and now working.