First time asking a question on here, long time use of finding answers through here on google! I've started a coding challenge for a company. I completed the challenge and have it functioning to their requirements. All it needs now is to be hosted on AWS. I hosted it to AWS, but it seems AWS can't use or find my cfg.xml files. I've read endlessly and watched youtube tutorials and cant seem to find my answer.
I've set up an RDS and a table that mirrors my table that I can host locally through tomcat. But it seems I have to do something to route hibernate to the database now.
HTTP Status 500 – Internal Server Error Type Exception Report
Message Request processing failed; nested exception is org.hibernate.internal.util.config.ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml]
Is the error I get when the page tries to access the DB from AWS, as mentioned it works fine when I launch it through eclipse. I imagine I have to do something with the hibernate.cfg.xml file just not sure how to adapt it for AWS. Help would be appreciated! Thanks
<?xml version='1.0' encoding='utf-8'?>
<session-factory>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/schema</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.username">un</property>
<property name="hibernate.connection.password">pw</property>
<property name="show_sql">true</property>
<mapping class="com.dto.RegisteredUserDto"></mapping>
<mapping resource="RegisteredUserDto.hbm.xml"></mapping>
</session-factory>