• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Mapping fine not found

 
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" />


 
ranger
Posts: 17344
11
Mac IntelliJ IDE 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
 
The knights of nee want a shrubbery. And a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!