0

The save command in Line 37 is not working, It can print the Primary Key , but not save a new record to the database.

template save command

Git hub link - https://github.com/DipanjanSG/BankingApp

  • Can you please show complete stacktrace? – Akash May 20 '20 at 13:09
  • @akash I have added stack trace – Dipanjan Sengupta May 20 '20 at 13:19
  • Try after removing the driver class name property . This [entry](https://github.com/DipanjanSG/BankingApp/blob/master/src/main/java/configs/hibernate.cfg.xml#L11) – R.G May 20 '20 at 14:32
  • @R.G Not working . Error creating bean with name 'mysessionFactory' defined in class path resource [configs/hibernateTemplate.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: [Lorg/hibernate/engine/FilterDefinition; – Dipanjan Sengupta May 20 '20 at 14:42
  • This is a new error . Modify the [line](https://github.com/DipanjanSG/BankingApp/blob/master/src/main/java/configs/hibernateTemplate.xml#L18) to org.springframework.orm.hibernate4.LocalSessionFactoryBean . [Reference](https://stackoverflow.com/a/42036676/4214241) – R.G May 20 '20 at 15:31
  • @R.G I guess I also have to change the version of the jars, any input on that? I am getting new errors – Dipanjan Sengupta May 22 '20 at 08:08
  • you may need to do that . With all these errors you will not reach anywhere – R.G May 22 '20 at 08:12
  • @R.G Anything other than the version of the jars needs to be changed ? Specially in the XML. Specially Under the beans tag (in file hibernateTemplate.xml) ? – Dipanjan Sengupta May 22 '20 at 08:42
  • @R.G Issue solved . Had to change the Jar file versions. I question remains, in the file CreateAccount/CustomerDaoImpl.java the function ----> save(Customer customer); does not work. Do I have to commit it ? (the latest code has been pushed , kindly help me 1 last time). – Dipanjan Sengupta May 22 '20 at 16:06
  • Could you please update the question with what is not working . does not work is too broad a statement – R.G May 22 '20 at 16:07
  • @R.G Updated , the code has also been pushed to github – Dipanjan Sengupta May 25 '20 at 08:53
  • @akash Hi can you suggest solution to this https://stackoverflow.com/questions/62059117/hibernatetemplate-save-command-fails-to-push-record-to-database – Dipanjan Sengupta May 28 '20 at 08:18
  • @R.G Can u help me out with this issue - https://stackoverflow.com/questions/62160377/jstl-foreach-unable-to-print-list-values – Dipanjan Sengupta Jun 02 '20 at 19:58

0 Answers0