Skip to content

Timeout value type cast exception when creating a deposit location. #2132

@jameswsullivan

Description

@jameswsullivan

Describe the bug

When creating a deposit location, if you enter a different Repository Timeout (seconds) value than the default 240, it would cause the following exception upon creation (and a 500 error in the UI).

java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Integer (java.lang.String and java.lang.Integer are in module java.base of loader 'bootstrap')
	at org.tdl.vireo.model.repo.impl.DepositLocationRepoImpl.create(DepositLocationRepoImpl.java:44) ~[classes!/:na]
	at org.tdl.vireo.model.repo.impl.DepositLocationRepoImpl$$FastClassBySpringCGLIB$$c3faf0ed.invoke(<generated>) ~[classes!/:na]
Image

The error is not triggered if you leave the 240 as the default, and then go back and update the timeout after it's been created.

To Reproduce
Settings - Application - DEPOSIT LOCATIONS - Add Deposit Location - fill out everything and change the default 240 and hit "Create".

I tested with the latest code from main branch and it's manifesting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions