Project

General

Profile

bug #9831

Exception in TermRepresentationUpdater if term does not exist

Added by Andreas Müller about 1 month ago. Updated 28 days ago.

Status:
Closed
Priority:
New
Category:
cdmlib
Target version:
Start date:
10/27/2021
Due date:
% Done:

100%

Severity:
critical
Found in Version:

Description

observed during CoL update

Errors:
=======
Term for representations update does not exist. Term not updated: is pro partemisapplied 
name for(b59b4bd2-11ff-45d1-bae2-146efdeee206)[Pro parte MisappliedName 
for => is pro parte misapplied name for, eu.etaxonomy.cdm.database.update.TermRepresentationUpdater.invoke]

cdm_production_caryophyllales_2018-11-16.sql.bz2 (3.05 MB) Andreas Kohlbecker, 11/01/2021 12:59 PM


Related issues

Related to Edit - bug #9477: New ordered terms do not have correct order index Closed 02/25/2021

Associated revisions

Revision d5693d33 (diff)
Added by Andreas Müller about 1 month ago

fix #9831 reduce error handling for missing terms, languages or representations from error to warning in TermRepresentationUpdater

Revision 67603589 (diff)
Added by Andreas Müller about 1 month ago

ref #9831 reduce error handling for missing terms, languages or representations from error to warning in Adder

Revision 43ca311a (diff)
Added by Andreas Müller 29 days ago

fix #9831, ref #9477 fix failing term loading for unordered missing terms

History

#1 Updated by Andreas Müller about 1 month ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#2 Updated by Andreas Müller 29 days ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker

Andreas, can you test this with an old database on WS1.

#3 Updated by Andreas Kohlbecker 29 days ago

I tested updating of the attached (cdm_production_caryophyllales_2018-11-16.sql.bz2) database on ws1 and it failed due to a class cast exception. This is another error than that reported here. PLease try your self and decide how to handle this:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'persistentTermInitializer': Invocation of init method failed; nested exception is java.lang.RuntimeException: java.lang.ClassCastException: eu.etaxonomy.cdm.model.description.MeasurementUnit ca
nnot be cast to eu.etaxonomy.cdm.model.term.OrderedTermBase
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:137)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:407)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1611)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:757)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
        at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:930)
        at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
        at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:889)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:356)
        at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)
        at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:822)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
        at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
        at eu.etaxonomy.cdm.server.instance.StartupQueue$StartupThread.run(StartupQueue.java:191)
Caused by: java.lang.RuntimeException: java.lang.ClassCastException: eu.etaxonomy.cdm.model.description.MeasurementUnit cannot be cast to eu.etaxonomy.cdm.model.term.OrderedTermBase
        at eu.etaxonomy.cdm.model.term.init.TermLoader.loadSingleTerms(TermLoader.java:198)
        at eu.etaxonomy.cdm.database.PersistentTermInitializer.doInitialize(PersistentTermInitializer.java:144)
        at eu.etaxonomy.cdm.model.term.DefaultTermInitializer.initialize(DefaultTermInitializer.java:37)
        at eu.etaxonomy.cdm.database.PersistentTermInitializer.initialize(PersistentTermInitializer.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:366)
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:311)
        at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:134)
        ... 25 common frames omitted
Caused by: java.lang.ClassCastException: eu.etaxonomy.cdm.model.description.MeasurementUnit cannot be cast to eu.etaxonomy.cdm.model.term.OrderedTermBase
        at eu.etaxonomy.cdm.model.term.init.TermLoader.loadSingleTerms(TermLoader.java:189)
        ... 35 common frames omitted

#4 Updated by Andreas Müller 29 days ago

  • Status changed from Feedback to Resolved

#5 Updated by Andreas Müller 29 days ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker
  • % Done changed from 50 to 70

ahh, good you found this. It is actually not a problem of the update script but of the term loader which was introduced by 749a2e199d for #9477 . The term loading for newly introduced unordered terms did not work anymore. This should be fixed now. Can you try again. I already tested successful with the local DB dump.

#6 Updated by Andreas Müller 29 days ago

  • Related to bug #9477: New ordered terms do not have correct order index added

#7 Updated by Andreas Kohlbecker 28 days ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • % Done changed from 70 to 100

definitely fixed, can be closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)