Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Method signature types for methods of javax.persistence.AttributeConverter no longer included in configuration. #1329

Closed

Description

@christophstrobl

spring-native: 0.11.0-SNAPSHOT

In the sample below, both MonetaryAmountAttributeConverter and MonetaryAmount are added to the configuration, but the more concrete return type org.javamoney.moneta.Money of convertToEntityAttribute(...) ist not.

@Converter(autoApply = true)
public class MonetaryAmountAttributeConverter implements AttributeConverter<MonetaryAmount, String> {

	@Override
	public String convertToDatabaseColumn(MonetaryAmount amount) {
		// ...
	}

	@Override
	public Money convertToEntityAttribute(String source) { // Money type not added to configuration

this leads to the following warn on startup

j.m.s.DefaultMonetaryAmountsSingletonSpi : Using Money as default amount type, because loading of configured org.javamoney.moneta.Money.defaults.amountType failed

java.lang.ClassNotFoundException: org.javamoney.moneta.Money
	at java.lang.Class.forName(DynamicHub.java:1433) ~[restbucks:na]
	at java.lang.Class.forName(DynamicHub.java:1408) ~[restbucks:na]
	at org.javamoney.moneta.spi.DefaultMonetaryAmountsSingletonSpi.loadDefaultAmountType(DefaultMonetaryAmountsSingletonSpi.java:66) ~[restbucks:1.4.2]
	at org.javamoney.moneta.spi.DefaultMonetaryAmountsSingletonSpi.<init>(DefaultMonetaryAmountsSingletonSpi.java:46) ~[restbucks:1.4.2]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[na:na]

Activity

  1. sdeleuze commented on Dec 6, 2021

    @sdeleuze
    Contributor

    Could you a please share a minimal repro?

  2. added this to the 0.11.1 milestone on Dec 6, 2021
  3. added
    type: compatibility
    on Dec 6, 2021
  4. christophstrobl commented on Dec 7, 2021

    @christophstrobl
    ContributorAuthor

    closed via: 906925e by #1347

  5. modified the milestones: 0.11.1, 0.11.0 on Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: compatibility

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions