0

I am new in Hibernate and Maven. I want to use hibernateOGM. I can successfully build my code but if I run it I see these Information:

Aug 12, 2013 12:00:15 PM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
Aug 12, 2013 12:00:15 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.1.9.Final}
Aug 12, 2013 12:00:15 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Aug 12, 2013 12:00:15 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist

my hibernate.cfg.xml and hbm.xml are located in src/main/resources . How can I solve this problem

Davide D'Alto
  • 7,421
  • 2
  • 16
  • 30
TangoStar
  • 551
  • 2
  • 8
  • 24
  • Are you using Configuration().configure().buildSessionFactory()? – Juned Ahsan Aug 12 '13 at 10:08
  • The only things which I have in my main class are, these two line of code:` OgmConfiguration cfgogm=new OgmConfiguration(); SessionFactory sessionfactory= cfgogm.buildSessionFactory();` – TangoStar Aug 12 '13 at 10:14

2 Answers2

0

Did you try placing hibernate.cfg.xml in src/main/resources/META-INF ?

Sebastian Łaskawiec
  • 2,667
  • 15
  • 33
0

As per your comments you are using

OgmConfiguration cfgogm=new OgmConfiguration(); 
SessionFactory sessionfactory= cfgogm.buildSessionFactory();

try changing it to:

SessionFactory sessionfactory= new AnnotationConfiguration().configure().buildSessionFactory();

Source: http://www.mkyong.com/hibernate/hibernate-error-an-annotationconfiguration-instance-is-required-to-use/

Juned Ahsan
  • 67,789
  • 12
  • 98
  • 136
  • thank you Juned,the Infos remains and I have no output. it looks like this: http://babakbsn.persiangig.com/annotation.png – TangoStar Aug 12 '13 at 11:15