Java - getResourceAsStream returning null

Problem:

ProcessTest.class.getResourceAsStream("H2/ddl/spring_batch/schema-drop.sql");

Solution:

Check that the folder (""H2/ddl/spring_batch") is part of the project classpath

in eclipse:
  • Right click on project
  • Click "Build Path"
  • Click "Configure Build Path..."
  • Select "Java Build Path"
  • Edit "Source" accordingly

Comments

Popular posts from this blog

Hibernate - HibernateException: createQuery is not valid without active transaction