Springboot Lazy Loading

Below exception is thrown when we try to lazy load service having groupdocs integration in spring boot.

java.lang.IllegalStateException: Error starting child
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:602)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:571)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:654)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1130)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1933)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
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.deployDirectories(HostConfig.java:1041)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1629)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:109)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:385)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:332)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:776)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:772)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1203)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1193)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:749)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:203)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:415)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:874)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at org.apache.catalina.startup.Catalina.start(Catalina.java:757)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:402)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:179)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:599)
… 35 more
Caused by: java.lang.IllegalStateException: Unable to complete the scan for annotations for web application [] due to a StackOverflowError. Possible roo
t causes include a too low setting for -Xss and illegal cyclic inheritance dependencies. The class hierarchy being processed was [com.groupdocs.viewer.internal.
c.a.c.b.a.b.d.b->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object-

java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Objec
t->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Obj
ect->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.O
bject->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang
.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.la
ng.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.
lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->jav
a.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->j
ava.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object-
java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object->java.lang.Object]
at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:2287)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2227)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2184)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:2157)
at org.apache.catalina.startup.ContextConfig.scanWebXmlFragment(ContextConfig.java:2065)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:2045)
at org.apache.catalina.startup.ContextConfig.processClasses(ContextConfig.java:1360)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1261)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:961)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:290)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:109)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4330)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
… 36 more

@Shakeel_Ahmed

Thank you for your report. Can you please attach a sample application?

Using this application

GroupDocs.Viewer-for-Java/Demos/Spring at master · groupdocs-viewer/GroupDocs.Viewer-for-Java · GitHub except we tried lazy loading

We tried to lazy load view and editor service implz

@Shakeel_Ahmed

I have created an issue in our internal bug tracker for analysis. We will attempt to reproduce this exception. Could you please share the Java version you are using and the operating system you are running?

We are using java 21

Hello, @Shakeel_Ahmed
I tested the application and found no errors.
Please try to reproduce the bug in Docker container (configuration files are attached) to eliminate any environmental factors. If the error occurs in Docker, share the project with all your changes.
Thank you.
Spring-docker-config.zip (1.2 KB)

Thankyou let me try this.