I have packaged GroupDocs.Viewer Spring boot application in a JAR file and when running the JAR in cmd it is giving me following exception:
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.groupdocs.ui.Application]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.servlet.support.SpringBootServletInitializer at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:184) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:316) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:271) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:91) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398) [viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) [viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [viewer-spring-1.14.7-shaded.jar:1.14.7] at com.groupdocs.ui.Application.main(Application.java:34) [viewer-spring-1.14.7-shaded.jar:1.14.7] Caused by: java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.servlet.support.SpringBootServletInitializer at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:169) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassParser.retrieveBeanMethodMetadata(ConfigurationClassParser.java:393) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:318) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:202) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:170) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] ... 12 common frames omitted Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContext at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_201] at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[na:1.8.0_201] at java.lang.Class.getDeclaredMethods(Unknown Source) ~[na:1.8.0_201] at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:158) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] ... 17 common frames omitted Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContext at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_201] at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_201] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_201] at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_201] ... 21 common frames omitted
I have packaged GroupDocs.Viewer Spring boot application in a JAR file and when running the JAR in cmd it is giving me following exception:
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.groupdocs.ui.Application]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.servlet.support.SpringBootServletInitializer at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:184) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:316) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:271) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:91) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398) [viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) [viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [viewer-spring-1.14.7-shaded.jar:1.14.7] at com.groupdocs.ui.Application.main(Application.java:34) [viewer-spring-1.14.7-shaded.jar:1.14.7] Caused by: java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.boot.web.servlet.support.SpringBootServletInitializer at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:169) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassParser.retrieveBeanMethodMetadata(ConfigurationClassParser.java:393) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:318) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:202) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:170) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] ... 12 common frames omitted Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContext at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_201] at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[na:1.8.0_201] at java.lang.Class.getDeclaredMethods(Unknown Source) ~[na:1.8.0_201] at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:158) ~[viewer-spring-1.14.7-shaded.jar:1.14.7] ... 17 common frames omitted Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContext at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_201] at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_201] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_201] at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_201] ... 21 common frames omitted