Category Archives: Error

Oracle18c Error: ORA-12012: error on auto execute of job

For the newly installed Oracle 18C database, the alert log keeps making errors:

ORA-12012: error on auto execute of job

ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_222"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 49538
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 881
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 21631
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 23763
ORA-06512: at "SYS.DBMS_STATS", line 49526
2022-02-28 01:27:20.762000 +08:00
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_j000_104148.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_224"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 49538
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 881
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 21631
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 23763
ORA-06512: at "SYS.DBMS_STATS", line 49526
2022-02-28 01:37:21.758000 +08:00
Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_j000_104738.trc:
ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_226"
ORA-20001: Statistics Advisor: Invalid task name for the current user
ORA-06512: at "SYS.DBMS_STATS", line 49538
ORA-06512: at "SYS.DBMS_STATS_ADVISOR", line 881
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 21631
ORA-06512: at "SYS.DBMS_STATS_INTERNAL", line 23763
ORA-06512: at "SYS.DBMS_STATS", line 49526

 

Solution:
Call the initialization package manually: go to sqlplus as administrator
1. sqlplus / as sysdba

2. check the current auto task belongs to the user already exists, if not then initialize the package

3. EXEC dbms_stats.init_package();

4. Confirm again

SQL> column name format A35
SQL> set linesize 120
SQL> select name, ctime, how_created from sys.wri$_adv_tasks where owner_name = 'SYS' and name in ('AUTO_STATS_ADVISOR_TASK','INDIVIDUAL_STATS_ADVISOR_TASK');

no rows selected

SQL> EXEC dbms_stats.init_package();

PL/SQL procedure successfully completed.

SQL> select name, ctime, how_created from sys.wri$_adv_tasks where owner_name = 'SYS' and name in ('AUTO_STATS_ADVISOR_TASK','INDIVIDUAL_STATS_ADVISOR_TASK');

NAME                                CTIME     HOW_CREATED
----------------------------------- --------- ------------------------------
AUTO_STATS_ADVISOR_TASK             28-FEB-22 CMD
INDIVIDUAL_STATS_ADVISOR_TASK       28-FEB-22 CMD

[Solved] ROS Error: Could NOT find move_base_msgs

Ubuntu18.04 + ROS melodic, catkin compile mbot error:

-- +++ processing catkin package: 'mbot_navigation'
-- ==> add_subdirectory(mbot_navigation)
-- Could NOT find move_base_msgs (missing: move_base_msgs_DIR)
-- Could not find the required component 'move_base_msgs'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "move_base_msgs"
  with any of the following names:
    move_base_msgsConfig.cmake
    move_base_msgs-config.cmake

 

Solution:

sudo apt-get install ros-melodic-move-base-msgs

jupyter notebook Sets Default Browser Error: SyntaxError: (unicode error) ‘utf-8‘ codec can‘t decode byte 0xd4

Jupiter notebook sets the default browser to open with an error
syntax error: (Unicode error) ‘UTF-8’ codec can’t decode byte 0xd4 in position 0: invalid continuation byte

The default code of the Notepad provided by the win system is ANSI. Just reopen the PY script in the notebook,
save it as a py script coded as UTF-8, and it’s OK to run the PY script.

Modify the name of the file: jupyter_notebook_config.py

Code reference

import webbrowser 
webbrowser.register( "Cent Browser", None, webbrowser.GenericBrowser(r"C:\Users\中文用户名\AppData\Local\CentBrowser\Application\chrome.exe"))
c.NotebookApp.browser = "Cent Browser"

Set default browser, CMD input

jupyter notebook --generate-config

Find the PY file of the default configuration file
open it with notepad and find this statement: # c.NotebookApp.browser =
at the bottom of this statement, enter the following statement: the following figure is the configuration of chrome, * * pay attention to double \\**

# c.NotebookApp.password = '' Here
import webbrowser
webbrowser.register('chrome', None, webbrowser.GenericBrowser(u'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'))
c.NotebookApp.browser = 'chrome'

MFC:: error C2065: “IDD_DIALOG1”: undeclared identifier Sending and handling custom messages in MFC threads

Just add the resource header file.

#include "Resource.h"

Send message in MFC thread

1. Write the meaning first and accept it

#define WM_SET_FOCUS WM_USER+100



