Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR - Could not find material type #47

Open
LibraryIT opened this issue Mar 25, 2022 · 2 comments
Open

ERROR - Could not find material type #47

LibraryIT opened this issue Mar 25, 2022 · 2 comments

Comments

@LibraryIT
Copy link

I am setting up the order import tool and have run into a snag. During start up, it can't seem to find the material type set in the import.properties file. When I run start.jar, all of the checks pass except for material type:

ERROR [main] - materialType: Could not find material type by the name [physical]
ERROR [main] - FAILED TO START SERVICE: ONE OR MORE LOOKUPS OF UUIDS FOR CODES/NAMES FAILED.

The credentials are correct, the user the app runs on has the correct permissions, and the material type does exist. What am I missing? I cloned the Github repo and so should be on the latest version. Here is my import.properties file:

baseOkapiEndpoint = https://okapi-skidmore.folio.ebsco.com
okapi_username = <redacted>
okapi_password = <redacted>
tenant = fs00001051
permELocation = Electronic Resource
permLocation = On Order -- Item not yet in library
fiscalYearCode = FY2122
textForElectronicResources = Electronic Resource
noteType = General note
materialType = physical
purchaseOrderUnit = record

uploadFilePath = /var/tmp/folio-order-import

onValidationErrors = skipFailed
onIsbnInvalid = removeIsbn

tzTimeZone = America/New_York
folioUiUrl = https://skidmore.folio.ebsco.com/
@maccabeelevine
Copy link
Collaborator

maccabeelevine commented Mar 25, 2022

Doing some triage... it looks like the app is checking the material type against a preconfigured array in Constants.

String materialTypeId = Constants.MATERIAL_TYPES_MAP.get(materialType);

And that array doesn't include "physical" as a type.

I see that there's a method in the default MarcToFolio mapping materialTypeId() which uses that map.

public String materialTypeId() throws Exception {

It's overridden in the sigma mapping to actually query FOLIO for possible material types.

public String materialTypeId () throws Exception {

But a) you're using the default (chi) mapping and b) that function doesn't seem to be used in the initial validation check, possibly for good reason.

@nielserik expertise probably needed here.

@LibraryIT
Copy link
Author

LibraryIT commented Mar 25, 2022

"Physical" is one of our material types. Is it fair to say if we set the material type to something in the list, the app will complete the check?

EDIT: I set the material type to "unspecified" and was able to pass the check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants