Category Archives: How to Fix

Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently

Error using Java connection oACLE12C:
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
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:673)
at oracle.jdbc.driver.PhysicalConnection.< init> (PhysicalConnection.java:711)
at oracle.jdbc.driver.T4CConnection.< init> (T4CConnection.java:385)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:558)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at demo1.DBHelp.getCon(DBHelp.java:16)
at demo1.DBHelp.main(DBHelp.java:28)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12505, TNS: listener does not currently know of SID given in the connect descriptor

the at oracle.net.ns.NSProtocolStream.negotiateConnection (NSProtocolStream. Java: 272)
the at oracle.net.ns.NSProtocol.connect(NSProtocol.java:263)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486)
. 8 more
obviously, this is because the listener cannot recognize the database SID in the connection identifier, go to the network to look up
The solution online is as follows: find the tnsnames.ora file and open it using Notepad or another tool. Note that this is the path of the ORACLE 12C file and different versions of Oracle are in different paths
D:\oracle\app\Administrator\product\12.1.0\dbhome_1\NETWORK\ADMIN tnsnames.ora

# tnsnames.ora NETWORK Configuration File: D:\oracle\app\Administrator\product\12.1.0\dbhome_1\network\admin\tnsnames. Ora
# Generated by oracle configuration tools.

LISTENER_TEST =
(ADDRESS = (PROTOCOL = TCP)(HOST = Localhost)(PORT = 1521))

LISTENER_ORACLE12C =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST) =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))

(CONNECT_DATA =

(SID = CLRExtProc) (the PRESENTATION = RO)

ORACLE12C =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)))
(CONNECT_DATA =
(SERVER = oracle12c))
(SERVICE_NAME = oracle12c)
)
)
// Change the red part to the one shown above. The green part is the instance name of the database when you installed it.

D: Oracle \ App \Administrator\ Product \12.1.0\dbhome_1\NETWORK\ADMIN Listener. Ora file
The contents of the file are as follows:
# listener.ora Network Configuration File: D:\oracle\app\Administrator\product\12.1.0\dbhome_1\network\admin\listener. Ora
# Generated by oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\oracle\app\Administrator\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = “EXTPROC_DLLS = ONLY: D: \ oracle \ app \ Administrator \ product \ 12.1.0 \ dbhome_1 \ bin \ oraclr12 DLL”)
)

 (SID_DESC =
(GLOBAL_DBNAME = oracle12c)
(ORACLE_HOME = D:\oracle\app\Administrator\product\12.1.0\dbhome_1)
(SID_NAME = oracle12c)
)

)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)

