Tag Archives: database

[Solved] Error:couldn‘t connect to server 127.0.0.1:27017, connection attempt failed: SocketException: …

Error:couldn‘t connect to server 127.0.0.1:27017, connection attempt failed: SocketException: …

Problem Examples

Do you encounter the following problems when entering mongo at the terminal?

couldn’t connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: ���� Ŀ ����������� ܾ ���� ޷ ���� ӡ �

Problem analysis

In fact, this problem is not complicated, just because your mongodb is not started. Just start it.

Problem-solving

Enter the bin directory of mongodb (enter the bin directory of mongodb you installed)

Input command (port number can be specified)

mongod –logpath “E:\professional_software\mongodb\data\log\mongodb.log” –dbpath “E:\professional_software\mongodb\data\db” –logappend

or

mongod –logpath “E:\professional_software\mongodb\data\log\mongodb.log” –dbpath “E:\professional_software\mongodb\data\db” –logappend –port 8888

In this way, the startup is successful and the next step is ready. Open another command prompt and enter mongo.

Fuseki failed with message “Parse error: [line:1, col: 1] Content is not allowed in prolog.“

Fuseki failed with message “Parse error: [line:1, col: 1 ] Content is not allowed in prolog.“

Recently, when uploading an rdf file with fuseki, the following error code occurred:

 failed  with message "Parse error: [line:1, col: 1 ] Content is not allowed in prolog."

I went to Google and found a pdf. Here is the link. It means that the problem can be avoided by changing the file suffix to .ttl. But the reason is not clear yet.
Attached is the original content of test.rdf.

@prefix ns1: <http://test.com/> .

ns1:node1 ns1:born ns1:1964 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Keanu-Reeves .

ns1:node101 ns1:born ns1:1947 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Takeshi-Kitano .

ns1:node102 ns1:born ns1:1968 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Dina-Meyer .

ns1:node103 ns1:born ns1:1958 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Ice-T .

ns1:node104 ns1:born ns1:1953 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Robert-Longo .

ns1:node106 ns1:born ns1:1966 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Halle-Berry .

ns1:node107 ns1:born ns1:1949 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Jim-Broadbent .

ns1:node108 ns1:born ns1:1965 ;
    ns1:labels ns1:Person ;
    ns1:name ns1:Tom-Tykwer .

The reason may be that file format may be confused.

EF core Creates pg library and Model Report an Error [Solved]

PM> Scaffold-DbContext "server=localhost;database=SimulationDatabase;uid=postgres;pwd=123456;port=5432;" Npgsql.EntityFrameworkCore.PostgreSQL -OutputDir PgModel -Force
Build started...
Build succeeded.
To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
Npgsql.PostgresException (0x80004005): 3D000: ���ݿ� "SimulationDatabase" ������
   at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|215_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|195_1(NpgsqlConnector conn, SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt)
   at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.ConnectorPool.OpenNewConnector(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.ConnectorPool.<Get>g__RentAsync|28_0(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlConnection.<Open>g__OpenAsync|45_0(Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlConnection.Open()
   at Npgsql.EntityFrameworkCore.PostgreSQL.Scaffolding.Internal.NpgsqlDatabaseModelFactory.Create(DbConnection dbConnection, DatabaseModelFactoryOptions options)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Scaffolding.Internal.NpgsqlDatabaseModelFactory.Create(String connectionString, DatabaseModelFactoryOptions options)
   at Microsoft.EntityFrameworkCore.Scaffolding.Internal.ReverseEngineerScaffolder.ScaffoldModel(String connectionString, DatabaseModelFactoryOptions databaseOptions, ModelReverseEngineerOptions modelOptions, ModelCodeGenerationOptions codeOptions)
   at Microsoft.EntityFrameworkCore.Design.Internal.DatabaseOperations.ScaffoldContext(String provider, String connectionString, String outputDir, String outputContextDir, String dbContextClassName, IEnumerable`1 schemas, IEnumerable`1 tables, String modelNamespace, String contextNamespace, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames, Boolean suppressOnConfiguring, Boolean noPluralize)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContextImpl(String provider, String connectionString, String outputDir, String outputDbContextDir, String dbContextClassName, IEnumerable`1 schemaFilters, IEnumerable`1 tableFilters, String modelNamespace, String contextNamespace, Boolean useDataAnnotations, Boolean overwriteFiles, Boolean useDatabaseNames, Boolean suppressOnConfiguring, Boolean noPluarlize)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.ScaffoldContext.<>c__DisplayClass0_0.<.ctor>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass3_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
  Exception data:
    Severity: ��������
    SqlState: 3D000
    MessageText: ���ݿ� "SimulationDatabase" ������
    File: d:\pginstaller_12.auto\postgres.windows-x64\src\backend\utils\init\postinit.c
    Line: 879
    Routine: InitPostgres
3D000: ���ݿ� "SimulationDatabase" ������

 

Solution:

PM> Scaffold-DbContext "Host=localhost; Port=5432 ;Database=simulation;Username=postgres;Password=123456" Npgsql.EntityFrameworkCore.PostgreSQL -OutputDir PostgreSqlModels -Context DBContext -force
Build started...
Build succeeded.
To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.

API Failed to Connect phoenix Error: java.sql.SQLException: ERROR 726 (43M10): Inconsistent namespace mapping properties

The error is reported as follows:

java.sql.SQLException: ERROR 726 (43M10):  Inconsistent namespace mapping properties. Cannot initiate connection as SYSTEM:CATALOG is found but client does not have phoenix.schema.isNamespaceMappingEnabled enabled
	at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:494)
	at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:150)
	at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1113)
	at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1501)
	at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:2721)
	at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1114)
	at org.apache.phoenix.compile.CreateTableCompiler$1.execute(CreateTableCompiler.java:192)
	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:408)
	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:391)
	at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
	at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:390)
	at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:378)
	at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1806)
	at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2569)
	at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:2532)
	at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
	at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:2532)
	at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
	at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.createConnection(PhoenixEmbeddedDriver.java:150)
	at org.apache.phoenix.jdbc.PhoenixDriver.connect(PhoenixDriver.java:221)
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1596)
	at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1662)
	at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:929)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1311)
	at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1307)
	at com.atguigu.app.func.MyBroadcastFunction.CheckAndCreate(MyBroadcastFunction.java:72)
	at com.atguigu.app.func.MyBroadcastFunction.processBroadcastElement(MyBroadcastFunction.java:65)
	at com.atguigu.app.func.MyBroadcastFunction.processBroadcastElement(MyBroadcastFunction.java:19)
	at org.apache.flink.streaming.api.operators.co.CoBroadcastWithNonKeyedOperator.processElement2(CoBroadcastWithNonKeyedOperator.java:118)
	at org.apache.flink.streaming.runtime.io.StreamTwoInputProcessorFactory.processRecord2(StreamTwoInputProcessorFactory.java:221)
	at org.apache.flink.streaming.runtime.io.StreamTwoInputProcessorFactory.lambda$create$1(StreamTwoInputProcessorFactory.java:190)
	at org.apache.flink.streaming.runtime.io.StreamTwoInputProcessorFactory$StreamTaskNetworkOutput.emitRecord(StreamTwoInputProcessorFactory.java:291)
	at org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput.processElement(AbstractStreamTaskNetworkInput.java:134)
	at org.apache.flink.streaming.runtime.io.AbstractStreamTaskNetworkInput.emitNext(AbstractStreamTaskNetworkInput.java:105)
	at org.apache.flink.streaming.runtime.io.StreamOneInputProcessor.processInput(StreamOneInputProcessor.java:66)
	at org.apache.flink.streaming.runtime.io.StreamTwoInputProcessor.processInput(StreamTwoInputProcessor.java:98)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.processInput(StreamTask.java:419)
	at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:204)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:661)
	at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:623)
	at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:776)
	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:563)
	at java.lang.Thread.run(Thread.java:748)

Prerequisites: The following configuration is available in the hbase-site.xml file, which must not be deleted later, and the resource folder of the API, hbase, and phoenix are already configured

<! -- Note: In order to enable the mapping of hbase's namespace and phoenix's schema, you need to add this configuration file to your application, and also on linux services, you need to add the above two configurations to the hbase-site.xml configuration files of hbase and phoenix, and use xsync for synchronization ( This is explained in the documentation in section 1).-->
    <property>
        <name>phoenix.schema.isNamespaceMappingEnabled</name>
        <value>true</value>
    </property>

    <property>
        <name>phoenix.schema.mapSystemTablesToNamespace</name>
        <value>true</value>
    </property>

Reason: The hbase-site.xml file in resource is not read, manually copy it to target\generated-sources folder.

Problem-solving!

[Solved] ERROR: Subproject directory not found and gst-plugins-base.wrap file not found

gstreamer1.0-plugins-bad compile Error:

| Found pkg-config: /sd1/jarvis-workspace/build-jarvis-imx-fb-imx6ull/tmp/work/cortexa7t2hf-neon-mx6ul-poky-linux-gnueabi/gstreamer1.0-plugins-bad/1.16.3-r0/recipe-sysroot-native/usr/bin/pkg-config (0.29.2)
| Run-time dependency gstreamer-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-base-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-net-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-controller-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-pbutils-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-allocators-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-app-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-audio-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-fft-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-riff-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-rtp-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-rtsp-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-sdp-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-tag-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-video-1.0 found: YES 1.16.3
| Run-time dependency gstreamer-check-1.0 found: YES 1.16.3
| Found CMake: NO
| Run-time dependency gstreamer-gl-1.0 found: NO (tried pkgconfig and cmake)
| Looking for a fallback subproject for the dependency gstreamer-gl-1.0
| 
| meson.build:283:0: ERROR: Subproject directory not found and gst-plugins-base.wrap file not found
| 
| A full log can be found at /sd1/jarvis-workspace/build-jarvis-imx-fb-imx6ull/tmp/work/cortexa7t2hf-neon-mx6ul-poky-linux-gnueabi/gstreamer1.0-plugins-bad/1.16.3-r0/build/meson-logs/meson-log.txt
| ERROR: meson failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/sd1/jarvis-workspace/build-jarvis-imx-fb-imx6ull/tmp/work/cortexa7t2hf-neon-mx6ul-poky-linux-gnueabi/gstreamer1.0-plugins-bad/1.16.3-r0/temp/run.do_configure.2066278' failed with exit code 1
ERROR: Task (/sd1/jarvis-workspace/layers/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.3.bb:do_configure) failed with exit code '1'

Solution:

sudo apt install libva-dev

[Solved] Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource

Springboot does not specify the “url” property, and cannot configure an embedded data source. Cause: Unable to determine the appropriate driver class

When you open a new springboot project:

Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class


Action:

Consider the following:
    If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
    If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

First, check whether the yml data source configuration file is correct, account password, etc…

I found that there is no resource file in the target file. A closer look shows that there is no icon in the resource file.

Solution:

Step 1: Select the corresponding item and right-click: Open Module Settings

Step 2: Click in sequence according to the corresponding steps, and finally don’t forget to Apply

If other startup errors fail, you can leave a comment!

idea Error: Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedded datasource

Error:

在这里插入图片描述
Error Message:

APPLICATION FAILED TO START
***************************

Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class


Action:

Consider the following:
	If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
	If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).


Solution:- [ ] List item
Just check the nacos port and change it to the port used by the project you are running.

[Solved] ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout

DBMS_STATS: GATHER_STATS_JOB encountered errors.  Check the trace file.
Errors in file /desdb_j000_26964.trc:
ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
KUP-11024: This external table can only be accessed from within a Data Pump job.

 

Error analysis:
The external table is not deleted normally,There is still information left in the data dictionary,The table does not actually exist.
An error is reported when the database runs the collect statistics job to collect these external tables.

 

Solution:

1. Find the object starting with ET:

select owner,
       object_name,
       object_type,
       status,
       to_char(created, 'yyyy-mm-dd hh24:mi:ss') created,
       to_char(last_ddl_time, 'yyyy-mm-dd hh24:mi:ss') last_ddl_time
  from dba_objects
 where object_name like 'ET$%';

2. Confirm that it belongs to the external table generated by dump

select owner,table_name,default_directory_name,access_type from dba_external_tables order by 1,2;

3. Delete

drop table SYSTEM.ET$02D805830001;

drop table SYSTEM.ET$03B700030001;

failed: RawInventory gets null OracleHomeInfo [How to Solve]

Error:

List of Homes on this system:

  Home name= OraDb11g_home1, Location= "/opt/oracle/products/11.2.0"
LsInventorySession failed: RawInventory gets null OracleHomeInfo

OPatch failed with error code 73

在这里插入图片描述

Solution:

Switch to ORACLE_HOME directory and add to oraInventory:

% cs $ORACLE_HOME/oui/bin

% ./attachHome.sh (Linux) execute attachHome.cmd (Windows)

在这里插入图片描述

tuxedo Compile Background Common Error [How to Fix]

Error 1: When compiling the service written by Proc, the header file cannot be found

Solution:

  • Execute the command first # find . -name “stddef.h” -print to find the storage path of stddef.h;
  • Review the content of the pcscfg.cfg file under $oracle_home/precomp/admin, Modify the content marked in red below to the storage path of stddef.h actually queried by the above find statement.

sys_include=(/usr/include,/usr/lib/gcc-lib/i486-suse-linux/2.95.3/include,/usr/lib/gcc-lib/i386-redhat-linux/2.96 /include)

Error 2: prompt “ORA-01031: insufficient privileges” when compiling background source files

Solution:

  • Log in with the oracle user,check the newsale user’s permission to use /home/oracle,execute the following command

$cd /home

$chmod –R 744 oracle

  • Grant write permissions to files such as tnsnames.ora under $ORACLE_HOME/network/admin.

 

Error 3: When compiling background source files, prompt “ORA-01034”

Problem symptoms:

“ORA-01034: ORACLE not available

ORA-27121: unable to determine size of shared memory segment

SVR4 Error: 13: Permission denied”

Solution:

Log in as the oracle user, execute the following command

$cd $ORACLE_HOME/bin

$ls -altr oracle #Modify if it is not the following permissions after viewing

$ chmod 6751 oracle

 

Error 4: When compiling background source files, prompts “ORA-01034, ORA-27101 and Linux Error: 2: No Such file or dirctory”

Solution:

Start oracle service and monitor.

 

Error 5: When compiling background source files, prompt “ORA-12705”

Solution:

Check whether the language configurations such as nls under the .bash_profile file are the same as the oracle user’s .bash_profile.

Error 6: When compiling background source files, prompt buildserver related errors

Solution:

Check whether the configuration and order related to tuxedo under the .bash_profile file are correct (Compare with the actual path).

Error 7: Compile background source files, prompt “You do not have a valid SDK license”

Solution:

Maybe the license of tuxedo is incorrect. Check whether the lic.txt under /home/tuxedo/Tuxedo 8.1/bealic has been overwritten, or check whether the TYPE= SDK in lic is correct, and the value of type is SDK.

Error 8: When compiling the ubbwinnt file, prompts “CMDTUX_TAT:868:ERROR :tmloadcf can not run on a non-master node”

Solution:

View the machine name in the ubbwinnt file, modify and recompile.

Error 9: When compiling the ubbwinnt file, prompts “CMDTUX_TAT:868:ERROR tmloadcf cannot run on an active node”

Solution:

Tmshutdown -y stop all services, and recompile.

Error 10: When the application starts and closes tmshutdown -y, reports “CMDTUX_CAT:764: ERROR: can’t attach to BB”

Solution:

Ipcrm, ipcs or restart the computer.

Error 11: When the application starts, prompts “CMDTUX_CAT:1685:ERROR:Application initialization failure”

Solution:

  • Check whether the server.ini file in the bin folder exists, whether its configuration is correct;
  • Check the oracle’s Whether related services are started;
  • Check if the ip address in ubbwinnt is correct;
  • bdmconfig is missing Times the same error.

Error 12: prompts “CMDTUX_CAT:816:ERROR:Connot exec, executable file not found” when the application starts up

Solution:

Check whether the executable file generated when the source file is compiled is missing in the bin folder. Also if the tuxconfig file is missing, it will also prompt a “GMDTUX_CAT:1360” error.

Error 13: “Application Initialization Error” when starting center or counter

Solution:

  • Check whether the BDE data source has settings, whether the settings are correct;
  • Check whether the configuration in setreg.reg is correct ;
  • Try another openfund.exe file.

 

Error 14: Client login failed, prompt “WTUXWS32.DLL not found, This application failed to start for this reason. Reinstalling the application may fix the problem”

Solution:

Check if the tuxedo patch has been installed, Check if the tuxedo runner path has been added to the path of the system environment variable. You can add the corresponding files that are prompted to be missing to “C:\WINDOWS\system32”.

Error 15: Use the new makefile file in 3.5, when compiling the background source file, an error is reported as shown below:

6f9bb6f7a97a4dff8d206d2d18cdfd01.png

Solution:

Check if the path in the .bash_profile file is the configured fbase path. Whether the fbase installation package upload is useful requires binary upload.

Error 16: When using the asar middleware, to compile the background source file, an error is reported as shown below:

be14e8d8eacc43e4ac80c60608a034fc.png

Solution:

Check if the fbase path is correctly configured in the .bash_profile file.

Error 17: When using the asar middleware, to compile the background source file, an error is reported as shown below:

f87e4693ec244c2ea6e85ab7c2137351.png

Solution:

json is not compiled successfully, Enter the json path to check whether the .lib folder is generated.

Error 18: The client login interface reports an error as shown below:

46e6df4fda8c40eabad5b7406a809a44.png

Solution:

Add F:\hs\fbase20\Fbase_win32\lib to the environment variable system variable path value; add F:\hs\fbase20\Fbase_win32\lib to the user variable lib value.

Error 19: Linux address settings

  1. View the network segment of this machine

[Solved] Python sqlite3.OperationalError: near “?“: syntax error

code

con = sqlite3.connect('db.sqlite3')
cur = con.cursor()
sql = 'SELECT id FROM ?WHERE source_id = ?'
cur.execute(sql, ('article_table', 41945,))
one = cur.fetchone()
con.close()

report errors

sqlite3.OperationalError: near "?": syntax error

reason

sqlite3 placeholder (?) Cannot be used for column or table names.
Placeholders are used to insert or retrieve values of data from the database in order to prevent SQL injection.

Solution:

con = sqlite3.connect('db.sqlite3')
cur = con.cursor()
sql = 'SELECT id FROM article_table WHERE source_id = ?'
cur.execute(sql, (41945,))
one = cur.fetchone()
con.close()

[Solved] TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:IllegalStateException: null

TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:IllegalStateException: null 

Solution:

select t1.citycode,count(distinct t1.cardno,t1.ndate) cnt,round(sum(t1.amount),2) amount from t2

inner join t1 on t1.cardno = t2.cardno

group by citycode

Execute the SQL commands above and report the following error:

SQL ERROR [500051] [HY000]: [Cloudera][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:IllegalStateException: null

Adjust the position of count(distinct t1.cardno,t1.ndate) and there will be no problem