guys. I have a strange problem. I try to write unit-tests to web-app. I decided to check some methods (queries). It’s a working app. But when I use fixture @Before
@Before
public void setUp() throws ConnectionException {
Connection connection = null;
ConnectionPool.init();
connection = ConnectionPool.getInstance().takeConnection();
}
I have error when I initialised connection pool in Class.forName(driver).
With error
ClassNotFoundException: com.mysql.jdbc.Driver
I don’t know. Maybe somebody knows cause.
Add the MySQL connector JAR to your CLASSPATH when you run the test.