Project

General

Profile

Actions

bug #9831

closed

Exception in TermRepresentationUpdater if term does not exist

Added by Andreas Müller about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
New
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
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]

Files


Related issues

Related to EDIT - bug #9477: New ordered terms do not have correct order indexClosedAndreas Müller

Actions
Actions #1

Updated by Andreas Müller about 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50
Actions #2

Updated by Andreas Müller about 2 years ago

  • Assignee changed from Andreas Müller to Andreas Kohlbecker

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

Actions #3

Updated by Andreas Kohlbecker about 2 years 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
Actions #4

Updated by Andreas Müller about 2 years ago

  • Status changed from Feedback to Resolved
Actions #5

Updated by Andreas Müller about 2 years 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.

Actions #6

Updated by Andreas Müller about 2 years ago

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

Updated by Andreas Kohlbecker about 2 years 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

Actions

Also available in: Atom PDF