Reputation: 2574
I know there are thousands of blogs about CNFEs out there, but I can't get it work.
I use Maven to build my GWT project. In the pom.xml, there is this line:
<dependency>
<groupId>oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
<scope>runtime</scope>
</dependency>
In the built .war file, there is the correct .jar in WEB-INF/lib. So the class is where I expect it to be. But I'm still getting a ClassNotFoundException.
Where am I wrong? Is it because of the runtime scope?
Upvotes: 1
Views: 112
Reputation: 2574
It turned out, that the driver needs to be inside tomcat´s /lib folder.
It has something to do with the DataSource as described in this post:
Upvotes: 0
Reputation: 3978
Check your project build-path and enable specific output folders for each folder. Go one by one through each source-folder of your project and set the output folder that Maven would use.
For eg., your web project's src/main/java
should have target/classes
under the web project and so.
If your web project require some configuration files that are under the resources, be sure to include that folder as a source folder and to make the proper build-path configuration.
Upvotes: 1