Hibernate CompositeUserType is throwing error

Hi,

I am upgrading the wildfly 26 to 30. For this we have upgraded hibrenate to 6.4.4 and all jakarta changes with Java 17.

Hibernate configuration file looks like this.

<?xml version="1.0" encoding="UTF-8"?>
  <generator class="org.hibernate.id.enhanced.SequenceStyleGenerator">
    <param name="sequence_name">SEQ_OPTIMALSETTINGVALUE</param>
    <param name="optimizer">motive.hibernate.MotiveHiLoOptimizer</param>
    <param name="increment_size">500</param>
  </generator> 				
    </id>
    <many-to-one name="optimalSetting"
        class="motive.servicerepository.service.repository.OptimalSetting"
        not-null="true" cascade="none">
        <column name="OPTIMALSETTINGID" index="ix_optimalsetting_osid" />
    </many-to-one>
    <property name="serviceId" type="java.lang.Long" column="SERVICEID" />
    <property name="servicePropertyName" type="java.lang.String"
        column="PROPERTY_NAME" length="64" />
     <component name="value" class="motive.servicerepository.service.repository.internal.BigStringUserType">
        <property name="uservalue" column="property_value"/>
        <property name="uservalue_clob" column="property_value_clob"/>
    </component>
  <component name="defaultValue" class="motive.servicerepository.service.repository.internal.BigStringUserType">
        <property name="uservalue" column="default_value"/>
        <property name="uservalue_clob" column="default_value_clob"/>
    </component>
    <property name="type" column="type" not-null="true"
        type="motive.servicerepository.service.repository.internal.OptimalSettingValueUserType" />
    <property name="hint" type="java.lang.String" column="HINT"
        length="64" />
    <property name="discriminatorFlag" type="boolean" column="DISCRIMINATOR" />
</class>

The implemnation of CompositeUserType looks like this
public class BigStringUserType implements CompositeUserType, UserType{

private static final int MAX_VARCHAR_CHARACTER_LENGTH = 1333;

private static final Logger logger = LogManager.getLogger(BigStringUserType.class);

static private final int[] SQL_TYPES = {Types.VARCHAR, Types.CLOB};

public static class BigStringMapper {
	String uservalue;
	String uservalue_clob;
}


@Override
public boolean equals(UserValue x, UserValue y) throws HibernateException {
    if ((x == null) && (y == null)) {
        return true;
    }
    if ((x == null) || (y == null)) {
        return false;
    }

    return x.equals(y);
}

@Override
public UserValue deepCopy(UserValue value) throws HibernateException {
    return value;
}

@Override
public boolean isMutable() {
    return false;
}

@Override
public UserValue assemble(Serializable cached, Object owner)
        throws HibernateException {
	final String[] parts = (String[]) cached;
	return new UserValue( parts[0], parts[1] );
}

@Override
public Serializable disassemble(UserValue value)
        throws HibernateException {
    return new UnsupportedOperationException();//(String) value;
}

@Override
public Object getPropertyValue(UserValue component, int property) throws HibernateException {
	return switch (property) {  // Hibernate sorts the properties by their names alphabetically
	case 0 -> component.getUservalue();
	case 1 -> component.getUservalue_clob();
	default -> null;
};
}

@Override
public int hashCode(UserValue x) throws HibernateException {
    // TODO Auto-generated method stub
    return 0;
}

@Override
public UserValue instantiate(ValueAccess values, SessionFactoryImplementor sessionFactory) {
    // TODO Auto-generated method stub
	final String property_value = values.getValue(0, String.class);
	final String property_value_clob = values.getValue(1, String.class);
	return new UserValue(property_value, property_value_clob);
}

@Override public Class<?> embeddable() { return BigStringMapper.class; }

@Override public Class<UserValue> returnedClass() { return UserValue.class; }

@Override
public UserValue replace(UserValue detached, UserValue managed, Object owner) {
   return detached;//deepCopy(detached);
}

@Override
public int getSqlType() {
	// TODO Auto-generated method stub
	return 0;
}

@Override
public UserValue nullSafeGet(ResultSet resultSet, int position, SharedSessionContractImplementor session, Object owner)
		throws SQLException {
	 if (resultSet.wasNull()) {
            return null;
        }
	 if(position==0) {
		 return new UserValue(resultSet.getString(position),null);
	 }
	 else
		 return new UserValue(null, resultSet.getString(position)); 
}

@Override
public void nullSafeSet(PreparedStatement statement, UserValue value, int index, SharedSessionContractImplementor session)
		throws SQLException {
	if (value == null) {
        statement.setNull(index, Types.VARCHAR);
        statement.setNull(index + 1, Types.CLOB);
    } else {
        String userValueClob = (String) value.getUservalue_clob();
        String userValue = (String) value.getUservalue();
        if (userValue.length() < userValueClob.length()) {
            statement.setString(index, userValueClob);
            statement.setNull(index + 1, Types.CLOB);
        } else {
            statement.setNull(index, Types.VARCHAR);
            statement.setString(index + 1, userValue);
        }
    }
	
}

}

