Category Archives: Error

[Download Files Error] HttpMessageNotWritableException IllegalStateException: COMPLETED

When you click to download a file, the error prompt is mainly reported. You can still download it, but since an error is thrown, go to find it. Finally, I found an error in the operation…

org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver : Failure while trying to resolve exception [org.springframework.http.converter.HttpMessageNotWritableException]
java.lang.IllegalStateException: COMPLETED
......
org.eclipse.jetty.server.HttpChannel : /file-api/downloadFile
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class com..filepreview.entity.DataPackage] with preset Content-Type 'application/x-msdownload;charset=utf-8'
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[spring-webmvc-5.3.3.jar:5.3.3]
......
org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class com..filepreview.entity.DataPackage] with preset Content-Type 'application/x-msdownload;charset=utf-8'

See the main tips:

Request processing failed; The nested exception is org.springframework.http.converter.httpmessagenotwritableexception: there is no converter for [class com. Filepreview. Entity. Datapackage] whose default content type is “applicationx msdownload”; Character set = UTF-8 ‘

So I see the keyword: datapackage, which is the encapsulated data return

The download file I thought of was actually a stream transmission, so I deleted this package and changed the method to void type

Abnormal output:

Normal after modification:

[Solved] java.lang.IllegalStateException: Failed to introspect Class xxxx

java.lang.IllegalStateException: Failed to introspect Class [com.central.es.config.RestAutoConfigure] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:481)
	at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:358)
	at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:414)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$2(AbstractAutowireCapableBeanFactory.java:742)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:741)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:680)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:648)
	at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1614)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:523)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:495)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:620)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:612)
	at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1243)
	at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:869)
	at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:857)
	at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:844)
	at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:795)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
	at com.central.MallCenterServer.main(MallCenterServer.java:29)
Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/client/RestClientBuilder
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.getDeclaredMethods(Class.java:1975)
	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463)
	... 21 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.elasticsearch.client.RestClientBuilder
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 25 common frames omitted

The corresponding dependent scope in POM is test. Just change it to compile

Git Clone Error: gnutls_handshake() failed: Decryption has failed [How to Solve]

The system is Ubuntu (kylin) 20.04 and git version 2.25.

Clone error

The following error is reported when the GIT clone the warehouse on the GitHub,

fatal: cannot access' https://github.com/xxx/yyy.git ': gnutls_handshake() failed: Decryption has failed.

Repeated many times.

Simple try

Most of the failures of GIT clone are network problems, especially when using GitHub.

First try the proxy, http_ proxy,https_ Proxy, GIT config, http.proxy and other commonly used methods have been tried, and even the hack method of proxychains has been tried, but the results are not good. Instant confidence is gone.

Things are different this time.

 

Recompile

There are two methods to recompile. One is to use the script provided by the boss [1]. The second is to use the source code in apt to compile and package DEB by myself. I refer to [2] [3] two tutorials. The general method is

1. Open source

2. Get the source code apt source git , and modify libcurl4 gnutls dev in Debian/control file to libcurl4 OpenSSL dev.

3. Install the compilation environment, sudo apt get build dep git

4. Compile dpkg buildpackage - B, after a long compilation and a complete set of tests, several Debs are finally packaged. (there are still a few mistakes, regardless)

5. Install the packaged DEB, dpkg - I Git_xxx.deb

Finally, it’s done. Git clone is very slow, but no decryption error is reported. The proxy is set successfully. The last step, apt mark hold git, prevents git from being automatically updated. That’s it.

Postscript

The specific cause of the error has not been thoroughly studied, and it looks more complex. Therefore, a workaround was taken and recorded here. Thank all the original authors.

First update

1. It has been verified that git in livecd (Ubuntu kylin 20.04 Pro) still has this bug. In Galaxy Kirin V10 Sp1 livecd, the installed git also has this bug

2. The GIT of desktop (Intel processor) virtual machine and livecd is normal, so it is suspected that it is a hardware problem

3. Gitee does not have this problem

It is speculated that it is a hardware problem, or even a problem with the CPU instruction set. The bottom layer of TLS uses AES algorithm, and there are related instruction sets in CPU. Gitee has no problem, probably because it uses TLS 1.2 and GitHub is TLS 1.3.

[Solved] IOException during persisting of HostData OPatchAuto failed

Execute the application patch and report the following error

[root@cqzldb1 software]# opatchauto apply /software/33248471/33182768/ -analyze

OPatchauto session is initiated at Mon Nov 29 17:49:04 2021

System initialization log file is /u01/app/19.0.0/grid/product/crs_1/cfgtoollogs/opatchautodb/systemconfig2021-11-29_05-49-06PM.log.

