Tag Archives: ProgrammerAH

The error record when docker starts Nacos, and the solution to the problem of port occupation

  Error starting userland proxy: listen tcp4 0.0.0.0:8848: bind: address already in use

The problem with this error message is that the port is occupied

View occupied port commands

netstat -tanlp

Kill the process (note that instead of killing the port, it is the port of PID)

kill 6046

This is the current solution

To mention something else, it’s actually because uploading jar package failed to start Nacos, because Tomcat failed to start. Later, docker’s Nacos is used to solve the problem. The later results are appropriate and can be used. Docker is still good, ha ha

 

RocketMQ Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check…

Question

Analysis: according to the error prompt, it should be the problem of maven checkstyle plugin.

solve

Method 1: find the plug-in maven checkstyle plugin: 2.17 and add the skip attribute.

  Modify pom.xml

  Method 2: find the plug-in tag corresponding to maven checkstyle plugin: 2.17 and comment it out.

Clear the original target directory and recompile it!

Mac Pyaudio Installation fatal error: ‘portaudio.h‘ file not found

I’m about to cry by myself.
first of all, install portaudio

brew install portaudio

Secondly, find the installation path of portaudio

sudo find/-name "portaudio.h"

In my example, my path is stored in /opt/Hometree/cellular/portaudio/19.7.0/include/portaudio. H

Finally, replace the portaudio path with your own and run the following code

pip install --global-option='build_ext' --global-option='-I/opt/homebrew/Cellar/portaudio/19.7.0/include' --global-option='-L/opt/homebrew/Cellar/portaudio/19.7.0/lib' pyaudio

Python TypeError: not all arguments converted during string formatting [Solved]

For example:

 strs=(1,2,3,4)  #Create a collection
 strs
 (1, 2, 3,4)
 >>> print 'strs= %s ' % strs
 Traceback (most recent call last):
   File "<pyshell#43>", line 1, in <module>
     print 'strs= %s ' % str
 TypeError: not all arguments converted during string formatting

Reason: the 1% operator can only be used directly for string (‘123 ‘). If it is a list ([1,2,3]) or tuple, it needs to match operators one by one.

To put it bluntly, it’s written in parentheses with commas (STRs,)

Solution:

print 'strs= %s' % (strs,)
strs= (1, 2, 3,4)
or
print 'strs= %s,%s,%s,%s' % sstr
strs= 1,2,3,4 

# simple explanation
the% before and after explanation does not correspond to the number of parameters after explanation, such as

File "<pyshell#37>", line 1, in <module>
print '%f meters is the same as &f km' % (meters, kilometers)
TypeError: not all arguments converted during string formatting

There are two parameters of miles and kilometer in the back, only one% F in the front, and one & amp; with wrong print;, The former is inconsistent with the latter; If you change it to

print '%f miles is the same as %f km' % (miles, kilometers)

That’s all

Java.sql.SQLException: ORA-02291: integrity constraint violated – par

java.sql.SQLException: ORA-02291: integrity constraint (BOOKER.FK_ANDON_EVENT_STATUS) violated – parent key not found
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)
from: http://www.dba-oracle.com/t_ora_02291_integrity_constraint_string_string_violated_parent_key_not_found.htm

The Oracle docs note this on the ora-02291 error:
ORA-02291: integrity constraint (string.string) violated – parent key not found

Cause: A foreign key value has no matching primary key value.
Action: Delete the foreign key or add a matching primary key.

For an insert statement, this ORA-02291 error is common when you are trying to insert a child without a matching parent, as defined by a foreign key constraint.  In that case, you need to add the parent row to the table and then re-insert your child table row.
See the dba_constraints view to find the parent table.

To fully understand [primary and foreign key constraints, see the book Easy Oracle Jumpstart, to explain these concepts:

Entity integrity error
Your foreign key FK_ANDON_EVENT_STATUS will be wrong if there is no data in the column of the corresponding parent table, you should insert the parent table first, then insert the child table
Table a has a foreign key, pointing to table b, then b is the parent table of a, the foreign key refers to the column is the parent key

 

ORA-24338 statement handle not executed [How to Solve]

Today I received a mail from the developer that the program occasionally reports an error when calling a function, but most of the time it is normal, the specific error is as follows:
12/8/2010 5:54:34 PM – Checking MERGED DFMS with Servicetag [128QPN1]
12/8/2010 5:54:34 PM – Creating Dataset
12/8/2010 5:54:34 PM – Initializing WebReference
12/8/2010 5:54:34 PM – Web reference creted, calling GetSn option
12/8/2010 5:54:34 PM – WS returned: ORA-24338: statement handle not executed
12/8/2010 5:54:34 PM – Try to fill out the datagrid with the first table
12/8/2010 5:54:34 PM – Exception Caught:System.NullReferenceException: Object reference not set to an instance of an object.
at TEST_DFMS.Form1.button4_Click(Object sender, EventArgs e)

ORA-24338 statement handle not executed

Cursor not executed

Cause: A fetch or describe was attempted before executing a statement handle.
Fetching from above without executing a cursor

Action: Execute a statement and then fetch or describe the data.
Do a good job of exception control, if the analysis or execution of the error to do a good job of exception control, php, jsp pages are easier to handle when the error.

Solution to the error of automapper installation in vs2012 nuget

When vs2012 installs automapper under. Net 4.0, the following error will be reported:

‘automapper’ already has a dependency defined for ‘standard. Library’.

‘AutoMapper’ already has a dependency defined for ‘Standard.Library’.

It is found that the nuget Version (version 2.83 of vs2012) is lower, and the standard. Library framework is not supported.

 

There are two solutions

Method 1
nuget 2.12 supports the. Net standard framework used by automapper 5.0.1 nuget package, so nuget needs to be upgraded to nuget 2.12 or above downgrade the version of automapper to nuget compatible with the current version. After testing, 4.1.1 is installed perfectly, and microsoft.bcl is installed along with it. Await and async of. Net4.5 can be used
PM & gt; Install-Package AutoMapper -Version 4.1.1
Installing ‘AutoMapper 4.1.1’.
Successfully installed ‘AutoMapper 4.1.1’.

reference resources:

http://majing.io/questions/557

Reproduced in: https://www.cnblogs.com/yanglang/p/7065049.html

In IE6, “RES / C”: windows, system32, shdoclc. DLL, HTTP 403. HTM “.

In IE6, “res:// c://windows.system32.shdoclc.dll HTTP”_ 403.htm& http://.. (specific path) “is wrong. The reason is that my path in the background is “./admin/other directory”.

Where admin is in the root directory. In IE6, because “/” represents the root directory, another path will be added in front of the actual path.

Therefore, if the admin is already in the root directory and IE6, you only need to remove “/” and it can solve the problem.

This problem will lead to the following errors: 403 Forbidden, access forbidden, etc.

Reproduced in: https://www.cnblogs.com/gowhy/archive/2011/07/05/2097924.html

[solved] win10 + office2016 error: library not registered, HResult: 0x8002801d

Sad today

{0} cannot cast a COM object of type ‘Microsoft. Office. Interop. Word. Applicationclass’ to interface type’ Microsoft. Office. Interop. Word_ Application”。 This operation failed because the queryinterface call to the COM component of the interface with IID “{00020970-0000-0000-c000-000000000046}” failed with the following error: the library is not registered( Exception from HResult: 0x8002801d (type_ E_ LIBNOTREGISTERED))。”}

