java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement

Atlassian JIRA | Yilin Mo [Atlassian] | 3 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Here are the steps to reproduce the issue: # Within version 5.3.4 create a empty page with: #* an anchor #* an inline task with the anchor link # Upgrade to Confluence 5.5.2. # The upgrade is complete but all task found after the task with the anchor link will not be migrated and the following message found in the log: {noformat} 2014-06-18 13:55:59,908 ERROR [StorageToAoMigrationUpgradeTask-TaskExtractor-4] [plugins.tasklist.upgradetask.InterruptingUncaughtExceptionHandler] uncaughtException Uncaught exception in thread StorageToAoMigrationUpgradeTask-TaskExtractor-4. Interrupting all threads. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement at com.ctc.wstx.evt.WEvent.asStartElement(WEvent.java:63) at com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskUserExtractor.extractUsersForInlineTask(InlineTaskUserExtractor.java:57) at com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskFinderImpl.parseTask(InlineTaskFinderImpl.java:164) at com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskFinderImpl.findTasks(InlineTaskFinderImpl.java:130) at com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskFinderImpl.extractTasks(InlineTaskFinderImpl.java:87) at com.atlassian.confluence.plugins.tasklist.upgradetask.StorageToAoMigrationTaskExtractor$1.doInTransaction(StorageToAoMigrationTaskExtractor.java:103) at com.atlassian.confluence.plugins.tasklist.upgradetask.StorageToAoMigrationTaskExtractor$1.doInTransaction(StorageToAoMigrationTaskExtractor.java:86) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:88) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:82) at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy220.doInTransaction(Unknown Source) at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at com.sun.proxy.$Proxy220.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21) at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy2365.execute(Unknown Source) at com.atlassian.confluence.plugins.tasklist.upgradetask.StorageToAoMigrationTaskExtractor.run(StorageToAoMigrationTaskExtractor.java:85) at java.lang.Thread.run(Thread.java:695) 2014-06-18 13:55:59,925 ERROR [Long running task: Importing data] [plugins.tasklist.upgradetask.StorageToAoMigrationUpgradeTask] doUpgrade Inline task migration failed! 2 tasks were migrated. You may try rerunning it or contactAtlassian support if it continues to fail. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore 2014-06-18 13:55:59,929 WARN [StorageToAoMigrationUpgradeTask-TaskInserter-2] [plugins.tasklist.upgradetask.StorageToAoMigrationTaskInserter] run Task inserter was interrupted. Aborting. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore 2014-06-18 13:55:59,930 WARN [StorageToAoMigrationUpgradeTask-TaskInserter-4] [plugins.tasklist.upgradetask.StorageToAoMigrationTaskInserter] run Task inserter was interrupted. Aborting. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore 2014-06-18 13:55:59,931 WARN [StorageToAoMigrationUpgradeTask-TaskInserter-3] [plugins.tasklist.upgradetask.StorageToAoMigrationTaskInserter] run Task inserter was interrupted. Aborting. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore 2014-06-18 13:55:59,935 WARN [StorageToAoMigrationUpgradeTask-TaskInserter-1] [plugins.tasklist.upgradetask.StorageToAoMigrationTaskInserter] run Task inserter was interrupted. Aborting. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore {noformat} If you've encountered this issue, please open a support ticket that we can help you to locate the page to workaround the issue.

    Atlassian JIRA | 3 years ago | Yilin MO [Atlassian]
    java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement
  2. 0

    Here are the steps to reproduce the issue: # Within version 5.3.4 create a empty page with: #* an anchor #* an inline task with the anchor link # Upgrade to Confluence 5.5.2. # The upgrade is complete but all task found after the task with the anchor link will not be migrated and the following message found in the log: {noformat} 2014-06-18 13:55:59,908 ERROR [StorageToAoMigrationUpgradeTask-TaskExtractor-4] [plugins.tasklist.upgradetask.InterruptingUncaughtExceptionHandler] uncaughtException Uncaught exception in thread StorageToAoMigrationUpgradeTask-TaskExtractor-4. Interrupting all threads. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement at com.ctc.wstx.evt.WEvent.asStartElement(WEvent.java:63) at com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskUserExtractor.extractUsersForInlineTask(InlineTaskUserExtractor.java:57) at com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskFinderImpl.parseTask(InlineTaskFinderImpl.java:164) at com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskFinderImpl.findTasks(InlineTaskFinderImpl.java:130) at com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskFinderImpl.extractTasks(InlineTaskFinderImpl.java:87) at com.atlassian.confluence.plugins.tasklist.upgradetask.StorageToAoMigrationTaskExtractor$1.doInTransaction(StorageToAoMigrationTaskExtractor.java:103) at com.atlassian.confluence.plugins.tasklist.upgradetask.StorageToAoMigrationTaskExtractor$1.doInTransaction(StorageToAoMigrationTaskExtractor.java:86) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:88) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:82) at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy220.doInTransaction(Unknown Source) at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at com.sun.proxy.$Proxy220.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21) at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy2365.execute(Unknown Source) at com.atlassian.confluence.plugins.tasklist.upgradetask.StorageToAoMigrationTaskExtractor.run(StorageToAoMigrationTaskExtractor.java:85) at java.lang.Thread.run(Thread.java:695) 2014-06-18 13:55:59,925 ERROR [Long running task: Importing data] [plugins.tasklist.upgradetask.StorageToAoMigrationUpgradeTask] doUpgrade Inline task migration failed! 2 tasks were migrated. You may try rerunning it or contactAtlassian support if it continues to fail. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore 2014-06-18 13:55:59,929 WARN [StorageToAoMigrationUpgradeTask-TaskInserter-2] [plugins.tasklist.upgradetask.StorageToAoMigrationTaskInserter] run Task inserter was interrupted. Aborting. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore 2014-06-18 13:55:59,930 WARN [StorageToAoMigrationUpgradeTask-TaskInserter-4] [plugins.tasklist.upgradetask.StorageToAoMigrationTaskInserter] run Task inserter was interrupted. Aborting. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore 2014-06-18 13:55:59,931 WARN [StorageToAoMigrationUpgradeTask-TaskInserter-3] [plugins.tasklist.upgradetask.StorageToAoMigrationTaskInserter] run Task inserter was interrupted. Aborting. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore 2014-06-18 13:55:59,935 WARN [StorageToAoMigrationUpgradeTask-TaskInserter-1] [plugins.tasklist.upgradetask.StorageToAoMigrationTaskInserter] run Task inserter was interrupted. Aborting. -- referer: http://mymac:8552/admin/backup.action | url: /admin/restore.action | userName: admin | action: restore {noformat} If you've encountered this issue, please open a support ticket that we can help you to locate the page to workaround the issue.

    Atlassian JIRA | 3 years ago | Yilin Mo [Atlassian]
    java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement
  3. 0

    The following stacktrace is thrown: 2015-11-11 17:38:31,543 ERROR org.dspace.xoai.app.BasicConfiguration @ Not able to start XOAI normal cache service. org.dspace.xoai.services.api.config.XOAIManagerResolverException: java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement at org.dspace.xoai.services.impl.context.DSpaceXOAIManagerResolver.getManager(DSpaceXOAIManagerResolver.java:32) at org.dspace.xoai.app.BasicConfiguration.xoaiCacheService(BasicConfiguration.java:74) at org.dspace.xoai.app.BasicConfiguration$$EnhancerByCGLIB$$d85d5af1.CGLIB$xoaiCacheService$17(<generated>) at org.dspace.xoai.app.BasicConfiguration$$EnhancerByCGLIB$$d85d5af1$$FastClassByCGLIB$$506fd11e.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:280) at org.dspace.xoai.app.BasicConfiguration$$EnhancerByCGLIB$$d85d5af1.xoaiCacheService(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:149) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:73) at org.dspace.xoai.app.XOAI.main(XOAI.java:351) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78) Caused by: java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement at com.ctc.wstx.evt.WEvent.asStartElement(WEvent.java:63) at com.lyncode.xoai.dataprovider.xml.read.XmlReader.elementNameIs(XmlReader.java:87) at com.lyncode.xoai.dataprovider.xml.xoaiconfig.parse.ContextConfigurationParser.parse(ContextConfigurationParser.java:34) at com.lyncode.xoai.dataprovider.xml.xoaiconfig.parse.ConfigurationParser.parse(ConfigurationParser.java:34) at com.lyncode.xoai.dataprovider.xml.xoaiconfig.Configuration.readConfiguration(Configuration.java:23) at org.dspace.xoai.services.impl.context.DSpaceXOAIManagerResolver.getManager(DSpaceXOAIManagerResolver.java:30) ... 31 more The problem occurs when in xoai.xml, the Context element doesn't contain a Description element. 1) The XOAIConfiguration.xsd schema wasn't updated to consider Description a required element. 2) The error message could be clearer - at the very least it should indicate that this is a problem on xoai configuration. Ideally it should point out the file and the missing element. https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-oai/src/main/java/org/dspace/xoai/services/impl/context/DSpaceXOAIManagerResolver.java#L32

    Sakai JIRA | 1 year ago | Ivan Masár
    org.dspace.xoai.services.api.config.XOAIManagerResolverException: java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The following stacktrace is thrown: 2015-11-11 17:38:31,543 ERROR org.dspace.xoai.app.BasicConfiguration @ Not able to start XOAI normal cache service. org.dspace.xoai.services.api.config.XOAIManagerResolverException: java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement at org.dspace.xoai.services.impl.context.DSpaceXOAIManagerResolver.getManager(DSpaceXOAIManagerResolver.java:32) at org.dspace.xoai.app.BasicConfiguration.xoaiCacheService(BasicConfiguration.java:74) at org.dspace.xoai.app.BasicConfiguration$$EnhancerByCGLIB$$d85d5af1.CGLIB$xoaiCacheService$17(<generated>) at org.dspace.xoai.app.BasicConfiguration$$EnhancerByCGLIB$$d85d5af1$$FastClassByCGLIB$$506fd11e.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:280) at org.dspace.xoai.app.BasicConfiguration$$EnhancerByCGLIB$$d85d5af1.xoaiCacheService(<generated>) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:149) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:570) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:73) at org.dspace.xoai.app.XOAI.main(XOAI.java:351) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78) Caused by: java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement at com.ctc.wstx.evt.WEvent.asStartElement(WEvent.java:63) at com.lyncode.xoai.dataprovider.xml.read.XmlReader.elementNameIs(XmlReader.java:87) at com.lyncode.xoai.dataprovider.xml.xoaiconfig.parse.ContextConfigurationParser.parse(ContextConfigurationParser.java:34) at com.lyncode.xoai.dataprovider.xml.xoaiconfig.parse.ConfigurationParser.parse(ConfigurationParser.java:34) at com.lyncode.xoai.dataprovider.xml.xoaiconfig.Configuration.readConfiguration(Configuration.java:23) at org.dspace.xoai.services.impl.context.DSpaceXOAIManagerResolver.getManager(DSpaceXOAIManagerResolver.java:30) ... 31 more The problem occurs when in xoai.xml, the Context element doesn't contain a Description element. 1) The XOAIConfiguration.xsd schema wasn't updated to consider Description a required element. 2) The error message could be clearer - at the very least it should indicate that this is a problem on xoai configuration. Ideally it should point out the file and the missing element. https://github.com/DSpace/DSpace/blob/dspace-5_x/dspace-oai/src/main/java/org/dspace/xoai/services/impl/context/DSpaceXOAIManagerResolver.java#L32

    Sakai JIRA | 1 year ago | Ivan Masár
    org.dspace.xoai.services.api.config.XOAIManagerResolverException: java.lang.ClassCastException: com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.ctc.wstx.evt.WEndElement cannot be cast to javax.xml.stream.events.StartElement

      at com.ctc.wstx.evt.WEvent.asStartElement()
    2. Woodstox
      WEvent.asStartElement
      1. com.ctc.wstx.evt.WEvent.asStartElement(WEvent.java:63)
      1 frame
    3. com.atlassian.confluence
      StorageToAoMigrationTaskExtractor$1.doInTransaction
      1. com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskUserExtractor.extractUsersForInlineTask(InlineTaskUserExtractor.java:57)
      2. com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskFinderImpl.parseTask(InlineTaskFinderImpl.java:164)
      3. com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskFinderImpl.findTasks(InlineTaskFinderImpl.java:130)
      4. com.atlassian.confluence.plugins.tasklist.transformer.InlineTaskFinderImpl.extractTasks(InlineTaskFinderImpl.java:87)
      5. com.atlassian.confluence.plugins.tasklist.upgradetask.StorageToAoMigrationTaskExtractor$1.doInTransaction(StorageToAoMigrationTaskExtractor.java:103)
      6. com.atlassian.confluence.plugins.tasklist.upgradetask.StorageToAoMigrationTaskExtractor$1.doInTransaction(StorageToAoMigrationTaskExtractor.java:86)
      6 frames
    4. com.atlassian.sal
      SpringHostContextAccessor$1.doInTransaction
      1. com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25)
      2. com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:88)
      2 frames
    5. Spring Tx
      TransactionTemplate.execute
      1. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
      1 frame
    6. com.atlassian.sal
      SpringHostContextAccessor.doInTransaction
      1. com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:82)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    8. com.atlassian.plugin
      DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke
      1. com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)
      1 frame
    9. com.sun.proxy
      $Proxy220.doInTransaction
      1. com.sun.proxy.$Proxy220.doInTransaction(Unknown Source)
      1 frame
    10. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    11. com.atlassian.plugin
      HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke
      1. com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154)
      1 frame
    12. com.sun.proxy
      $Proxy220.doInTransaction
      1. com.sun.proxy.$Proxy220.doInTransaction(Unknown Source)
      1 frame
    13. com.atlassian.sal
      HostContextTransactionTemplate.execute
      1. com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21)
      1 frame
    14. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    15. Spring AOP
      AopUtils.invokeJoinpointUsingReflection
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      1 frame
    16. Spring OSGi Core
      ServiceInvoker.invoke
      1. org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      2. org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      2 frames
    17. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      3. org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      4 frames
    18. Spring OSGi Core
      ServiceTCCLInterceptor.invoke
      1. org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      2. org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      2 frames
    19. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      1 frame
    20. Spring OSGi Core
      LocalBundleContextAdvice.invoke
      1. org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      1 frame
    21. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      3. org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      4. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      5. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      5 frames
    22. com.sun.proxy
      $Proxy2365.execute
      1. com.sun.proxy.$Proxy2365.execute(Unknown Source)
      1 frame
    23. com.atlassian.confluence
      StorageToAoMigrationTaskExtractor.run
      1. com.atlassian.confluence.plugins.tasklist.upgradetask.StorageToAoMigrationTaskExtractor.run(StorageToAoMigrationTaskExtractor.java:85)
      1 frame
    24. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:695)
      1 frame