The UserValue file looks like this

public class UserValue {

protected String uservalue = null;  // plaintext to be persisted into a secure Vault storage
protected String uservalue_clob = null;
public String getUservalue() {
	return uservalue;
}
public void setUservalue(String uservalue) {
	this.uservalue = uservalue;
}
public String getUservalue_clob() {
	return uservalue_clob;
}
public void setUservalue_clob(String uservalue_clob) {
	this.uservalue_clob = uservalue_clob;
}
public UserValue(String uservalue, String uservalue_clob) {
	//super();
	this.uservalue = uservalue;
	this.uservalue_clob = uservalue_clob;
}
public UserValue() {
	// TODO Auto-generated constructor stub
}

}

During server startup I am getting this error.

Caused by: java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
motive/servicerepository/service/repository/internal/BigStringUserType$BigStringMapper$HibernateAccessOptimizer$s6obSKho.setPropertyValues(Ljava/lang/Object;[Ljava/lang/Object;)V @11: invokevirtual
Reason:
Type ‘motive/servicerepository/service/repository/internal/BigStringUserType$BigStringMapper’ (current frame, stack[0]) is not assignable to ‘motive/servicerepository/service/repository/internal/UserValue’
Current Frame:
bci: @11
flags: { }
locals: { ‘motive/servicerepository/service/repository/internal/BigStringUserType$BigStringMapper$HibernateAccessOptimizer$s6obSKho’, ‘java/lang/Object’, ‘[Ljava/lang/Object;’ }
stack: { ‘motive/servicerepository/service/repository/internal/BigStringUserType$BigStringMapper’, ‘java/lang/String’ }
Bytecode:
0000000: 2bc0 0018 2c12 1932 c000 1bb6 0021 2bc0
0000010: 0018 2c12 2232 c000 1bb6 0025 b1

    at java.lang.ClassLoader.defineClass0(Native Method) ~[?:?]
    at java.lang.System$2.defineClass(System.java:2307) ~[?:?]
    at java.lang.invoke.MethodHandles$Lookup$ClassDefiner.defineClass(MethodHandles.java:2439) ~[?:?]
    at java.lang.invoke.MethodHandles$Lookup$ClassDefiner.defineClass(MethodHandles.java:2416) ~[?:?]
    at java.lang.invoke.MethodHandles$Lookup.defineClass(MethodHandles.java:1843) ~[?:?]
    at jdk.internal.reflect.GeneratedMethodAccessor37.invoke(Unknown Source) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
    at net.bytebuddy.utility.Invoker$Dispatcher.invoke(Unknown Source) ~[?:?]
    at net.bytebuddy.utility.dispatcher.JavaDispatcher$Dispatcher$ForNonStaticMethod.invoke(JavaDispatcher.java:1032) ~[byte-buddy-1.14.11.jar:?]
    at net.bytebuddy.utility.dispatcher.JavaDispatcher$ProxiedInvocationHandler.invoke(JavaDispatcher.java:1162) ~[byte-buddy-1.14.11.jar:?]
    at jdk.proxy12.$Proxy172.defineClass(Unknown Source) ~[?:?]
    at net.bytebuddy.dynamic.loading.ClassInjector$UsingLookup.injectRaw(ClassInjector.java:1638) ~[byte-buddy-1.14.11.jar:?]
    at net.bytebuddy.dynamic.loading.ClassInjector$AbstractBase.inject(ClassInjector.java:118) ~[byte-buddy-1.14.11.jar:?]
    at net.bytebuddy.dynamic.loading.ClassLoadingStrategy$UsingLookup.load(ClassLoadingStrategy.java:519) ~[byte-buddy-1.14.11.jar:?]
    at net.bytebuddy.dynamic.TypeResolutionStrategy$Passive.initialize(TypeResolutionStrategy.java:101) ~[byte-buddy-1.14.11.jar:?]
    at net.bytebuddy.dynamic.DynamicType$Default$Unloaded.load(DynamicType.java:6325) ~[byte-buddy-1.14.11.jar:?]
    at org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState.load(ByteBuddyState.java:146) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl.getReflectionOptimizer(BytecodeProviderImpl.java:242) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.metamodel.internal.EmbeddableRepresentationStrategyPojo.buildReflectionOptimizer(EmbeddableRepresentationStrategyPojo.java:186) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.metamodel.internal.EmbeddableRepresentationStrategyPojo.<init>(EmbeddableRepresentationStrategyPojo.java:65) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.metamodel.internal.ManagedTypeRepresentationResolverStandard.resolveStrategy(ManagedTypeRepresentationResolverStandard.java:156) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.metamodel.mapping.internal.EmbeddableMappingTypeImpl.<init>(EmbeddableMappingTypeImpl.java:162) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.metamodel.mapping.internal.EmbeddableMappingTypeImpl.from(EmbeddableMappingTypeImpl.java:112) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.metamodel.mapping.internal.MappingModelCreationHelper.buildEmbeddedAttributeMapping(MappingModelCreationHelper.java:315) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.persister.entity.AbstractEntityPersister.buildEmbeddedAttributeMapping(AbstractEntityPersister.java:5797) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.persister.entity.AbstractEntityPersister.generateNonIdAttributeMapping(AbstractEntityPersister.java:5730) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.persister.entity.AbstractEntityPersister.prepareMappingModel(AbstractEntityPersister.java:4999) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.execute(MappingModelCreationProcess.java:84) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.process(MappingModelCreationProcess.java:42) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl.finishInitialization(MappingMetamodelImpl.java:198) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.internal.SessionFactoryImpl.initializeMappingModel(SessionFactoryImpl.java:364) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:293) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:450) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:941) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:960) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
    at org.springframework.orm.hibernate5.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:616) ~[spring-orm-6.1.4.jar:6.1.4]
    at org.springframework.orm.hibernate5.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:600) ~[spring-orm-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:784) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:508) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1419) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:784) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:508) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1419) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1689) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1653) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeanMap(DefaultListableBeanFactory.java:1575) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1514) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1392) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:784) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:508) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1419) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:784) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:508) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1419) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:959) ~[spring-context-6.1.4.jar:6.1.4]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) ~[spring-context-6.1.4.jar:6.1.4]
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:144) ~[spring-context-6.1.4.jar:6.1.4]
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:95) ~[spring-context-6.1.4.jar:6.1.4]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
    at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
    at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:210) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:111) ~[spring-beans-6.1.4.jar:6.1.4]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315) ~[spring-beans-6.1.4.jar:6.1.4]
    ... 39 more

Could someone help to reslove this error.

Regards,
Poornima

Hi, this looks a lot like a bug to me. The access optimizer shouldn’t be used for embeddable attributes that define a composite user type.

Please try to create a reproducer with our test case template and if you are able to reproduce the issue, create a bug ticket in our issue tracker and attach that reproducer.

Hi @beikov ,

I am able to reproduce this issue with given link. I have attached the code GitHub - subijayb/hibernate-test-case-templates: Templates and examples to report issues to Hibernate from SMP team. Will create a bug for the same.

Regards,
Poornima

Thanks. Please also add a link to the created Jira issue here for reference :slight_smile:

Hi @beikov ,

The ticket id is [HHH-17902] - Hibernate JIRA.

We are unable to proceed. Is there any workaround for time being?

Regards,
Poornima

1 Like

Try making the constructor of BigStringMapper private.

Thx for suggestion.
We tried with both private and public constructor but it throws the same error.