The project I'm working on is using an old application contained in a .jar file. One of the responsibilities of this application is that it updates the database when changes are made to the configuration files. Every time I try to run this file (which is a simple Ant Task extension), I get an exception thrown at the beginning of the process. I decompiled the responsible Java file and found that an exception was thrown here. I do not know what the problem is, because "hibernate.cfg.xml" is contained in the same .jar file as .class, throwing an exception.
ClassLoader loader = Thread.currentThread().getContextClassLoader();
InputStream in = loader.getResourceAsStream("hibernate.cfg.xml");
if (in == null) {
throw new RuntimeException("Couldn't find built in hibernate config");
}
If anyone has ideas, even pointing me in the right direction, I would be grateful.
Of course, any solution should be external, since the client already has this program assembly in the production process.
source
share