Such a thing. I learn Hibernate, everything seems to be normal, but Heber does not want to get my User class, which lies, according to the recommendations of Maven in main/java/ru/java2017/hibernate (blue arrow). Give him the package: main/java (red arrow), then everything is in order. 
I feel, it's in the settings. I laughed in nete - not penetrated. Here are the files for every fireman:
hibernate.cfg.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//hibernate/hibernate Configuration DTD//EN" "http://hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost:3306/hibernate?useSSL=false</property> <property name="connection.username">root</property> <property name="connection.password">root</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="show_sql">true</property> <property name="hbm2ddl.auto">create</property> <property name="useSSL=false">false</property> <mapping resource="user.cfg.xml" /> </session-factory> </hibernate-configuration>
user.cfg.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="User" table="user"> <id name="id" column="id"> <generator class="native" /> </id> <property name="firstname" column="first_name" type="string" /> <property name="lastname" column="last_name" type="string" /> <property name="age" column="age" type="int" /> </class> </hibernate-mapping>
How can I make my User class exactly in the main/java/ru/java2017/hibernate and so that Hibernat can eat it?