Skip to Content
0
Aug 08, 2023 at 06:52 PM

Hybris DB-connection or RelationInvalidationListener errors after Update to 2205

251 Views

We started getting a lot of errors in integration tests that use impex scripts and the importCsv() method after updating Hybris to version 2205. Especially for tear down impex scripts that are imported in the @After method.

It also seems that junit tenat initialization (by yunitinit command) helps solve the problem, but only for one test case. So maybe there is a table in the database that needs to be cleared before running the test?

This does not affect the execution of tests, but it makes it very difficult to read the logs.

Please share your experience with this problem. I found a similar question here, but unfortunately without answers.


Full error stack trace in attached file transaction-invalidation-error.txt.

Short stack trace below:

ERROR [hybrisHTTP14] (junit) [InvalidationTopic] unexpected error invalidating InvalidationTopic[hjmp, entity] via listener de.hybris.platform.cache.relation.RelationInvalidationListener@a867b41asked
java.lang.IllegalStateException: The transaction is performing invalidatins after commit / rollback. You cannot access the database in this phase.
        at de.hybris.platform.tx.Transaction.getTXBoundConnection(Transaction.java:1900) ~[coreserver.jar:?]
        at de.hybris.platform.jdbcwrapper.DataSourceImpl.getFromPool(DataSourceImpl.java:484) ~[coreserver.jar:?]
        at de.hybris.platform.jdbcwrapper.DataSourceImpl.doGetConnection(DataSourceImpl.java:465) ~[coreserver.jar:?]
        at de.hybris.platform.jdbcwrapper.DataSourceImpl.getConnection(DataSourceImpl.java:456) ~[coreserver.jar:?]
        at de.hybris.platform.jdbcwrapper.DataSourceImpl.getConnection(DataSourceImpl.java:410) ~[coreserver.jar:?]
        at de.hybris.platform.persistence.type.ComposedType_HJMPWrapper$FindByTypeCode1FinderResult.getFromDatabase(ComposedType_HJMPWrapper.java:1568) ~[coreserver.jar:?]
        at de.hybris.platform.persistence.type.ComposedType_HJMPWrapper$FindByTypeCode1FinderResult.compute(ComposedType_HJMPWrapper.java:1556) ~[coreserver.jar:?]
        at de.hybris.platform.cache.AbstractCacheUnit.privateGetNoLock(AbstractCacheUnit.java:297) ~[coreserver.jar:?]
        at de.hybris.platform.cache.AbstractCacheUnit.privateGet(AbstractCacheUnit.java:270) ~[coreserver.jar:?]
        at de.hybris.platform.cache.AbstractCacheUnit.get(AbstractCacheUnit.java:172) ~[coreserver.jar:?]
        at de.hybris.platform.persistence.type.ComposedType_HJMPWrapper$FindByTypeCode1FinderResult.getFinderResult(ComposedType_HJMPWrapper.java:1528) ~[coreserver.jar:?]
        at de.hybris.platform.persistence.type.ComposedType_HJMPWrapper.ejbFindByTypeCode(ComposedType_HJMPWrapper.java:1601) ~[coreserver.jar:?]
        at jdk.internal.reflect.GeneratedMethodAccessor407.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
        at de.hybris.platform.util.Utilities.callMethod(Utilities.java:1021) ~[coreserver.jar:?]
        at de.hybris.platform.util.Utilities.callMethod(Utilities.java:1011) ~[coreserver.jar:?]
        at de.hybris.platform.persistence.framework.HomeInvocationHandler.invokeMethod(HomeInvocationHandler.java:105) ~[coreserver.jar:?]
        at de.hybris.platform.persistence.framework.HomeInvocationHandler.invoke(HomeInvocationHandler.java:55) ~[coreserver.jar:?]
        at jdk.proxy2.$Proxy25.findByTypeCode(Unknown Source) ~[?:?]
        at de.hybris.platform.persistence.type.TypeManagerEJB.getRootComposedType(TypeManagerEJB.java:445) ~[coreserver.jar:?]
        at de.hybris.platform.jalo.type.TypeManager.getRootComposedType(TypeManager.java:338) ~[coreserver.jar:?]
        at de.hybris.platform.cache.relation.TypePKsExtractor.getTypePKs(TypePKsExtractor.java:62) ~[coreserver.jar:?]

Attachments