This is the second day of my participation in the November Gwen Challenge. Check out the details: the last Gwen Challenge 2021

preface

  • Online music poke me ah!
  • Music blog source code online!
  • The previous several articles talked about the installation and deployment of Docker, the operation is relatively simple. (Entry level)
  • Oracle recently crashed, causing Java programs to be implicated, but today’s topic is not Oracle, but Java.
  • Oracle failed to connect to Java.
  • Are you ready?

Welcome to my yao tribe ~

The Oracle Java connection

  • Java failed to connect to Oracle. Procedure

  • Docker deployment error, timezone region not found?

Java fails to connect to Oracle

Error: SpringBoot = springboot = springBoot = springBoot = springBoot = springBoot = springBoot = springBoot = springBoot = springBoot = springBoot = springBoot = springBoot

java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor]

After checking, it was said that the URL writing error caused by the connection.

The original URL “JDBC: oracle: thin: @ localhost: 1521: helowin”

Changed: “JDBC :oracle:thin:@localhost:1521/helowin”

Change the symbol: to /.

Timezone region not found?

2.1 timezone region not found

So we happily threw the JAR package into the Docker. When we ran, the log also learned from the Java program and threw up a block to me

Ora-01882: Timezone region not found

2.2 Error Causes

The docker container time zone is not caused by CST.

2.3 Solutions

Add a command to dockerFile.

ENV TZ=Asia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime&& echo $TZ > /etc/timezoneCopy the code

Set the time zone, run again, the program starts success!

Afterword.

Contact Java, or in the previous home do both front and back end of the day. In fact, for the new front and back contact, I think it is very helpful to personal career.

Because both the front and back end understand, there are many benefits, such as: there is a requirement, maybe the front end to do is possible, but the back end to do, may be better (for performance and so on)

More can know which end will be more appropriate, better ~

👍 if it is helpful to you, your thumbs up is the lubricant of my progress.

Related literature

java.sql.SQLException: Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

ORA-01882 timezone region not found

Timezone region not found (timezone region not found)

In the past to recommend

Front-end, deploy dist to Nginx

Multi-picture detailed explanation, one time to understand the prototype chain (ten thousand words)

Lao Shi said that everything is the object, you also believe?

Vue-cli3 builds the component library

Vue implements dynamic routing (and the interviewer blows project highlights)

Axios manipulation in a project you didn’t know about (Core principles of handwriting, compatibility)

VuePress builds project component documentation

Vue-typescript-admin-template background management system

The original link

Juejin. Cn/post / 703209…