You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use a Postgres instead of the H2 DB for my application. When switching to Postgres DB I get errors relating to column type. I have tried multiple different types such as OID, VARCHAR, BIGINT,... .
Is the application compatible with Postgres? What are the databases I can use other than H2 for the passkey to work?
java.lang.IllegalArgumentException: Parameter value [ByteArray(0b1a119b1c68f9756e3b0046d49bb46c06ec99759153439a3c40a7ee9075dbb1)] did not match expected type [[B (n/a)] at org.hibernate.query.spi.QueryParameterBindingValidator.validate(QueryParameterBindingValidator.java:54) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final] at org.hibernate.query.spi.QueryParameterBindingValidator.validate(QueryParameterBindingValidator.java:27) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final] at org.hibernate.query.internal.QueryParameterBindingImpl.validate(QueryParameterBindingImpl.java:90) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
The text was updated successfully, but these errors were encountered:
Hi! The library is completely database-agnostic, so any database should work. In particular, I don't think the library nor its tests or the demo application has ever had a dependency on H2.
It looks like you might be trying to directly persist a RegisteredCredential instance, which isn't working because you have no ORM mapping for how to persist a com.yubico.webauthn.data.ByteArray. You might need to convert the RegisteredCredential to your own ORM type for storage and then re-assemble it in your CredentialRepository method implementations, or alternatively define type mappings so your ORM can persist a RegisteredCredential directly if you prefer that.
@emlun thank you for the help. I was able to get it working by converting all the ByteArray variables to string and saving them as varchar in database. Also needed to remove @lob annotation.
I am trying to use a Postgres instead of the H2 DB for my application. When switching to Postgres DB I get errors relating to column type. I have tried multiple different types such as OID, VARCHAR, BIGINT,... .
Is the application compatible with Postgres? What are the databases I can use other than H2 for the passkey to work?
java.lang.IllegalArgumentException: Parameter value [ByteArray(0b1a119b1c68f9756e3b0046d49bb46c06ec99759153439a3c40a7ee9075dbb1)] did not match expected type [[B (n/a)] at org.hibernate.query.spi.QueryParameterBindingValidator.validate(QueryParameterBindingValidator.java:54) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final] at org.hibernate.query.spi.QueryParameterBindingValidator.validate(QueryParameterBindingValidator.java:27) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final] at org.hibernate.query.internal.QueryParameterBindingImpl.validate(QueryParameterBindingImpl.java:90) ~[hibernate-core-5.6.12.Final.jar:5.6.12.Final]
The text was updated successfully, but these errors were encountered: