Results 1 to 9 of 9
  1. #1
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    165
    Rep Power
    9

    Default Missing artifact Maven dependency issues ojdbc7

    So, I have imported using git a maven based project in Eclipse Mars. I am facing ojdbc7 JAR related issues. Inside the directory structure `D:\Users\myusername\.m2\repository\com\oracle\ojd bc7\12.1.0.1` I have downloaded the JAR file from the server and placed it inside it. I see `ojdbc7-12.1.0.1.jar.lastUpdated` and `ojdbc7-12.1.0.1.pom.lastUpdated`getting created everytime. I deleted these and placed my jar inside and still getting error:


    `Missing artifact com.oracle:ojdbc7:jar:12.1.0.1 pom.xml Maven Dependency Problem`.

    Could anyone tell me what's wrong am I doing?

    This is how dependency is defined:

    <dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc7</artifactId>
    <version>12.1.0.1</version>
    <scope>compile</scope>
    </dependency>
    Last edited by Jack_Tauson_Sr; 04-17-2017 at 11:36 PM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: Missing artifact Maven dependency issues ojdbc7

    If you're using Maven then you should probably point to the Oracle Maven Repo, for the OJDBC driver.
    There should be no need to manually download the jar file and place it in your local repo.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    165
    Rep Power
    9

    Default Re: Missing artifact Maven dependency issues ojdbc7

    Quote Originally Posted by Tolls View Post
    If you're using Maven then you should probably point to the Oracle Maven Repo, for the OJDBC driver.
    There should be no need to manually download the jar file and place it in your local repo.
    Thanks for the answer. So, I basically cloned it using Import -->Git -->Projects from Git option. And hence I was planning to place the JAR file in the relevant repository. Do you think this is not a good approach to follow or can the errors be fixed considering my current approach?

    the Oracle Website is flaky and hence I have to copy the JDBC driver from my server.
    Last edited by Jack_Tauson_Sr; 04-18-2017 at 04:29 PM.

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default Re: Missing artifact Maven dependency issues ojdbc7

    The Maven project you cloned ought to be able to find all it needs.
    Are you saying it's failing to download the OJDBC jar file? Is it in the project's POM?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    165
    Rep Power
    9

    Default Re: Missing artifact Maven dependency issues ojdbc7

    Quote Originally Posted by Jack_Tauson_Sr View Post
    Thanks for the answer. So, I basically cloned it using Import -->Git -->Projects from Git option. And hence I was planning to place the JAR file in the relevant repository. Do you think this is not a good approach to follow or can the errors be fixed considering my current approach?

    the Oracle Website is flaky and hence I have to copy the JDBC driver from my server.
    Actually the errors were gone when I Right Clicked on the Errors and Deleted it (my colleague told me to delete it and mentioned unless they come back, that's normal). I restarted the Eclipse and there were no errors. Not sure why it happened like this. Is this normal?
    Last edited by Jack_Tauson_Sr; 04-18-2017 at 04:53 PM.

  6. #6
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    165
    Rep Power
    9

    Default Re: Missing artifact Maven dependency issues ojdbc7

    Quote Originally Posted by Tolls View Post
    The Maven project you cloned ought to be able to find all it needs.
    Are you saying it's failing to download the OJDBC jar file? Is it in the project's POM?
    Thanks again. Few more questions as my original question was resolved. Is that the correct way I cloned a maven project? I mean `Import -->Git -->Projects from Git` is a good approach and the only approach to do that? Also, how can I build the project within eclipse. I know on linux, the way I have done is
    `mvn install -DskipTests`

    Thanks

  7. #7
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    399
    Rep Power
    6

    Default Re: Missing artifact Maven dependency issues ojdbc7

    The Maven add-on for Eclipse is M2E. If that is installed correctly you can just do File->new->Maven Project. You an also convert an existing project to a Maven project by right-clicking on the project->configure->convert to Maven project.
    Dependencies are then added by opening the pom.xml file-> dependencies tab->add (wait for the list to fill).
    Alternatively you can always go to the Spring Boot Initializr and have them give you a pre-configured Maven project. It comes with a set of pre-established DI's, which speeds up things.

  8. #8
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    165
    Rep Power
    9

    Default Re: Missing artifact Maven dependency issues ojdbc7

    Quote Originally Posted by Tolls View Post
    If you're using Maven then you should probably point to the Oracle Maven Repo, for the OJDBC driver.
    There should be no need to manually download the jar file and place it in your local repo.
    Hi Tolls,

    Thanks for your quick responses on my other threads. The errors actually came back when I tried to save pom.xml in Eclipse after deleting it so I am back to the same thread instead of discussing same thing on other threads. I have few questions:

    1) As you have mentioned to point it to the Oracle Maven Repo, I am wondering why the same pom.xml works on the server and why doesn't it work on my local machine? While I can understand your point of pointing it to Oracle Maven Repo, do you think it's normal to have different pom.xml while working locally in eclipse and then change it to different one while pushing it on the server? I mean after changing the pom.xml locally, I don't want to break the things on the server with the modified local version of pom.xml.

    2) This might be off the topic but recently I was having trouble downloading the ojdbc7 jar software from the Oracle website. Many of my colleagues had the same issue. Their website has been flaky from the past few weeks. Do you think this could be one of the reason of maven not getting the repository from the Oracle website?

    Thanks
    Last edited by Jack_Tauson_Sr; 04-21-2017 at 11:52 PM.

  9. #9
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    165
    Rep Power
    9

    Default Re: Missing artifact Maven dependency issues ojdbc7

    For those who stumble upon this thread for the same error, I had to install the local dependency using mvn install:install-file from command line.

    Thanks everyone who tried to help me.

Similar Threads

  1. Replies: 0
    Last Post: 06-30-2015, 01:07 PM
  2. Replies: 11
    Last Post: 08-07-2013, 11:12 AM
  3. maven dependency and war file
    By szms in forum Apache Maven
    Replies: 1
    Last Post: 07-26-2012, 06:25 AM
  4. Maven Dependency Overview 1.1
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 07-02-2008, 07:13 PM
  5. Maven Dependency Overview 1.0
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 04-15-2008, 06:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •