Project

General

Profile

feature request #4716

Other dependencies to be updated

Added by Andreas Müller about 4 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
New
Category:
cdmlib
Target version:
Start date:
11/26/2015
Due date:
02/01/2016
% Done:

100%

Severity:
normal

Description

We currently do update spring dependencies to version 3.2.13 (#4702) as this is required for java 8. As we update dependencies anyway we may also updated some other libraries.

References:

TODO - Urgent:

  • remove and solve ignore from DescriptionServiceImplTest.testMoveDescriptionElementsToTaxon => see comment81

  • AK: fix hibernate search related issues

    • fix TaxonServiceSearchTest
    • 8096b11 : IndexDocValue relates issues solved, indexing now without exceptions, most tests in TaxonServiceSearchTest successful
    • remove Index annotations from abstract classes, hibernate search seems not capable of indexing polymorph classes. This will remove the @HSEARCH000044 warings.
    • fix makeIndexManager which requires SearchFactoryImplementor which is not available in hibernate-search 5.2.1 anymore 96d3c40
    • ~~check if IndexSearcher.setDefaultFieldSortScoring(boolean, boolean) is still needed. It has been removed from IndexSearcher API in v4.0.0 (http://grepcode.com/file/repo1.maven.org/maven2/org.apache.lucene/lucene-core/4.0.0/org/apache/lucene/search/IndexSearcher.java#IndexSearcher). It has been used in LuceneSearch.getSearcher() and QueryFactory.indexSearcherFor(Class) ~~ these setting have been moved into the search methods, which all exist also as @IndexSearcher.search(... , boolean doDocScores, boolean doMaxScore)@,the default for for both parameters is @false@- : 1d2c42b
    • check why test index does not go into target folder anymore but is created in root directory of the according modul. This way it is not recognized by gitignore and also it masses up the base directory --> #5415
    • check correct new values for multipleValuesPerDocument and scoreMode in QueryFactory.newJoinQuery(xxx)
    • check correct usage of maxScore in LuceneSearch.TopGroupsWithMaxScore when creating new TopGroups. Before the parameter maxScore could not be passed. 57ea8a3
    • check if SearchResultHighlighter.getFragmentsWithHighlightedTerms(TermPositionVector termPosVector, Query query,xxx) should be replaced by a modern API. TermPositionVector is an outdated API which does not exist anymore in lucene 4.10. For now the method was commented as it seems not to be used. 46829a9
    • hibernate-search auf hibernate-search-orm umstellen
    • decide on which QueryParser (lucene) to use. The old one seems to be split in org.apache.lucene.queryparser.classic.QueryParser and org.apache.lucene.queryparser.surround.parser and maybe also org.apache.lucene.queryparser.flexible.standard. ist is ok to use the classic one, the flexible standard has not advantage for us at the moment.
    • check if @Field(store=Store.YES, termVector=TermVector.NO) annotation on CdmBase.id is still required (throws HSEARCH000247 exception) : https://github.com/hibernate/hibernate-search/blob/master/engine/src/test/java/org/hibernate/search/test/metadata/FieldConfigurationTest.java 1432e66
  • check if the h2 upgrade created problems => tested, I could easily connect to a 1.3 H2 with the new 1.4 dependency

  • AK: use the encrypto Passwordencoder in UserService instead of the deprecated one

  • move remoting-services.xml and httpInvokerServices.xml to remoting

  • try to remove exclusions where possible

  • check if the postcommit handler were set correctly in CdmPostDataChangeObservableListener and ValidationEventListenerBase

  • AK: swagger

  • Fix issues with AuditConfiguration and xxx in DdlUpdater

  • fix EntityValidationCrudJdbcImplTest and remove ignore

  • move TableGeneratorGlobalOverride back to cdmlib-test (see r27338)

  • remove dependsOn=tableGeneratorGlobalOverride from sessionFactory in persistence.xml and security_base.xml in production mode. It should be used only for test.

  • find a solution for dbunitModul to load datasets also from jars and other packages to avoid duplication of standard dataset files

(TODO create ticket with detailed information)

TODO

  • xstream 1.4.8 seems to require java8+. Therefore we reverted to 1.4.4, maybe something in between is possible. Once fully migrating to java8 we can upgrade. Otherwise we get an error in remote-webapp test.

  • aspectj-main anttask in model-pom still uses org.springframework.aspects and not sring-aspects (?) and aspectjtools version 1.7.1

  • we may concider removing commons-dbcp.commons-dbcp by org.apache.commons.commons-dbcp2

  • we may concider moving commons-lang 2.6 (lates 2.x) to commons-lang3 3.4, but we probably have many dependencies to the old version, do they work in parallel?

  • we may consider moving commons-collections from 3.2.2 (latest 3.x) to 4.0

  • AK: what is with json-lib, why does it have jdk15 and is the dependency net.sf.json-lib:json-lib:jar:jdk15:2.4 still required

  • dozer we did not update last time as we experienced problems

  • do we want to move xpp3.xpp3 (1.1.4c) to org.ogce.xpp3 (1.1.6) ?

  • do we want to move xom.xom (1.2.5) to com.io7m.xom.xom (1.2.10) ? Already upgraded from 1.0 to 1.2.5

  • do we want to upgrade json from 20090211 to 20141113

  • do we still need hibernate-parent (last version was 3.6.)?

  • do we still need an antrun for org.hibernate.tool.ant.EnversHibernateToolTask?

  • there is a jdbc42 version for com.microsoft.sqlserver

  • decide which oracle driver to use

  • upgrade to the best matching postgresql driver (currently we use 9.4-1206-jdbc4 which works for all java and jdbc versions) but there might be better once for JRE7+ or JRE8+. See driver pom for information on java versions.

  • do we still need the hibernate3-maven-plugin in persistence.pom? We do now use hibernate4 => #5358

  • check if usertype.jodatime has been replaced by usertype.core

  • check how to upgrade to jena-tdb 3.0.0 (also check if commonsRDF is an alternative: https://commonsrdf.incubator.apache.org/ )

  • resolve those spring configuration files which still do have a spring-beans-3.0.xsd schema location

  • remove apache snapshot repository (for jena) and others

  • check if we can upgrade hibernate tooling with dependencies to hibernate 3.2.4 in persistence pom (tooling 5 is not yet released)

  • Check if SpringModule dependencies can be fully removed (it is only used in AbstractOaiPmhController for Caching, this could probably handled by other caching frameworks like EhCacheCache from spring-context-support)

  • we may want to further normalize spring config files: #5380

  • check if TaxonNodeByNameComparator is needed as spring bean as it is currently the case

  • Try to fix the HHH90000003 warnings (thrown in org.hibernate.boot.model.source.internal.hbm.ModelBinder line 2416, probably related to hibernate-envers, can be switched off by log4j.logger.org.hibernate.orm.deprecation=error) (related but not #7289)

Notes old:

  • Also changed poi from 3.10.Final to 3.12

    • commons-codec 20041127.091804 (1.8) - > 1.10 (1.9 required)
    • hamcrest-core (new, 1.3, not managed)
  • Also changed junit form 4.11->4.12

    • only dependency hamcrest-core handled by poi already
  • Also changed jaxb-api 2.2.7->2.2.12 (no dependencies)

  • jaxb-impl from 2.2-EA to 2.2.11, also test org.glassfish.jaxb which seems to be the new Jaxb implementation, also be aware that Jaxb1-impl was not further developed after 2.2.5

    • => open JAXB issue handled by #5361
  • slf4j-log4j12 from 1.7.2 to 1.7.10 (including api), no dependencies

  • cglib and cglib-nodep from 2.2.2 (latest 2.x) to 3.2

  • commons-collections from 3.2.1 to 3.2.2 (latest 3.x)

  • ehcache-core updated from 2.4.3 to 2.6.10

  • test frameworks updated or removed: #4803

  • added jdom2 which is compatible with jdom 1.x as it uses different package structure

  • Some naming needed to be adapted #5369

  • externalized test-dependencies into separate project #5370

Possible further updates:

  • ognl:ognl:jar 2.6.9->3.1.2 (only used by unitils-core

  • commons-dbcp:commons-dbcp:jar:1.4 -> org.apache.commons » commons-dbcp2 » 2.1.1 (only used by unitils-database)

  • commons-pool:commons-pool:jar:1.5.4 -> org.apache.commons » commons-pool2 » 2.4.2 (only used by unitils-database)

  • ...

mvn versions:display-dependency-updates

Subtasks


Related issues

Related to Edit - bug #6023: configuration problems with maven-antrun-plugin Closed 07/29/2016
Related to Edit - bug #7289: hibernate warning HHH90000003 pollutes log files Closed 02/22/2018

History

#1 Updated by Andreas Müller about 4 years ago

  • Priority changed from Priority08 to Highest

#2 Updated by Andreas Kohlbecker about 4 years ago

  • Target version changed from cdmlib RELEASE 3.5.0 to cdmlib RELEASE 3.5.1

moving tickets to next milestone

#3 Updated by Andreas Müller about 4 years ago

  • Target version changed from cdmlib RELEASE 3.5.1 to cdmlib RELEASE 3.5.2

move open 3.5.1 tickets to next milestone after release

#4 Updated by Andreas Müller over 3 years ago

  • Target version changed from cdmlib RELEASE 3.5.2 to Release 3.12

#5 Updated by Andreas Müller over 3 years ago

  • Status changed from New to In Progress

#6 Updated by Andreas Müller over 3 years ago

Hallo Katja,

nach dem dependency upgrade bekomme ich ein Problem mit der Methode DescriptionServiceImplTest.testMoveDescriptionElementsToTaxon

Diese führt in Zeile 182

service.moveDescriptionElementsToDescription(targetDescription.getElements(), sourceDescription, false);

aus.

Dieser Befehlr führt dazu, dass targetDescription gelöscht wird, weil sie keine Kinder mehr hat.

Später wird der Befehl

this.service.save(targetDescription);

ausgeführt, wodurch die targetDescription wieder hinzugefügt wird. Allerdings wird nachdem upgrade dabei ein Fehler geschmissen, weil das Reattache explizit für die Collection .workingSet nicht funktioniert, da dass Set noch nicht initialisiert wurde.

Die Frage ist jetzt, ob das Testverhalten so gewollt ist. Also ist es gewollt, dass die targetDescription erst gelöscht wird und dann wieder gesaved und erwarten wir, dass das ohne Probleme funktioniert?

Oder können wir das Testdesign noch verbessern.

Ich bin mir da selber gerade unsicher, ob das eher ein Fehlverhalten von hibernate ist, oder ob wir etwas falsch machen.

Der Fehler tritt nicht mehr auf, wenn man entweder CascadeType.DELETE zu DescriptionBase.workingSets hinzufügt oder vor dem delete ein targetDescription.getWorkingSets().size() aufruft, das ist aber letztlich nur ein Workaround.

Können wir das nochmal zusammen anschauen?

Viele Grüße,

Andreas M.

#7 Updated by Andreas Müller over 3 years ago

Stacktrace for above error is:

org.hibernate.HibernateException: could not reassociate uninitialized transient collection
    at org.hibernate.event.internal.ProxyVisitor.reattachCollection(ProxyVisitor.java:75)
    at org.hibernate.event.internal.WrapVisitor.processCollection(WrapVisitor.java:50)
    at org.hibernate.event.internal.AbstractVisitor.processValue(AbstractVisitor.java:104)
    at org.hibernate.event.internal.WrapVisitor.processValue(WrapVisitor.java:108)
    at org.hibernate.event.internal.AbstractVisitor.processEntityPropertyValues(AbstractVisitor.java:59)
    at org.hibernate.event.internal.AbstractSaveEventListener.visitCollectionsBeforeSave(AbstractSaveEventListener.java:365)
    at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:257)
    at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:178)
    at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:121)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192)
    at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177)
    at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
    at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:678)
    at org.hibernate.internal.SessionImpl.save(SessionImpl.java:670)
    at org.hibernate.internal.SessionImpl.save(SessionImpl.java:665)
    at eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase.save(CdmEntityDaoBase.java:324)
    at eu.etaxonomy.cdm.api.service.ServiceBase.save(ServiceBase.java:249)
    at eu.etaxonomy.cdm.api.service.ServiceBase.save(ServiceBase.java:1)
    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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
    at com.sun.proxy.$Proxy164.save(Unknown Source)
    at eu.etaxonomy.cdm.api.service.DescriptionServiceImplTest.testMoveDescriptionElementsToTaxon(DescriptionServiceImplTest.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at ...

#8 Updated by Patrick Plitzner over 3 years ago

  • Target version deleted (Release 3.12)

#9 Updated by Andreas Müller about 3 years ago

  • Status changed from In Progress to Resolved

#10 Updated by Andreas Kohlbecker almost 3 years ago

  • Related to bug #6023: configuration problems with maven-antrun-plugin added

#12 Updated by Andreas Kohlbecker about 1 year ago

  • Related to bug #7289: hibernate warning HHH90000003 pollutes log files added

#13 Updated by Andreas Kohlbecker about 1 year ago

  • Description updated (diff)

#14 Updated by Andreas Kohlbecker about 1 year ago

  • Private changed from Yes to No

can this be closed?

#15 Updated by Andreas Müller about 1 year ago

  • Description updated (diff)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)