BEGIN_MESSAGE_MAP(CWriteSnDlg, CDialogEx)
    //
	ON_MESSAGE(WM_SET_FOCUS, OnSetFocus)
END_MESSAGE_MAP()



	afx_msg LRESULT OnSetFocus(WPARAM wP, LPARAM lp);


LRESULT CWriteSnDlg::OnSetFocus(WPARAM wP, LPARAM lp)
{
	UNREFERENCED_PARAMETER(wP);
	UNREFERENCED_PARAMETER(lp);
	GetDlgItem(IDC_EDIT1)->SetFocus();
	return 0;
}

2. Send message

UINT  WriteSNProc(LPVOID  lParam){
    CWriteSnDlg *pWnd = (CWriteSnDlg *)lParam; 
    PostMessage(*pWnd,WM_SET_FOCUS, NULL,NULL);
    //SendMessage(*pWnd,WM_SET_FOCUS, NULL,NULL);
}



 PostMessage(this,WM_SET_FOCUS, NULL,NULL);

[Solved] ROS fatal error: alsa/asoundlib. h: There is no such directory or file

Ubuntu18. 04 + catkin for ROS melody_Make compile robot_Voice, the error message is as follows:,

Scanning dependencies of target iat_publish
[ 12%] Building CXX object robot_voice/CMakeFiles/iat_publish.dir/src/iat_publish.cpp.o
[ 25%] Building C object robot_voice/CMakeFiles/iat_publish.dir/src/linuxrec.c.o
cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C
/home/mc/ros/vision/src/robot_voice/src/linuxrec.c:12:10: fatal error: alsa/asoundlib.h: 没有那个文件或目录
 #include <alsa/asoundlib.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
robot_voice/CMakeFiles/iat_publish.dir/build.make:110: recipe for target 'robot_voice/CMakeFiles/iat_publish.dir/src/linuxrec.c.o' failed
make[2]: *** [robot_voice/CMakeFiles/iat_publish.dir/src/linuxrec.c.o] Error 1
CMakeFiles/Makefile2:449: recipe for target 'robot_voice/CMakeFiles/iat_publish.dir/all' failed
make[1]: *** [robot_voice/CMakeFiles/iat_publish.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j12 -l12" failed

Solution:

sudo apt-get install libasound2-dev

Or

sudo yum install alsa-lib-devel

How to Solve Chrome Error: “ERR_HTTP2_PROTOCOL_ERROR”

Practical application items: http://github.crmeb.net/u/long

Solution:

  • open chrome://flags/ page
  • find Block insecure private network requests. and Enable Trust Tokenstwo
  • Change its value from Default to Enable
  • Click the ReLaunch button restart the browser
  • Reopen the website that reported the error
  • If it doesn’t open, enter chrome://restart/ it in the address bar and restart the browser.

[Solved] SQLite Error: SQLite error near “@table“: syntax error

In my previous post on c# operation SQLite, I found that sometimes the following errors occur when running:

SQLite error near “@table”: syntax error

The error code is as follows:

public static Tuple<bool, DataSet, string> GetBarcode(string barcode)
{
    if (string.IsNullOrEmpty(barcode))
    {
        return new Tuple<bool, DataSet, string>(false, null, "The passed parameter cannot be empty");
    }

    string sql = "SELECT * FROM @table WHERE Barcode = @barcode";
    SQLiteParameter[] parameter = new SQLiteParameter[]
    {
        new SQLiteParameter("table", "Database Table Name"),
        new SQLiteParameter("barcode", barcode)
    };
    return SQLiteHelpers.ExecuteDataSet(sql, parameter);
}

 

Solution:

I found that the database table name cannot be added to the SQLiteParameter parameter list, the other column names are fine, and the SQL statement will not report an error if you change to the string connection method, as follows.

public static Tuple<bool, DataSet, string> GetBarcode(string barcode)
{
    if (string.IsNullOrEmpty(barcode))
    {
        return new Tuple<bool, DataSet, string>(false, null, "The passed parameter cannot be empty");
    }

    string sql = string.Format("SELECT * FROM {0} WHERE Barcode = @barcode", "Database Table Name");
    SQLiteParameter[] parameter = new SQLiteParameter[]
    {
        new SQLiteParameter("barcode", barcode)
    };
    return SQLiteHelpers.ExecuteDataSet(sql, parameter);
}