I am trying to compile the search server following the instructions from Search server setup
When compiling the search server i am getting the following error: [ERROR] /opt/musicbrainz/search-server/index/src/main/java/org/musicbrainz/search/index/ReleaseIndex.java:[400,53] error: incompatible types: String cannot be converted to PrimaryType [ERROR] /opt/musicbrainz/search-server/index/src/main/java/org/musicbrainz/search/index/ReleaseIndex.java:[407,38] error: no suitable method found for add(String) [ERROR] method Collection.add(SecondaryType) is not applicable (argument mismatch; String cannot be converted to SecondaryType) method List.add(SecondaryType) is not applicable (argument mismatch; String cannot be converted to SecondaryType)
My guess is this a problem with the classes generated by the mmd-schema not matching what the search server is expecting.
I have tried compiling the mmd-schema cleanly by checking out from git and running mvn install without modification.
I have also tried to following the steps in the README file but the instructions are not clear.
Could someone give me some ideas on how to compile this?
If possible could someone send me thair jar file containing the mmd-schema so i can install it in my local maven repository and reverse engineer what needs to be done.
/data/search_server/index/src/main/java/org/musicbrainz/search/index/WorkIndex.java:[165,44] error: no suitable method found for add(String)
method Collection.add(Attribute) is not applicable
(argument mismatch; String cannot be converted to Attribute)
method List.add(Attribute) is not applicable
(argument mismatch; String cannot be converted to Attribute)
/data/search_server/index/src/main/java/org/musicbrainz/search/index/WorkIndex.java:[195,48] error: no suitable method found for add(String)
method Collection.add(Attribute) is not applicable
(argument mismatch; String cannot be converted to Attribute)
method List.add(Attribute) is not applicable
(argument mismatch; String cannot be converted to Attribute)
/data/search_server/index/src/main/java/org/musicbrainz/search/index/RecordingIndex.java:[928,57] error: cannot find symbol
could not parse error message: symbol: class Track
location: class TrackList
/data/search_server/index/src/main/java/org/musicbrainz/search/index/RecordingIndex.java:928: error: cannot find symbol
org.musicbrainz.mmd2.Medium.TrackList.Track track = of.createMediumTrackListTrack();
In the meantime I’ve fixed the code to allow both mmd-schema and search-server to compile from HEAD. All the tests pass, but I haven’t had a chance to actually test the code in a live setup yet. The latest jar/war files are on the ftp site:
I’d love to hear from you on how they are working. Also, we prefer using the Oracle Java to compile the search server files, so I haven’t tested the openjdk for compiling.
Hi. I’m having a few issues compiling the search server and I’m hoping you can help get things sorted. Specifically, when throwing the “mvn package” command into the search-server folder, we are getting the following error:
“Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project servlet: Compilation failure: Compilation failure:”
I have java 8 jdk, maven 2 and tomcat 7 installed. Please let me know what you think at your earliest possible convenience. Thanks! – Nico
You want to store the indexes in the following directory as that is what the web app is expecting.
/home/search/indexdata
You will end up running something like the following to build the indexes:
java -Xmx512M -jar $SEARCH_UPDATER_JAR --indexes $INDEXES --db-host $DB_HOST --db-name $DB_NAME --db-user $DB_USER --db-password “$DB_PASSWORD” --indexes-dir $INDEXES_DIR $@
This may take days depending on how fast your server is.
Postgresql by default does not allow you to connect to it over the network by username and password so you need to enable this first.
The first thing you need to do is get postgresql to listen on a network.
edit postgresql.conf this may be in /etc/postgresql/9.5/main for debian / ubuntu.
listen_addresses = '*'
port = 5432
You then need to let postgresql know what machines to accept connections over what authentication methods.
edit pg_hba.conf and add a ip range to accept connections from.
The below will allow you to conect over tcp to the local database using username and password,
host all all 127.0.0.1/32 md5
Hi. Seems I have everything I need regarding the search server. How can I test if it’s working properly? And what should I set to LUCENE_SERVER in DBDefs.pm?