Error installing jdbc oracle in eclipse

-1

I'm finding impediments to installing oracle jdbc.

Screen

Errormessage:

  

Errorreadingfile  C:\Users\alex.jose.silva.m2\repository\com\oracle\ojdbc14\10.2.0.3.0\ojdbc14-10.2.0.3.0.jar  C:\Users\alex.jose.silva.m2\repository\com\oracle\ojdbc14\10.2.0.3.0\ojdbc14-10.2.0.3.0.jar  (Thesystemcannotfindthefilespecified)

Command

  

mvninstall:install-file-DgroupId=com.oracle-DartifactId=o  jdbc14-Dversion=10.2.x.x.x-Dpackaging=jar-Dfile=ojdbc14.jar-DgeneratePom=true

Commandresponse

Pow.xml

<?xmlversion="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>br.com.devmedia</groupId>
   <artifactId>crud_cadastro_cliente</artifactId>
   <packaging>war</packaging>
   <version>0.0.1-SNAPSHOT</version>
   <name>crud_cadastro_cliente Maven Webapp</name>
   <url>http://maven.apache.org</url>
   <dependencies>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>3.8.1</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>com.sun.jersey</groupId>
         <artifactId>jersey-server</artifactId>
         <version>1.8</version>
      </dependency>
      <dependency>
         <groupId>com.sun.jersey</groupId>
         <artifactId>jersey-json</artifactId>
         <version>1.8</version>
      </dependency>
      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-validator</artifactId>
         <version>4.2.0.Final</version>
      </dependency>
      <dependency>
         <groupId>org.hibernate.common</groupId>
         <artifactId>hibernate-commons-annotations</artifactId>
         <version>4.0.1.Final</version>
         <classifier>tests</classifier>
      </dependency>
      <dependency>
         <groupId>org.hibernate.javax.persistence</groupId>
         <artifactId>hibernate-jpa-2.0-api</artifactId>
         <version>1.0.1.Final</version>
      </dependency>
      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-entitymanager</artifactId>
         <version>4.0.1.Final</version>
      </dependency>

      <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc14</artifactId>
            <version>10.2.0.3.0</version>
        </dependency>

      <dependency>
         <groupId>mysql</groupId>
         <artifactId>mysql-connector-java</artifactId>
         <version>5.1.6</version>
         <scope>compile</scope>
      </dependency>     


   </dependencies>
   <build>
      <finalName>crud_cadastro_cliente</finalName>
      <plugins>
         <plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <version>2.0</version>
            <configuration>
               <path>/</path>
               <port>8080</port>
            </configuration>
         </plugin>
      </plugins>
   </build>
</project>
    
asked by anonymous 16.01.2018 / 16:18

2 answers

1
<dependency>
   <groupId>com.oracle</groupId>
   <artifactId>ojdbc14</artifactId>
   <version>10.2.0.3.0</version>
 </dependency>
  

Error reading file   C: \ Users \ alex.jose.silva.m2 \ repository \ com \ oracle \ ojdbc14 \ 10.2.0.3.0 \ ojdbc14-10.2.0.3.0.jar   C: \ Users \ alex.jose.silva.m2 \ repository \ com \ oracle \ ojdbc14 \ 10.2.0.3.0 \ ojdbc14-10.2.0.3.0.jar   (The system can not find the file specified)

The maven is treating 10.2.0.3.0 as a name of a folder the correct would be would be sub folders where mavem organizes each version of its libs .

  

Error reading file   C: \ Users \ alex.jose.silva.m2 \ repository \ com \ oracle \ ojdbc14 \ 10 \ 2 \ 0 \ 3 \ 0 \ ojdbc14-10.2.0.3.0.jar

See the error !!

  

(The system can not find the file specified)

If you installed ojdbc14 driver manually correctly organize the folder and sub folder that will work that will work.

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.x.x.x -Dpackaging=jar -Dfile=C:\Users\alex.jose\ojdbc14\ojdbc14.jar -DgeneratePom=true

C: \ Users \ alex.jose \ ojdbc14 \ ojdbc14.jar is where your driver is on your drive ..

    
16.01.2018 / 23:14
0

Resolve using two steps:

  • Running the command:
  •   

    mvn install: install-file -Dfile = C: \ Users \ alex.jose.silva \ Dow   nloads \ ojdbc7.jar -DgroupId = com.oracle -DartifactId = ojdbc7   -Dversion = 12.1.0 -Dpackaging = jar

  • Add to pow.xml:

       <dependency>
              <groupId>com.oracle</groupId>
              <artifactId>ojdbc7</artifactId>
              <version>12.1.0</version>
       </dependency> 
    
  •     
    16.01.2018 / 23:14