maven加载ojdbc14报错

问题复现步骤:

1、在pom.xml里面添加ojdbc14的依赖,代码如下:

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

2、执行mvn install报如下错误:

[ERROR] Failed to execute goal on project ssm_domain: Could not resolve dependencies for project com.miyoo.ssm:ssm_domain:jar:1.0-SNAPSHOT: Failure to find com.oracle:ojdbc14:jar:5.0.2.RELEASE in http://maven.aliyun.com/nexus/content/reposi
tories/central/ was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced -> [Help 1]

问题分析:

因为oracle的ojdbc.jar是收费的,所以maven的中央仓库中没有这个资源,只能通过配置本地库才能加载到项目中去。

解决方法:

1、首先下载ojdbc14,下面提供的版本是:11.2.0.1.0。

链接:https://pan.baidu.com/s/1iB-0QhZ_imffZ-roZVdzvQ
提取码:ewxx

2、接着打开命令提示符窗口,可通过快捷键Windows+R,执行cmd命令打开。

执行如下命令

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=D:\软件\it\ojdbc14.jar

-Dfile=ojdbc14.jar文件存放的路径

3、最后在pom.xml文件中写入Maven坐标:

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

到此成功解决!
 

原文地址:https://www.cnblogs.com/qing-wen/p/12259037.html

时间: 2024-08-01 09:56:05

maven加载ojdbc14报错的相关文章

python 加载excel报错

from pandas import Series, DataFrame import pandas as pd import numpy as np import os import sys reload(sys) sys.setdefultencoding('utf-8') file1=pd.read_excel('F:/dataanalysis/statistics/PelicanStores.xlsx') Python 加载excel报错: IndexError: list index

kettle登录加载job 报错 Can&#39;t find Job 1

报错原因: Job 1是临时的新建job,我没保存数据库中,或本地文件,所以加载时找不到文件 解决方法: 目录C:\Documents and Settings\Administrator\.kettle\中有个.spoonrc文件 kettle启动会加载.spoonrc文件, 该文件中保存kettle的配置信息,包括启动时要加载哪些文件 删掉对应的 Job 1的键值对就行了,记得要调整相应键值计数. 我的环境中 tabfile1=Job 1 tabfile2=\u5237\u65B0\u5B9

dojo加载树报错

1.错误描述    error loading undefined children.    TypeError:this._arrayOfTopLevelItems is undefied. 2.错误原因 3.解决办法 dojo加载树报错

CentOS重新加载网卡报错 Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/23

重新加载网卡时出现的错误如下: 1 [[email protected] dev]# service network restart 2 Shutting down interface eth0: Device state: 3 (disconnected) 3 [ OK ] 4 Shutting down interface eth1: [ OK ] 5 Shutting down interface eth2: Device state: 3 (disconnected) 6 [ OK ]

加载模块报错:version magic &#39;2.6.32-504.el6.i686 SMP mod_unload 686 &#39; should

在之前我也遇到这个问题,后来我解决了,但是当时没有记录下来,现在又遇到了,害我整了半天,所以现在记录下,供以后参考: 我开始的加载模块的时候报这样的错误: hello: module_layout: kernel tainted. Disabling lock debugging due to kernel taint hello: version magic '2.6.32-504.el6.i686 SMP mod_unload 686 ' should be '2.6.32-504.el6.

Unity3D 5.0版本 加载dll报错, 换用4.5 版本可以正确运行与导出(x86版本)

在Unity3D环境下测试UnityWebCore和awesomium等用来在Unity中显示网页的插件时, 发现总是不能加载dll文件. Win64环境, Unity5.0(64bit) 报错内容如下: Failed to load 'Assets/Plugins/awesomium.dll', expected 64 bit architecture (IMAGE_FILE_MACHINE_AMD64), but was IMAGE_FILE_MACHINE_I386. 网上的回答都是说该d

通过CImageList加载图标 报错

错误代码: <span style="white-space:pre"> </span><pre name="code" class="cpp"><span style="white-space:pre"> </span>CImageList m_ProcessImg ;//全局变量 必须声明为全局变量(.h文件中),否则无效 <span style="

eclipse 加载插件报错 org.eclipse.mylyn.java.tasks

在eclipse 中点按住Ctr 键的时候报以下这个错, The 'org.eclipse.mylyn.java.hyperlink.detector.stack' extension from plug-in 'org.eclipse.mylyn.java.tasks' to the 'org.eclipse.ui.workbench.texteditor.hyperlinkDetectors' extension point failed to load the hyperlink dete

KVM http网络加载镜像报错(mount: wrong fs type, bad option, bad superblock on /dev/loop0)

curl: (23) Failed writing body (7818 != 16384)loop: module loadeddracut-initqueue[579]: mount: wrong fs type, bad option, bad superblock on /dev/loop0dracut-initqueue[579]: missing codepage or helper program, or other errordracut-initqueue[579]: In s