0

I will attache activejdbc to my spring boot project, and this is part of my pom.xml file:

        <plugin>
            <groupId>org.javalite</groupId>
            <artifactId>db-migrator-maven-plugin</artifactId>
            <version>${activejdbc.version}</version>
            <configuration>
                <configFile>${project.basedir}/src/main/resources/database.properties</configFile>
                <environments>${environments}</environments>
            </configuration>
            <dependencies>
                <dependency>
                        <groupId>org.postgresql</groupId>
                        <artifactId>postgresql</artifactId>
                        <version>9.4-1206-jdbc42</version>
                </dependency>
            </dependencies>
        </plugin>

But I got the following exception by executing the project.

java.lang.ClassNotFoundException: org.postgresql.Drive
  • add a full stack trace – ipolevoy May 15 '18 at 13:27
  • java.lang.ClassNotFoundException: org.postgresql.Drive at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_161] at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_161] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_161] at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_161] at java.lang.Class.forName0(Native Method) ~[na:1.8.0_161] at java.lang.Class.forName(Unknown Source) ~[na:1.8.0_161] at org.javalite.activejdbc.DB.open(DB.java:106) ~[activejdbc-2.0.jar:na] at org.javalite.activejdbc.DB.open(DB.java:89) ~[activejd – Light Harut May 15 '18 at 13:44
  • Even If I do Class.forName("org.postgresql.Drive") in the main class, I got the same issue. But the are parts of application which are working through the spring with that driver. – Light Harut May 15 '18 at 14:04
  • Your stack trace is not full. Also add it to the question, not comment – ipolevoy May 15 '18 at 14:07
  • stack overflow is not allowed me to add full stack, says too much code. – Light Harut May 15 '18 at 14:12
  • Use other tools, lol. If you want help, your question must be researched – ipolevoy May 15 '18 at 14:14

0 Answers0