• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mapping fine not found

 
Harjit Singh
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

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>


<mapping resource="com/nasd/fms/framework/database/hibernate/config/ChronologyItem.hbm.xml" />


 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks

Mark
 
Harjit Singh
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got it.. there was a typo....

- H
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic