SolrMarc and Solr 8.2

5 views
Skip to first unread message

Demian Katz

unread,
Oct 22, 2019, 12:24:01 PM10/22/19
to solrma...@googlegroups.com

Hello,

 

I’ve just started working on a pull request to upgrade VuFind to use Solr 8.2:

 

https://github.com/vufind-org/vufind/pull/1477

 

However, when I try to run SolrMarc on this branch, it fails with:

 

Error Specified solrj class name, found, but it isnt a SolrServer or a SolrClient

 

Which appears to be coming from here:

 

https://github.com/solrmarc/solrmarc/blob/master/src/org/solrmarc/solr/SolrCoreLoader.java#L147

 

I’m guessing this means that the SolrJ interface has changed in yet another backward-incompatible way, and we need to come up with a new way to wrap the object.

 

Has anyone else encountered this?

 

I’m willing to put some time into investigating this more carefully, but I want to be sure I’m not repeating work that has already been done. Please let me know if you need me to put further effort into this!

 

thanks,
Demian

Haschart, Robert J (rh9ec)

unread,
Oct 22, 2019, 12:51:27 PM10/22/19
to solrma...@googlegroups.com
Demian,  

I haven't started any work looking at Solr 8.   It does indeed sound that they once again decided to change the SolrJ interface in a non-backwards compatible way.   In all likelihood you could use a Solr7 Solrj to talk to a Solr8 server and everything would be fine.  But that makes support and upgrading on your end more problematic.   

I've just looked briefly at the documentation for solr8 and the necessary interface don't seem noticably different, so maybe getting it to work won't be too hard.

-Bob

From: solrma...@googlegroups.com <solrma...@googlegroups.com> on behalf of Demian Katz <demia...@villanova.edu>
Sent: Tuesday, October 22, 2019 12:23 PM
To: solrma...@googlegroups.com <solrma...@googlegroups.com>
Subject: [solrmarc-tech] SolrMarc and Solr 8.2
 
--
You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrmarc-tec...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/solrmarc-tech/DM6PR03MB49220C4C7A916B8311DC1D13E8680%40DM6PR03MB4922.namprd03.prod.outlook.com.

Tod Olson

unread,
Oct 22, 2019, 1:34:14 PM10/22/19
to solrmarc-tech, Tod Olson
Sounds like the browse handler is implicated. Hard to tell if this is a quick fix or not without tearing into it.

-Tod

Demian Katz

unread,
Oct 22, 2019, 1:41:12 PM10/22/19
to solrma...@googlegroups.com

Tod,

 

I don’t think the browse handler is causing the SolrMarc error, since Solr itself starts up and responds as normal. However, you are correct that the browse handler does not compile with Solr 8. Here is my compiler output:

 

Buildfile: /opt/vufind-browse-handler/build.xml

 

clean:

   [delete] Deleting directory /opt/vufind-browse-handler/build

 

setup:

    [mkdir] Created dir: /opt/vufind-browse-handler/build

    [mkdir] Created dir: /opt/vufind-browse-handler/build/deps

    [mkdir] Created dir: /opt/vufind-browse-handler/build/bundled-deps

 

setup-solr-deps:

 

unpack-solr-war:

 

build-common:

    [mkdir] Created dir: /opt/vufind-browse-handler/build/common

    [javac] Compiling 8 source files to /opt/vufind-browse-handler/build/common

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 8

    [javac] 1 warning

 

