Skip to Content
0
Former Member
Jan 10, 2007 at 08:26 PM

Web Dynpro: Where put hibernate hibernate.cfg.xml?

115 Views

I have seen several people asking about the place to put the config file of Hibernate, but not any conclusive answer until now...

I created a external library in WAS (I verified using Visual Admin that the lib was correctly deployed). In my Web Dynpro References -> Library Reference I add the library in the format Provider Name/Library Name: "sap.com/hiblibs"

<b> Where can I store the hibernate.cfg.xml?</b> I have tried put it in all web dynpro folders!

Thanks,

Ivan Garcia

From Brazil

<b> This is my source code:</b>

Configuration cfg = new Configuration();

cfg.configure("hibernate.conf.xml");

<b> The error:</b>

org.hibernate.HibernateException: hibernate.conf.xml not found

at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)

at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1402)

at org.hibernate.cfg.Configuration.configure(Configuration.java:1424)

I have read all forum topics about this, including:

Where to put config files in webdynpro ?

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bf0d57db-0c01-0010-6fa3-83503981eed4

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2ae0614a-0601-0010-a491-a9a635f06613

Problem in placing hibernate.cfg.xml

/people/bala.krishnan2/blog/2006/09/25/bid-adieu-to-bots--using-captchas

/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro

How to add external jar in web dynpro without going for DC

Web Dynpro References

Using External Library in Web Dynpro - Error

Deploy external jar to WAS 6.40