[MGNLEESOLR-140] Magnolia Solr Module Prevents 6.2 From Starting - remove Content API Created: 03/Apr/20  Updated: 23/Jul/20  Resolved: 11/May/20

Status: Closed
Project: Solr Search Provider
Component/s: None
Affects Version/s: 5.2.2
Fix Version/s: 5.2.3

Type: Bug Priority: Neutral
Reporter: Alex Plouff Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: maintenance, solr
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Mac - Mojave
Java 1.8
Tomcat 9.0.10


Attachments: XML File core-pom.xml     Text File dependencyTree.txt     XML File parent-pom.xml     XML File webapp-pom.xml    
Issue Links:
Relates
relates to MGNLEESOLR-141 Solr module update to support Solr 8.x Closed
relation
is related to MGNLEE-606 Update parent pom for Solr module 5.2.2 Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: Solr support issues
Sprint: Maintenance 6
Story Points: 1

 Description   

Issue:
Magnolia Solr Module Prevents 6.2 From Starting

I just did the 6.2 upgrade and it looks like the magnolia solr modules are preventing magnolia from starting up.

It successfully loads the workspaces but crashes immediately after when trying to instantiate info.magnolia.module.indexer.setup.ContentIndexerVersionHandler

2020-04-03 11:01:20,717 INFO  info.magnolia.repository.DefaultRepositoryManager : Loading workspace visitors (logical name visitors).
2020-04-03 11:01:20,843 INFO  info.magnolia.repository.DefaultRepositoryManager : Loading workspace rankings (logical name rankings).
2020-04-03 11:01:20,994 INFO  info.magnolia.repository.DefaultRepositoryManager : Loading workspace messages (logical name messages).
2020-04-03 11:01:21,125 INFO  info.magnolia.repository.DefaultRepositoryManager : Loading workspace category (logical name category).
2020-04-03 11:01:25,024 INFO  info.magnolia.context.LifeTimeJCRSessionUtil      : Will handle lifetime sessions because the system context is of type interface info.magnolia.context.ThreadDependentSystemContext
2020-04-03 11:01:33,485 WARN  .manager.impl.error.filters.DBExecutionErrorFilter: Not able to find org.hibernate.HibernateException class
2020-04-03 11:01:34,973 ERROR info.magnolia.cms.beans.config.ConfigLoader       : An unspecified error occurred during initialization: Failed to create instance of [class info.magnolia.module.indexer.setup.ContentIndexerVersionHandler]
info.magnolia.objectfactory.MgnlInstantiationException: Failed to create instance of [class info.magnolia.module.indexer.setup.ContentIndexerVersionHandler]
	at info.magnolia.objectfactory.guice.GuiceComponentProvider.newInstanceWithParameterResolvers(GuiceComponentProvider.java:138) ~[magnolia-core-6.2.jar:?]
	at info.magnolia.objectfactory.guice.GuiceComponentProvider.newInstanceWithParameterResolvers(GuiceComponentProvider.java:120) ~[magnolia-core-6.2.jar:?]
	at info.magnolia.objectfactory.guice.GuiceComponentProvider.newInstance(GuiceComponentProvider.java:115) ~[magnolia-core-6.2.jar:?]
	at info.magnolia.objectfactory.Components.newInstance(Components.java:100) ~[magnolia-core-6.2.jar:?]

Workaround:

Solution:

  • We need to remove the dependency on old Content API in the new version. To remove the Content API:
    • there's one update task PropertyExistsDelegateTask which needs to be just replaced by one based on Node API
    • and one variable info.magnolia.module.indexer.IndexerConfig#content which can be simple removed - it's not used anymore


 Comments   
Comment by Christopher Zimmermann [ 06/Apr/20 ]

Setting priority to 'critical'. First step is to try to reproduce the problem locally. If not able to reproduce we can lower the priority.

Comment by Christopher Zimmermann [ 06/Apr/20 ]

aplouffHow did you do the upgrade exactly? Can you share which version of Magnolia SOLR module is being used? 

Comment by Aleksandr Pchelintcev [ 06/Apr/20 ]

aplouff this particular line in the stracktrace seems suspicious:
WARN .manager.impl.error.filters.DBExecutionErrorFilter: Not able to find org.hibernate.HibernateException class.
If I understand it correctly, your webapp may be lacking at least some of the Hibernate dependencies (probably the hibernate itself judging from the class name), can you pls double check that?

Comment by Alex Plouff [ 06/Apr/20 ]

Hi all,

This project started on 5.7, then upgraded to 6.1.3, then to 6.2

We are using the latest solr module 5.2.2

I was able to recreate on 6.2 in two environments, the one mentioned above and a fresh 6.2 instance I just created. To recreate, add the solr dependencies and start - it should fail very quickly.

Noting this hibernate error is also present in the fresh 6.2 version 

Comment by Alex Plouff [ 06/Apr/20 ]

Also, I'm surprised to see solr working in 6.1 at all. If I'm reading this module descriptor right, it shouldn't?

<dependency>
<name>core</name>
<version>5.6.4/*</version>
</dependency>
<dependency>
<name>ui-framework</name>
<version>5.6.4/*</version>
</dependency>
<dependency>
<name>scheduler</name>
<version>2.3/*</version>
</dependency>
<dependency>
<name>enterprise</name>
<version>5.5/*</version>
</dependency>

Comment by Milan Divilek [ 07/Apr/20 ]

Please add this dependency to your project

<dependency>
  <groupId>info.magnolia</groupId>
  <artifactId>magnolia-core-compatibility</artifactId>
  <version>6.2</version>
</dependency>

Crawler and Solr modules uses on few places old deprecated Content API which was removed from 6.2 core.

Comment by Alex Plouff [ 08/Apr/20 ]

The dependency above did fix the start up error.

Once things were up and running I was unable to index any content and would get errors when trying.

Adding the solr dependencies to the webapp pom resolved the issue.

It seems to be the solr modules themselves that are including/defaulting to the 5.2.1 dependencies. When I remove them, it removes both 5.2.1 & 5.2.2 dependencies and when I remove the <version> tags it loads 5.2.1 again 

Comment by Richard Gange [ 09/Apr/20 ]

For the moment I have add a note to the documentation about the compatibility dependency. See Solr module. Let's be sure and remove it when this ticket is closed. I will check update docs.

Comment by Alex Plouff [ 09/Apr/20 ]

Should I open a new ticket for the versioning issue?

Comment by Richard Gange [ 09/Apr/20 ]

Hey aplouff-

What exactly is the issue about the versions? I am not seeing it. Could you do:

mvn dependency:tree

Please share that output so I can see what is happening with the dependencies.

Thanks!
Rich

Comment by Alex Plouff [ 09/Apr/20 ]

Yeah, so when I set the <version> tag to 5.2.2 it loads both 5.2.2 and 5.2.1
When I omit the <version> tag it loads 5.2.1.

Included pom files as well - maybe i misconfigured something?

core-pom.xml
webapp-pom.xml
parent-pom.xmldependencyTree.txt

Comment by Richard Gange [ 09/Apr/20 ]

aplouff thank you very much I found it. Here is the problem. I will open the ticket.

Cheers
Rich

Comment by Alex Plouff [ 09/Apr/20 ]

Thanks @Richard

Comment by Richard Gange [ 20/May/20 ]

aplouff the parent pom has been updated. Update to version 6.2.1.

Generated at Mon Feb 12 11:00:30 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.