build-handler:

    [mkdir] Created dir: /opt/vufind-browse-handler/build/browse-handler

    [javac] Compiling 13 source files to /opt/vufind-browse-handler/build/browse-handler

    [javac] warning: [options] bootstrap class path not set in conjunction with -source 8

    [javac] /opt/vufind-browse-handler/browse-handler/java/org/vufind/solr/handler/AuthDB.java:63: error: bad operand types for binary operator '>'

    [javac]         if (results.totalHits > 0) {

    [javac]                               ^

    [javac]   first type:  TotalHits

    [javac]   second type: int

    [javac] /opt/vufind-browse-handler/browse-handler/java/org/vufind/solr/handler/AuthDB.java:80: error: bad operand types for binary operator '<'

    [javac]         for (int i = 0; i < results.totalHits; i++) {

    [javac]                           ^

    [javac]   first type:  int

    [javac]   second type: TotalHits

    [javac] /opt/vufind-browse-handler/browse-handler/java/org/vufind/solr/handler/BibDB.java:96: error: <anonymous org.vufind.solr.handler.BibDB$1> is not abstract and does not override abstract method scoreMode() in Collector

    [javac]         db.search(q, new SimpleCollector() {

    [javac]                                            ^

    [javac] /opt/vufind-browse-handler/browse-handler/java/org/vufind/solr/handler/BibDB.java:186: error: <anonymous org.vufind.solr.handler.BibDB$2> is not abstract and does not override abstract method scoreMode() in Collector

    [javac]         db.search(q, new SimpleCollector() {

    [javac]                                            ^

    [javac] /opt/vufind-browse-handler/browse-handler/java/org/vufind/solr/handler/BibDB.java:279: error: <anonymous org.vufind.solr.handler.BibDB$3> is not abstract and does not override abstract method scoreMode() in Collector

    [javac]         db.search(q, new SimpleCollector() {

    [javac]                                            ^

    [javac] /opt/vufind-browse-handler/browse-handler/java/org/vufind/solr/handler/BrowseItem.java:157: warning: [deprecation] Integer(int) in Integer has been deprecated

    [javac]         this.setCount(new Integer(count));

    [javac]                       ^

    [javac] /opt/vufind-browse-handler/browse-handler/java/org/vufind/solr/handler/BrowseRequestHandler.java:60: warning: [deprecation] toSolrParams(NamedList) in SolrParams has been deprecated

    [javac]         solrParams = SolrParams.toSolrParams(args);

    [javac]                                ^

    [javac] /opt/vufind-browse-handler/browse-handler/java/org/vufind/solr/handler/BrowseRequestHandler.java:94: warning: [deprecation] Integer(String) in Integer has been deprecated

    [javac]             return new Integer(s).intValue();

    [javac]                    ^

    [javac] 5 errors

    [javac] 4 warnings

 

BUILD FAILED

/opt/vufind-browse-handler/build.xml:84: Compile failed; see the compiler error output for details.

 

This is off-topic for the SolrMarc list, so we should take further discussion of the browse handler to a different forum… but it is definitely another issue that will have to be resolved!

 

- Demian

Demian Katz

unread,
Oct 22, 2019, 1:41:32 PM10/22/19
to solrma...@googlegroups.com

Thanks, Bob – do you want me to take a stab at this?

 

- Demian

Haschart, Robert J (rh9ec)

unread,
Oct 22, 2019, 1:58:40 PM10/22/19
to solrma...@googlegroups.com
It would be helpful for you to look at it.   I have a few other changes that I've been making to SolrMarc, some of which aren't even pushed to the repo yet, But I plan on pushing them soon, and doing a release (including Tod's pull request) after that.

-Bob


Sent: Tuesday, October 22, 2019 1:41 PM
To: solrma...@googlegroups.com <solrma...@googlegroups.com>
Subject: RE: [EXTERNAL] [solrmarc-tech] Re: SolrMarc and Solr 8.2
 

Demian Katz

unread,
Oct 22, 2019, 2:19:57 PM10/22/19
to solrma...@googlegroups.com

Great, I’ll see what I can come up with this afternoon. I’ll either open a pull request or report back here, depending on my degree of success. 😊

Demian Katz

unread,
Oct 22, 2019, 2:38:45 PM10/22/19
to solrma...@googlegroups.com

Good news: it appears to have been a simple fix!

 

https://github.com/solrmarc/solrmarc/pull/86

 

Assuming you have no concerns and are able to merge this, please let me know when the new release is out so I can get us upgraded on the VuFind side!

 

thanks,

Demian

 

From: solrma...@googlegroups.com <solrma...@googlegroups.com> On Behalf Of Haschart, Robert J (rh9ec)

Sent: Tuesday, October 22, 2019 1:59 PM
To: solrma...@googlegroups.com

Levy, Michael

unread,
Oct 27, 2019, 7:50:01 PM10/27/19
to solrma...@googlegroups.com
This discussion is very timely for me because I've been exploring migrating to 8.2.0 and I'm seeing this error.

SolrMarc is only one source of data comprising our Solr catalog data, and I have plenty of other non-solrmarc issues to work on while migrating from Solr 5.4.0 to 8.2.0 (as you can imagine).

When you get to it, I do look forward to a new solrmarc_core_x.x.jar and I'll let you know how it goes.

Michael Levy

unread,
Dec 3, 2019, 9:04:30 AM12/3/19
to solrmarc-tech
Hello all,

I am interested in Solr 8.2. Would it be useful for me to show what I"m doing along with warnings and errors, etc, here? I'm not set up to easily compile from source, so at this point I'm only using solrmarc_core_3.3.jar

Is it required to have a JDK (which I don't have available currently in the environment where this runs) or can I make do with a JRE?

Demian Katz

unread,
Dec 3, 2019, 9:39:33 AM12/3/19
to solrma...@googlegroups.com

Michael,

 

Unfortunately, I think you’re going to need a JDK, for two reasons:

 

  1. SolrMarc 3.3 does not work with Solr 8; you’re going to have to compile the current master code from source in order to get a compatible version (unless Bob is ready to mint a 3.4 release in the near future).
  2. SolrMarc needs a JDK in order to support dynamic compilation, which it uses for custom indexing methods. You can probably get away with a JRE if you don’t need this capability, but it’s a pretty useful thing to have, so I’d recommend going the JDK route if at all possible.

 

Please let us know if we can be of further assistance! Information on errors and warnings is definitely useful, but the problems with the 3.3 release are already known and resolved, so I’d strongly recommend getting set up to compile from master before proceeding. I’m happy to answer any questions about that as well if you run into trouble!

 

- Demian

 

From: solrma...@googlegroups.com <solrma...@googlegroups.com> On Behalf Of Michael Levy
Sent: Tuesday, December 3, 2019 9:04 AM
To: solrmarc-tech <solrma...@googlegroups.com>
Subject: [EXTERNAL] [solrmarc-tech] Re: SolrMarc and Solr 8.2

 

Hello all,

--

You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrmarc-tec...@googlegroups.com.

Levy, Michael

unread,
Dec 3, 2019, 5:00:32 PM12/3/19
to solrma...@googlegroups.com
Thanks, Demian. I guess I had to hear not to hold my breath.  :-)  And thanks to Bob and everyone else who helps with SolrMarc.

I was able to build solrmarc_core_3.3-20-g966aae7e.jar and get it to run.



Demian Katz

unread,
Dec 4, 2019, 7:30:50 AM12/4/19
to solrma...@googlegroups.com

Excellent, glad to hear you got things working – let us know if you run into any problems along the way!

 

From: solrma...@googlegroups.com <solrma...@googlegroups.com> On Behalf Of Levy, Michael
Sent: Tuesday, December 3, 2019 5:00 PM
To: solrma...@googlegroups.com

Reply all
Reply to author
Forward
0 new messages