Hi,
I running dbupgrade-maven-plugin for Database upgradation, When I am
trying to do the same, getting the given below exception. Can you please check
it and let me know what is the issue.
Pom.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dbupgrade-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<!-- JDBC Driver -->
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.1.0XE</version>
<scope>compile</scope>
</dependency>
</dependencies>
<executions>
<execution>
<phase>compile</phase>
<goals><goal>filelist-upgrade</goal></goals>
<configuration>
<config>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<url>jdbc:oracle:thin:@***:ORCL</url>
<username>**</username>
<password>**</password>
<scriptDirectory>src/main/resources/db-scripts</scriptDirectory>
<upgradeFile>src/main/resources/db-scripts/testUpgrade.txt</upgradeFile>
<versionTableName>_version</versionTableName>
<versionColumnName>version</versionColumnName>
</config>
</configuration>
</execution>
</executions>
</plugin>
testUpgrade.txt
DBUpgrade_Testing/testUpgrade.sql
testUpgrade.sql
CREATE TABLE Anamika_Testing
(
NAME_TITLE VARCHAR2(4 BYTE) NOT
NULL,
USERNAME VARCHAR2(30 BYTE) NOT NULL
);
Exception:-
[ERROR] Failed to execute goal
org.codehaus.mojo:dbupgrade-maven-plugin:1.0-beta-1:filelist-upgrade (default)
on project contactusDataAccessServices: Execution default of goal
org.codehaus.mojo:dbupgrade-maven-plugin:1.0-beta-1:filelist-upgrade failed: An
API incompatibility was encountered while executing
org.codehaus.mojo:dbupgrade-maven-plugin:1.0-beta-1:filelist-upgrade:
java.lang.NoSuchMethodError: java.sql.SQLException: method
<init>(Ljava/lang/String;Ljava/lang/Throwable;)V not found
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.codehaus.mojo:dbupgrade-maven-plugin:1.0-beta-1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] =
file:/local2/maven/mavenrepo/org/codehaus/mojo/dbupgrade-maven-plugin/1.0-beta-1/dbupgrade-maven-plugin-1.0-beta-1.jar
[ERROR] urls[1] =
file:/local2/maven/mavenrepo/com/oracle/ojdbc14/10.2.0.1.0XE/ojdbc14-10.2.0.1.0XE.jar
[ERROR] urls[2] =
file:/local2/maven/mavenrepo/org/codehaus/plexus/plexus-utils/2.0.1/plexus-utils-2.0.1.jar
[ERROR] urls[3] =
file:/local2/maven/mavenrepo/org/codehaus/mojo/dbupgrade/dbupgrade-core/1.0-beta-1/dbupgrade-core-1.0-beta-1.jar
[ERROR] urls[4] =
file:/local2/maven/mavenrepo/commons-dbutils/commons-dbutils/1.3/commons-dbutils-1.3.jar
[ERROR] urls[5] =
file:/local2/maven/mavenrepo/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
[ERROR] urls[6] =
file:/local2/maven/mavenrepo/commons-io/commons-io/1.4/commons-io-1.4.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm
ClassRealm[project>com.mcdonalds.contactus:contactusDataAccessServices:0.0.2-SNAPSHOT,
parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------
________________________________
::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates.
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and
attachments please check them for viruses and defect.
-----------------------------------------------------------------------------------------------------------------------