I have a very strange situation. I have a set of eclipse plugin projects that I use tycho and maven to create. I used the JDBC driver in one of the projects, and I have a test plugin to test this project. Since the com.mysql.jdbc plugin is not available in the eclipse p2 repository (and we do not have our own p2), I imported the jdbc plugin and created the OSGi plugin and added the dependency to my local plugin.
I have many eclipse workspaces. Only in the very first workspace that created the test and jdbc plugins do junit tests work when I run them using the eclipse run -> Junit test command. When others or even me check the source code and try to run the test in different workspaces, this exception is thrown:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
I also tried using the tycho integration test (running mvn integration-test), but this does not work, and I still get the same exception. I tried looking for this a lot, but I could not find the answer.
UPDATE: I think this is not a tycho problem. I just tried creating a java based eclipse plugin. Com.jdbc.mysql. The workspace that I created works fine. But as soon as I pass the code and import the project into another workspace, the tests stop working. All settings are the same for two workspaces: one works, the other gets a ClassNotFound exception!
source share