I'm getting an exception in my code when I'm trying to create the session factory. In my case the cfg file is in a jar and also the mapping files are in the same jar as the cfg file.
Here is the stack trace and the cfg file
<!-- These are for showing sql on console and SQL comments for debugging --> <property name="show_sql">true</property> <property name="use_sql_comments">true</property> <property name="format_sql">true</property>
<!-- These setting allow flush and session close to happen automatically. Set to true for CMT --> <property name="transaction.flush_before_completion">true</property> <property name="transaction.auto_close_session">true</property>
And what is your jar structure, and show where those files the cfg and the mapping files are in the jar structure. Maybe a slight typo in the path, or a little different. The cfg goes on the root of the jar file.