Author Archives: Robins

SQL server remote computer refused network connection, error: 1225, specific solution steps.

SQL Sever remote computer rejects network connection. Error: 1225.
This problem is very common, and the solution steps are very simple. For the convenience of my colleagues who are just beginners like me, the steps are specially illustrated and recorded. The following is the specific operation.
 
First, press the shortcut key: CTRL+SHIFT+ESC to open the task manager as shown below.

 
Second, select the Service option in the options bar at the top.

 
The third step is to find the SQL instance (the one you named before) and find that the state is “stopped”.

Step 4: Right click “Stop”, a drop-down appears, and select the “Start” option. Upon completion, the status is displayed as “Running”.

Step 5, restart SQL Sever, the connection can be used normally.

When WebSphere deploys a project, an error is reported: error 500: javax.servlet.ServletException : SRVE0207E: Uncaught initialization

 
Premise:
A normal Maven project, running locally with Tomcat, but on the webSphere test environment, reports the following error when accessed:
 
Error 500: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet
 
Try to solve:
All sorts of things went awry, and Baidu probably did it because the JDK version of the project was not compatible with the JDK version of websphere
 
Final solution:
View the webSphere version as follows;
On the left side of the console:



It turns out that the webSphere version USES 1.6,
The JDK version of the local project is 1.8,
Since there are many projects deployed on webSphere, it would be more convenient to change the local project’s compile and run environment to 1.6.
Change the local project compilation environment to JDK 1.6, which is consistent with the webSphere JDK. Repackage, upload webSphere, and fix the problem.
 —————————–
Appendix:
English version websphere view the JDK version of a deployment server:

 

 

 


 
Category: websphere, project deployment configuration

Solve the red letter prompt “sub process / usr / bin / dpkg returned an error code (2) in Cydia

“Sub-process/usr/bin/ DPKG returned an error code(2)
” will not be able to uninstall the plug-in and install
Solution: Go to this path /var/lib/dpkg/(you can use Filza, or connect to your computer to use an assistant), change the file name in the red box to: “Available” and rename it to “available-bak”; Rename the “status” to “status-BAK”, rename the “available” to “available”, and rename the “status-old” to “Status”. If you don’t have any files, you don’t need to change them. Reopen Cydia.
If it is found that such errors still occur
 

Error. JPG
Enter the path of /var/lib/ DPKG /updates/ directory to delete all the files, (backup files are recommended before operation) enter the path of /var/lib/ DPKG/then change the “available-bak” file to “available”, reopen Cydia to solve! .

Call to a member function fetch_assoc() on a non-object

code is as follows:

require_once ‘.. /pd_inc/pd_mysqlHelper.class.php’;

$prov = array ();

$my = new mysqlHelper();

$my-> Execute_dml (‘ use city);

$query = $my – & gt; Execute_dql (” call pd_seek_city (1, 0, null, null);” );

the while ($res = $query – & gt; fetch_assoc()){

$prov [] = $res;

}

?>

// newbie cute new, please great god more advice, please

Error: cannot load system.img problem

If the system. Img is too large, it often causes an error: cannot load the system. Img problem.
This method can be used to solve:
Fastboot flash -S 256M system. Img,
If it doesn’t work, use it
Fastboot flash-s 128M system. Img,
Flexible adjustment.

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