首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >神谕丢失的神器

神谕丢失的神器
EN

Stack Overflow用户
提问于 2016-08-22 21:54:22
回答 1查看 2.3K关注 0票数 1

我在我的应用程序中使用spring引导。我面临连接到oracle数据库的问题。我在下面添加了依赖项。

代码语言:javascript
运行
复制
<dependency>
     <groupId>com.oracle.jdbc</groupId>
     <artifactId>ojdbc7</artifactId>
     <version>12.1.0.2</version>
    </dependency>

它给了我错误的missing artifact com.oracle.jdbc:ojdbc7:jar:12.1.0.2,我试图通过下载jar到我的根文件夹并在我的项目的根文件夹中执行以下命令来解决这个问题。

代码语言:javascript
运行
复制
mvn install:install-file -Dfile=ojdbc7.jar  -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0.2 -Dpackaging=jar

我得到的错误如下

代码语言:javascript
运行
复制
Downloading: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/1.4.0.RELEASE/spring-boot-starter-parent-1.4.0.RELEASE.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.erp.tch:processingsystem:0
.1.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-p
arent:pom:1.4.0.RELEASE from/to central (https://repo.maven.apache.org/maven2):
Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.44.215] fail
ed: Connection refused: connect and 'parent.relativePath' points at wrong local
POM @ line 10, column 13@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.erp.tch:processingsystem:0.1.0:0.1.0 (C:\TIPS\wo
rkspace\tipsredesign\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.erp.tch:processingsystem:0.1.0: Could not transfer artifact org.springframework.boot:spring-boot-start
er-parent:pom:1.4.0.RELEASE from/to central (https://repo.maven.apache.org/maven
2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.44.215]
failed: Connection refused: connect and 'parent.relativePath' points at wrong lo
cal POM @ line 10, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException

[ERROR] [Help 2]}

我试图通过添加下面的内容来解决上面的问题,但仍然没有运气。

代码语言:javascript
运行
复制
<relativepath>../pom.xml</relativepath> 
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-08-23 11:32:11

jdbc驱动程序是用groupId com.oracle在本地安装的。

代码语言:javascript
运行
复制
-DgroupId=com.oracle

但是在groupId com.oracle.jdbc的依赖项中引用。

代码语言:javascript
运行
复制
<groupId>com.oracle.jdbc</groupId>

安装和引用的groupId应该是一致的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39089318

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档