I\'m working on Junit test file which loads SQL file and loads it into Oracle:
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
I fixed this by adding libraries from Apache Tomcat to the Run-time Test Libraries.
In Netbeans:
Project Properties -> Libraries -> Run Tests
Add JAR/Folder
The two libraries I needed were catalina.jar
and tomcat-juli.jar
. You mileage may vary.
I found them under the installation directory for Tomcat. e.g:
apache-tomcat-7.0.34/bin/tomcat-juli.jar
apache-tomcat-7.0.34/lib/catalina.jar
Note one of the jars is in the bin
directory, the other in the lib
directory
This probably isn't the best way to fix your problem. It would be better to have a different way to inject the DataSource
.