url « cfg « JPA Q&A





1. Can't get the URL or File from the resource of hibernate.cfg.xml file    coderanch.com

Hi, Below is the code given for HibernatePlugIn where the error is coming. public class HibernatePlugIn implements PlugIn { private String _configFilePath = "/WEB-INF/classes/hibernate.cfg.xml"; public static final String SESSION_FACTORY_KEY = SessionFactory.class.getName(); private SessionFactory _factory = null; public void init(ActionServlet servlet, ModuleConfig config) throws ServletException { File file = new File(_configFilePath); Configuration configuration = null; URL configFileURL = null; ServletContext context = ...

2. Hibernate.cfg.xml without database name in the url    forum.hibernate.org

Hi Everybody, I have a question about my config and the catalog attribute in the hbm.xml files. Currently, I have three databases that I'm accessing simultaneously, so I have three different hibernate config files that have something like this: jdbc:oracle:thin:@machineA:some_port:foo jdbc:oracle:thin:@machineA:some_port:bar jdbc:oracle:thin:@machineA:some_port:foobar I saw a post that eluded to catalog attribute in the individual hbm.xml ...