Session log file is /u01/app/19.0.0/grid/product/crs_1/cfgtoollogs/opatchauto/opatchauto2021-11-29_05-49-44PM.log
IOException during persisting of HostData object on localhost
oracle.dbsysmodel.driver.sdk.productdriver.ProductDriverException: IOException during persisting of HostData OPatchAuto failed.

OPatchauto session completed at Mon Nov 29 17:49:45 2021
Time taken to complete the session 0 minute, 41 seconds

 opatchauto failed with error code 42

View opatch directory permissions

[grid@cqzldb1 ~]$ cd $ORACLE_HOME
[grid@cqzldb1 crs_1]$ ll
total 108
drwxr-xr-x  3 root   root        22 Nov 29 14:26 acfs
drwxr-xr-x  3 grid   oinstall    18 Nov 29 14:23 acfsccm
drwxr-xr-x  3 grid   oinstall    18 Nov 29 14:23 acfsccreg
drwxr-xr-x  3 grid   oinstall    18 Nov 29 14:23 acfscm
drwxr-xr-x  3 grid   oinstall    18 Nov 29 14:23 acfsiob
drwxr-xr-x  3 grid   oinstall    18 Nov 29 14:23 acfsrd
drwxr-xr-x  3 grid   oinstall    18 Nov 29 14:23 acfsrm
drwxr-xr-x  2 grid   oinstall   102 Nov 29 14:20 addnode
drwxr-xr-x  3 grid   oinstall    18 Nov 29 14:23 advmccb
drwxr-xr-x 10 grid   oinstall   106 Nov 29 14:48 assistants
drwxrwxrwt  6 root   oinstall    52 Nov 29 14:23 auth
drwxr-xr-x  2 root   oinstall 12288 Nov 29 14:32 bin
drwxrwxr-x  4 grid   oinstall    38 Nov 29 14:23 cdata
drwxr-x---  3 grid   oinstall    18 Nov 29 14:23 cdp
drwxrwxr-x  8 oracle oinstall  4096 Nov 29 17:49 cfgtoollogs


Reauthorize the directory

chown grid:oinstall -R OPatch

[Solved] string(81) “SQLSTATE[HY000]: General error: 1364 Field ‘content’ doesn’t have a default value”

reason

MySQL stipulates that default values are not allowed for blob, text, geometry and JSON data types. In this example, the content field is not set with a default value. After analysis, it is determined whether it is the reason for not null, so the content field is set to null

Solution:

Delete not null in the table creation statement

Error: Can’t walk dependency graph: Cannot find module ‘@popperjs/core’ from ‘node_modules\bootstrap\dist\js\bootstrap.esm.js’

Error: Can’t walk dependency graph: Cannot find module ‘@popperjs/core’ from ‘node_modules\bootstrap\dist\js\bootstrap.esm.js’

required by D:\pangu\bpmn-js\bpm_editor\node_modules\bootstrap\dist\js\bootstrap.esm.js

When using webpack to package bootstrap 4 and 5, you need to install popper.js manually

npm install @popperjs/core -D

Shell script error: Exec format error [How to Solve]

Question:

The script reports an error as follows

Nov 29 18:18:58 db53 systemd: Failed at step EXEC spawning /etc/rc.d/init.d/realserver: Exec format error
Nov 29 18:18:58 db53 systemd: realserver.service: control process exited, code=exited status=203
Nov 29 18:18:58 db53 systemd: Failed to start (null).
Nov 29 18:18:58 db53 systemd: Unit realserver.service entered failed state.
Nov 29 18:18:58 db53 systemd: realserver.service failed.

Solution:

Add at the beginning

#!/bin/sh

Microsoft. Ace. OLEDB. 12.0 error reporting solution

Reference @ “provider = Microsoft. Ace. OLEDB. 12.0; data source =” + Sourcefile + “;”;

When the server reports this error: the ‘Microsoft. Ace. OLEDB. 12.0’ provider is not registered on the local machine

Solution: OLEDB does not support 64 bits. The server should install 32 bits instead of 64 bits https://www.microsoft.com/en-us/download/confirmation.aspx?id=13255

NPM Error: npm ERR! 426 Upgrade Required [How to Solve]

Today, NPM sent a packet and reported error e426.

npm ERR! code E426
npm ERR! 426 Upgrade Required - PUT http://registry.npmjs.org/formats_date

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2021-11-25T06_55_02_155Z-debug.log
error Command failed with exit code 1.

NPM is upgraded to tls1.2.TLS 1.1\1.0 is not accepted.

Various attempts still report errors. Various searches have finally found the reason. HTTPS needs to be used when modifying the image

npm config set registry=https://registry.npmjs.org