ERROR [-]: Handler dispatch failed; nested exception is java.lang.StackOverflowError

Please find the below error

ERROR [-]: Handler dispatch failed; nested exception is java.lang.StackOverflowError 
 
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.StackOverflowError 
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:982) 
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901) 
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) 
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872) 
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) 
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) 
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

@mx0125 Could you please attach the problematic document and code that will allow us to reproduce the problem on our side? We will check the issue and provide you more information.
Also, I do not see in the provided stack trace that Aspose.Words causes the problem. Could you please elaborate the problem in more details.

Caused by: java.lang.ClassCircularityError: asposewobfuscated/zz0
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.glowroot.agent.impl.BytecodeServiceImpl.preloadSomeSuperTypes(BytecodeServiceImpl.java:156)
at org.glowroot.agent.bytecode.api.Bytecode.preloadSomeSuperTypes(Bytecode.java:83)
at java.lang.ClassLoader.defineClass(ClassLoader.java)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClassInternal(GenericClassLoader.java:1113)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:1046)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1038)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:101)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:496)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:71)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:53)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.glowroot.agent.impl.BytecodeServiceImpl.preloadSomeSuperTypes(BytecodeServiceImpl.java:156)
at org.glowroot.agent.bytecode.api.Bytecode.preloadSomeSuperTypes(Bytecode.java:83)
at java.lang.ClassLoader.defineClass(ClassLoader.java)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClassInternal(GenericClassLoader.java:1113)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:1046)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1038)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:101)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:496)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:71)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:53)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at weblogic.utils.classloaders.GenericClassLoader.defineClassInternal(GenericClassLoader.java:1113)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:1046)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1038)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:990)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:101)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:611)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:543)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:496)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:71)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:53)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)

@mx0125 Unfortunately, it is still not clear how to reproduce the problem. Could you please describe your scenario where the problem occurs and provide the problematic document and code that will allow us to reproduce the problem? We will investigate and provide you more information.
It is impossible to tell what the problem is without ability to reproduce it on our side.

LOGGER.info("contractFileAbsolutePath: ",contractFileAbsolutePath);
// Move uploaded doc file to target directory
Path target = Paths.get(contractFileAbsolutePath); // NOSONAR
Files.move(Paths.get(file.getAbsolutePath()), target, StandardCopyOption.REPLACE_EXISTING);// NOSONAR
LOGGER.info("Moved uploaded doc file to target directory");

// save the file as it is in the generated format(rtf/doc/docm)
Document document = new Document(contractFileAbsolutePath);

contractFileAbsolutePathPdf = StringUtils.join(pathToSaveContract, asPdfFileName(contractFileName));

It is failing at

// save the file as it is in the generated format(rtf/doc/docm)
Document document = new Document(contractFileAbsolutePath);

@mx0125 Could you please attach the problematic input document that causes the issue? I am afraid I cannot reproduce the problem without your document.