Skip to content

cannot install hibernate(5.6.0) with intellij(m1chip silicon) in java

I try to run hibernate 5.6.0 in java 16 and I am programming with intellij 2021.2 for apple sillicon. When I run it I get this error:

log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.hibernate.internal.util.config.ConfigurationException: Could not locate cfg.xml resource [hibernate.cfg.xml]
    at org.hibernate.boot.cfgxml.internal.ConfigLoader.loadConfigXmlResource(
    at org.hibernate.boot.registry.StandardServiceRegistryBuilder.configure(
    at org.hibernate.cfg.Configuration.configure(
    at mcrpg.mmorpg.Hibernate.start(
    at mcrpg.mmorpg.Start.main(

My hibernate.cfg.xml is in source root:source tree



Always include the resource files in the separate resources directory. As by default, Maven (and so IDE as well) will not copy the resource files from the source directory.