Tag Archives: ojdbc

How to Solve idea Import ojdbc Pack Error

Download online or ask colleagues to pass two jars, ojdbc6-11.2 0.7. 0. Jar and jconn3 0.jar

Put in the same folder:

CMD in this folder is as follows: press enter to enter the CMD console.

Enter the following two commands:

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -Dfile=ojdbc6-11.2.0.3.jar

mvn install:install-file -DgroupId=com.sybase -DartifactId=jconn -Dversion=3-6.0 -Dpackaging=jar -Dfile=jconn3-6.0.jar

Represents a successful addition. For build failure, please check whether the version number, groupid, file name, etc. in the statement are consistent with the actual situation, and then run it after modification.

Note: If you have installed multiple maven versions, please check which version the current maven_home address is. This command is to install the jar locally into our local maven warehouse. If the warehouse is wrong, it won’t work if you install it.

After installation, right-click the project and update project

Click OK, and then Maven install again. No error will be reported

Problems of java.sql.sqlrecoveryexception: IO error: connection reset of ojdbc in Linux Environment

To get to the point, the quickest verification method and solution : Java – DJava. Security. EGD = file:///dev/urandom – jar xxxxxx.jar

Describe the following problem: write a jar tool, use the connection pool, ojdbc. The windows environment is all right. Java.sql.sqlrecoveryexception: IO error: connection reset appears after two or three times of startup and shutdown in Linux environment

Check the configuration file and parsing problem, no result

Using the latest ojdbc package, no results

Change Hikari to Druid, no result

I have no choice but to search and find the above scheme, explaining the reason for this problem:

When connecting to the Oracle server, the client needs to generate a random key for client authentication. Under Linux, JDK uses/dev/random by default. Random uses blocking to generate random numbers. The generation speed is very slow, and the Oracle server will reset actively, An error is reported in alert.log:
tns-12535: TNS: operation timed out
ns secondary err Code: 12606
NT main err Code: 0
NT secondary err Code: 0
NT OS err Code: 0
client address: (address = (Protocol = TCP) (host = 192.168.6.21) (Port = 33460))
warning: inbound connection timed out (ora-3136)

Other solutions:

Edit $Java_ Home/JRE/lib/security/Java. Security changes securerandom. Source = file/dev/random to file/dev/random

[Solved] Missing artifact com. oracle:ojdbc6 : jar:11.2.0.1.0 Problem solving ojdbc package pom.xml error

I just learned spring boot. Because the company uses Oracle and Oracle’s ojdbc.jar is charged, there is no such resource in Maven’s central warehouse. Only by configuring the local library can it be loaded into the project

First configure the local Maven warehouse address:

2. Find Oracle jar package

The jar package in my computer is placed at:

D:\app\admin\product\11.2.0\dbhome_ 1\jdbc\lib

Open the directory where the jar package is located: then hold down shift and right-click to open the command line, execute the following command to add ojdbc6.jar package to maven, that is to say, run the following statement. Note: it is not run under C disk, but under this directory

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc6.jar

The command line is as follows:

D:\app\admin\product\11.2.0\dbhome_1\jdbc\lib>mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc6.jar                                                                          [INFO] Scanning for projects...                                                 Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom                     Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom (3.9 kB at 12 kB/s)  Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom                                 Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-plugins/22/maven-plugins-22.pom (13 kB at 85 kB/s)               Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar                     Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar (25 kB at 138 kB/s)  Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom                 Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom (6.4 kB at 37 kB/s)                                                                              Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.jar                 Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.jar (27 kB at 125 kB/s)                                                                              [INFO]                                                                          [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1                                   [INFO] ------------------------------------------------------------------------ [INFO]                                                                          [INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---                                                                             Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.pom                                  Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.pom (2.5 kB at 15 kB/s)               Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus/3.1/plexus-3.1.pom                                                  Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus/3.1/plexus-3.1.pom (19 kB at 118 kB/s)                               Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.pom                                    Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.pom (1.1 kB at 5.4 kB/s)                Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-components/1.1.7/plexus-components-1.1.7.pom                        Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-components/1.1.7/plexus-components-1.1.7.pom (5.0 kB at 32 kB/s)     Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus/1.0.8/plexus-1.0.8.pom                                              Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus/1.0.8/plexus-1.0.8.pom (7.2 kB at 50 kB/s)                           Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.pom                                                                              Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-container-default/1.0-alpha-8/plexus-container-default-1.0-alpha-8.pom (7.3 kB at 46 kB/s)                                                           Downloading: http://maven.aliyun.com/nexus/content/groups/public/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar                                Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar                                    Downloading: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar                                  Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-digest/1.0/plexus-digest-1.0.jar (12 kB at 66 kB/s)                  Downloaded: http://maven.aliyun.com/nexus/content/groups/public/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar (38 kB at 189 kB/s)             Downloaded: http://maven.aliyun.com/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar (230 kB at 462 kB/s)              [INFO] Installing D:\app\admin\product\11.2.0\dbhome_1\jdbc\lib\ojdbc6.jar to E:\eclipse\spring-tool-suite-3.9.0.RELEASE-e4.7.0-win32-x86_64\sts-bundle\sts-3.9.0.RELEASE\repository\com\oracle\ojdbc6\11.2.0.1.0\ojdbc6-11.2.0.1.0.jar         [INFO] Installing C:\Users\admin\AppData\Local\Temp\mvninstall887833532666323655.pom to E:\eclipse\spring-tool-suite-3.9.0.RELEASE-e4.7.0-win32-x86_64\sts-bundle\sts-3.9.0.RELEASE\repository\com\oracle\ojdbc6\11.2.0.1.0\ojdbc6-11.2.0.1.0.pom                                                                               [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS                                                            [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.636 s                                                      [INFO] Finished at: 2018-01-02T21:31:04+08:00                                   [INFO] Final Memory: 10M/362M                                                   [INFO] ------------------------------------------------------------------------                                               

Finally, find the pom.xml of the project, introduce the following code, right-click the project name, find maven, find update project, and update it

<!-- oracle database driver -->
<dependency>
 <groupId>com.oracle</groupId>
 <artifactId>ojdbc6</artifactId>
 <version>11.2.0.1.0</version>
</dependency>