Hibernate hbm.xml without java class

Can someone help me to resolve the following issue.

I am trying to create a table and hbm.xml file for the provided JSON object. Then needs to load the created hbm.xml file to the sessionfactory to do further insert/update records to that table.

Somehow I can’t able to load the generated hbm.xml file as entity to sessionFactory.

Is there a way to load the hbm.xml file to the session factory without Java class for that hbm.xml?

Tech: Springboot + hibernate

ERROR: Unable to load class [Test]


<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"


<class name="Test" table="test" dynamic-update="true" dynamic-insert="true">
    <cache usage="read-write"/>
    <id name="id" column="id" type="integer">
        <generator class="identity" />

    <property name="fieldOne" type="string" column="field-one" length="255" />
    <property name="fieldTwo" type="long" column="field-two" length="255" />

Error : org.hibernate.MappingException: entity class not found: Test

See the documentation for details about dynamic models: Hibernate ORM User Guide