The red part is to add, save, and then restart the Oracle service.
The content of the test is shown below
package demo1;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class DBHelp {
private static String URL = “JDBC :oracle:thin:@127.0.0.1:1521:oracle12”;
private static String USERNAME = “system”;
private static String PASSWORD = “940109”;
public static Connection getCon(){
Connection conn = null;
try {
Class.forName(“oracle.jdbc.driver.OracleDriver”);
conn = DriverManager.getConnection(URL,USERNAME,PASSWORD);
if(conn! =null)
System.out.println(“connect successful”);
} catch (Exception e) {
e.printStackTrace();
}
return conn;
}
/**
* @param args
*/
public static void main(String[] args) {
System.out.println(new DBHelp().getCon());
}
public static void close(Connection con,Statement sm,ResultSet rs){
try {
if(con! =null){
con.close();
}
if(sm! =null){
sm.close();
}
if(rs ! = null){
rs.close();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}
// There will be no more errors
connect successful
oracle.jdbc.driver.T4CConnection@1edf1c96
In other words, when installing Oracle12c, I changed the name of the instance by myself. If it is installed according to the default instance, then the above content basically does not need to be modified by myself.
Is not installed as the default instance.

SQL Msg 18054, Level 16, State 1

Today I received a seemingly simple task — to modify a piece of data in a database. Sounds simple enough.
A search on the Internet soon pieced together the corresponding SQL statement:

UPDATE [suivi].[dbo].[numSerie]
SET ni_numCible = ‘HF17263N7P13340’
WHERE ni_num = ‘HF17262A1400234’

As you can see from the above statement, the task is simple. In the [suivi].[dbo].[numSerie] table, find the record ni_num = ‘HF17262A1400234’ and set the ni_numCible field for that record to ‘HF17263N7P13340’.
Unexpectedly, after the above statement is executed, the following prompt appears:

Msg 18054, Level 16, State 1, Procedure tg_InsUpdCible, Line 31
Error 50010, severity 16, state 1 was raised, but no message with that error number was found in sys.messages. If error is larger than 50000, make sure the user-defined message is added using sp_addmessage.
Msg 3609, Level 16, State 1, Line 1
The transaction ended in the trigger. The batch has been aborted.

After the execution should not appear “XX Rows Afftectd”, as SQL small white, for this pile of prompts, it means that I do not understand.
Well, Google it, OK, and see the first result.
It looks like I got the same error message, so take a closer look. The following code is found:

/*Check for valid parameter*/
If LEN(@txtbidderid) =0 or ISNULL(@txtbidderid, ") = "
RAISERROR(50002,10, 1,'Error Accessing Bidder Record - Must Provide Bidder ID')
ELSE

The Error 50002 obtained by the author should be output here, then my next work should be to find where the file I output Error 50010 here is, after finding out, why should I throw Error 50010 to me, how to avoid it will be easily solved!
I don’t know what kind of file the author posted. After searching for a few key words in this file, I get trigger. This means that the insert \ UPDATE \ DELETE operation will automatically trigger some operations. But where’s this trigger?Let’s find out.

Check the contents of the highlighted file in the figure above, and sure enough, it says under what conditions Error 50002 will be thrown.
Right-click the file and, alas, there isa Disable menu that appears to Disable the trigger.
After disabling the trigger, go back to the original SQL statement in this article and you’re done! And then the trigger is enabled. OK, mission accomplished!
For those of you who know a little bit about SQL, this little problem today should be very easy to solve. But for someone like me who knows very little about SQL, it can be a real threat. Record the process of solving the problem now, is to provide the solution to the rest of the same problems, more important is to remind yourself, have a problem, the key is to solve the problem, don’t encounter a problem, find a pile of related tutorials to begin again chew, this can’t be sure, there is no doubt that this will give up less than half an hour. Always take the solution of the current problem as the fundamental goal, step by step, the problem will be solved naturally.

Reproduced in: https://www.cnblogs.com/outs/p/7730733.html

Error: connect econnreused 0.0.0.0:443 is reported when executing the trunk unbox react

Premise: I’m on a MAC and I don’t know if Windows is ok
React – Box project construction

localhost:ReactDapp liyuechun$ truffle unbox react-box

Starting unbox...
=================

✔ Preparing to download box
✖ Downloading
Unbox failed!
RequestError: Error: connect ECONNREFUSED 0.0.0.0:443
    at new RequestError (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/errors.js:14:1)
    at Request.plumbing.callback (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/plumbing.js:87:1)
    at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request-promise-core/lib/plumbing.js:46:1)
    at self.callback (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request/request.js:185:1)
    at Request.emit (events.js:189:13)
    at Request.onRequestError (/usr/local/lib/node_modules/truffle/build/webpack:/node_modules/request/request.js:881:1)
    at ClientRequest.emit (events.js:189:13)
    at TLSSocket.socketErrorListener (_http_client.js:392:9)
    at TLSSocket.emit (events.js:189:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Truffle v5.1.29 (core: 5.1.29)
Node v10.15.3

The solution
Download demo, copy and unpack the hosts file in the folder, open the terminal, enter open /etc, paste the hosts into the etc folder, and replace the original 0 hosts1 file.

localhost:ReactDapp liyuechun$ truffle unbox react-box

Starting unbox...
=================

✔ Preparing to download box
✔ Downloading
✔ cleaning up temporary files
✔ Setting up box

Unbox successful, sweet!

Commands:

  Compile:              truffle compile
  Migrate:              truffle migrate
  Test contracts:       truffle test
  Test dapp:            cd client && npm test
  Run dev server:       cd client && npm run start
  Build for production: cd client && npm run build

Refer to the link

GitHub push ErrorThe requested URL returned error: 403 Forbidden while accessing

When doing GTI operations over HTTPS, a problem arises when pushing the command:
The requested URL returned error: 403 Forbidden while accessing
Unable to push their own application. After some searching and testing, here is the simplest solution:
On the command line, change the address of the remote repository and add your user name to the front of the address:

git remote set-url origin https://[email protected]/user/repo.git

As my original origin address is: https://github.com/shincling/Initial_test_02.git
At this point becomes: https://[email protected]/shincling/Initial_test_02.git

And then if you Push, git, Push origin master, it will pop up and it will ask you for your password

You can actually just add the password to origin and just Push it

from:
http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed

Support annot run git xcrun: error: invalid active developer path

The Mac upgraded the system and found Git broke in idea…   
Complete error message
С annot Run Git
xcrun: error: invalid active developer path (/ Library/developer/CommandLineTools), missing xcrun at:/Library/developer/CommandLineTools/usr/bin/xcrun

to see if Git can be used properly on the command line -help still registers the same error as above
In the search under git installation directory
Whereis the git
/usr/bin/git
The git installation location can be printed correctly
If there is a problem with the Git installation, brew Install Git is used again
Error: The following formula:
git
cannot be installed as a binary package and must be built from source.
Install The Command Line Tools:
xcode-select — Install
Error: Git must be installed and in your PATH!
Error: The following formula:
git
cannot be installed as a binary package and must be built from source.
Install The Command Line Tools:
xcode-select — Install
This error prompts xcode-select –install
Then use Xcode-select-install to solve the installation successfully

The console sees the successful output using the git –help command
Solution: use Xcode-select-install to complete the installation and restart idea
 

The apple mobile device service failed to start. Error 1053 is resolved

This article is reproduced from:
https://www.cnblogs.com/relax/p/3476741.html author: relax reprint please indicate the statement.

I didn’t want to install iTunes, so I downloaded the iTunes64 installation package and unzipped it to get six files

Installed AppleMobileDeviceSupport64. Msi found start up service, prompt error 1053, under the search on the net, found the mistake very much

Then continue to install AppleApplicationSupport. Msi, installation is complete to start the Apple Mobile Device service

So Apple Mobile Device service start failure can try to reinstall AppleApplicationSupport. Msi to solve
I shall be very glad if this article is of any help to you
 
 

solve atibtmon.exe error

After the laptop installed Win7, toss and turn, with the driver wizard updated all the drivers, and installed a variety of software, then use QQ housekeeper optimization system.

Later, it was found that the system often reported errors at startup, atibtmon.exe, as follows:

Searched on the Internet, some said to reinstall the video card driver, some said to reinstall visual c++ 2008.

Reinstall again, report the error as before.

Finally, he tossed around AMD’s management software and tried it. It was a battery setup problem.

When the battery is selected to “maximize battery life”, atibtmon.exe will report an error when the laptop is switched from the wired power supply to the battery.

The following Settings, battery select “Maximize performance” when the problem is resolved.

Error c2064: term does not evaluate to a function in VC

I encountered this problem today: I found that an object was constructed twice. The first time an object is defined as a global variable using the no-argument default constructor FFT FftTrans; In the second chapter, when the function calls this object, the constructor with parameters is adopted. At this time, the compiler reports error C2064: term does not evaluate to a function.
Solution: In the function to call this object, at this time you want to have the constructor initialization parameters, but will report an error case, in the class to which the object belongs to define a method, function and parameters of the constructor initialization, and then use the object to call this method, achieve the same purpose!
Note: In solving this problem, it is found that the same error occurs when a variable is passed into the function, but the “()” symbol is added to the variable, which causes the same error.

Solutions to Excel 2007 “cannot shift object off sheet”

Yesterday when I was editing an Excel 2007 file, I tried to add a new line, but it failed every time. Excel said “Cannot shif objects off sheet”, as shown in the figure below.

  

The simplest solution is to press
Ctrl+6, you can’t add new lines again. The specific reasons can be found in the following links:

http://office.microsoft.com/en-us/excel/HA102412411033.aspx

Reproduced in: https://blog.51cto.com/jackiechen/281830

Ionic1 compiling IOS encountered * * archive failed * * cordovaerror: promise rejected with non error: ‘error code 65 f

** ARCHIVE FAILED **
CordovaError: Promise rejected with non-error: ‘Error code 65 for command: xcodebuild with args: -xcconfig,platforms/ios/cordova/build-debug.xcconfig,-workspace,AotaoWorld.xcworkspace,-scheme,AotaoWorld,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,AotaoWorld.xcarchive,archi ve,CONFIGURATION_BUILD_DIR=/
 
Remove ionic plugin-console and it is said that ionic-plugin-console is not supported in higher editions