My situation

1. Win10 + 64 bit
2. Re installed office2016, but previously uninstalled the professional version of office2016 and WPS

solve

Re install WPS, it’s OK.

Cause of error

WPS component conflicts with office component. This thing {00020970-0000-0000-c000-000000000046} may be related to WPS, and then I didn’t uninstall it completely. After the WPS is re installed, it will register the component, so no error will be reported.

reference resources

Thank you very much for your inspiration:
C # importing excel2010 has the problem of DLL loading failure or unregistered class library, 0x8002801d or 0x80029c4a

And, if you are not sure about the root cause of the error, you can try step by step:
failed to retrieve the component with CLSID {000209ff-0000-0000-c000-000000000046} in the com class factory, because of the following error: 80070005 denied access
there are four methods listed in this article. Of course, the simplest and most crude method is the last resort, which is to reload the system.

Server configuration excel export HResult: 0x800A03EC

The exception prompt is as follows:
Microsoft Office Excel cannot access the file “*. XLS”. The possible reasons are:
1 the file name or path does not exist this is an unexplained error. Debugging on the local machine is normal, but once it is deployed to the server, it cannot be accessed

After checking some information, we found that everyone encountered this problem

The solution is to create a directory named desktop under the directory of C: windows, system32, config, systemprofile and C: windows, syswow64, config, systemprofile

For the problem that COM components cannot be accessed,
solution:
1.
1). Add simulation in webconfig and add administrator permissions,

2). In this way, you can start the application process, operate excel, create new EXCEL and export Excel, but you still can’t open the excel file on the server side
however, this method has a disadvantage: if you, If the crystal report is used in the project, the crystal report will be abnormal, so the handout is handled in the latter way
2.
in the component service, DOCM sets the attributes of Microsoft Excel application,
because it operates on a 64 bit system, docom does not have it by default in the component service, because Microsoft Excel application is a DCOM configuration of 32, So solve it in the following way (refer to step 3)

    1) . start –> run –> CMD
    2) at the command prompt, enter comexp.msc – 32 to open the 32 console
    3). In the file menu, add and delete snap ins –> component services
    4). Find “Microsoft Excel application” in “DCOM configuration”, right-click it, and then click “properties”, The “Microsoft Excel application properties” dialog box will pop up
    5). Click the “identity” tab and select “interactive user”
    6). Click the “security” tab, click “custom” on the “start and activate permissions”, and then click the corresponding “Edit” button to fill in a “network service” user in the pop-up “security” dialog box, And give it the “local start” and “local activation” permissions
    7). It is still the “security” label. Click “custom” on the “access permission”, and then click “Edit”. In the pop-up “security” dialog box, a “network service” user is also added, Then give “local access” permission.
    the specific figure is as follows:






    Causes and solutions of nm test o file format not recognized

                   

            Recently, I wrote makefile,   Encountered the error nm: test. O: file format not recognized. Let’s see:

            test.h:

    void output();

            test.cpp:

    #include <stdio.h>#include "test.h"void output(){ printf("c is good\n");}

              compile:

    xxxxxx:~/mkfile> g++ -c test.cpp test.h -o test.oxxxxxx:~/mkfile> nm test.onm: test.o: File format not recognizedxxxxxx:~/mkfile>

              Strange, isn’t it?The reason is that there are too many test. H files. There is no need at all. The compiler will find them automatically as long as you specify the directory.   If you change the order of test. H and test. CPP, you will be prompted:

    xxxxxx:~/mkfile> g++ -c test.h test.cpp -o test.og++: cannot specify -o with -c or -S with multiple filesxxxxxx:~/mkfile> 

              We have already said that.

              It seems that when there is – O, you can go to – C to specify multiple files, which is a huge pit.

               

    Let’s share my teacher Dashen’s AI course. Zero base! Easy to understand! Funny! And yellow jokes! Hope you can join our AI team! https://blog.csdn.net/jiangjunshow