Some time ago, when we encountered such a problem in development, we reported the following error when a service called B service:
error while extracting response for type [Java. Util. List & lt; java.util.Map< java.lang.String, java.lang.Object>& gt;] and content type [application/json; charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: Invalid JSON input: Cannot deserialize instance of java.util.ArrayList< java.util.Map< java.lang.String,java.lang.Object>& gt;
out of START_ OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of java.util.ArrayList< java.util.Map< java.lang.String,java.lang.Object>& gt;
out of START_ OBJECT token\n at [Source: (PushbackInputStream); Line: 1, column: 1]
the red arrow is the code for service a to call service B. at that time, I searched Baidu online for a long time, and most of them said that there was a configuration problem. However, combined with the configuration posted by online friends, and then compared with the configuration of our service, we found no problem in the configuration of our service, Finally, through continuous debugging test and troubleshooting, we can eliminate all possible causes of this kind of bug. Finally, we lock the target to the response of the red arrow in the second picture. At the beginning, response = apiresult.class is a fixed return JSON lattice that we encapsulate, At that time, I didn’t doubt that this problem was caused by the annotation of swarge, which should not affect the returned result. But later, I changed the returned result to * * response = list. Class * * and the problem was solved
![]( https://img-blog.csdnimg.cn/20210627145852589.png?x-oss-process=image/watermark ,type_ ZmFuZ3poZW5naGVpdGk,shadow_ 10,text_ aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzQyMzYzNTA2,size_ 16,color_ FFFFFF,t_ 70
Tag Archives: bug
Uncaught ReferenceError: FileAsyncWriter is not defined
Question: problem:
Uncaught ReferenceError: FileAsyncWriter Writer is not defined
at Object.writelog (dScript_main_main_print_open-equipm.flow_main_cover-open carcarcarcarcarcarcarcards.js:34)
at E.that.that.ecolsMemberberFFunc (dScript_main_main_cover-up-against-openequiequiequiequiequiequiequipmor.flow_flow_print_open open open-reading carcarcarcarcarcarcarcards.js:81s:81)
at E.Z.ExecuteteScriptteScript Func (yhecols.js.js.js:js:1)
at E.DevicesEvent (yhecols.js:1)
at s.DispathEvent (yhecols.js:1)
at Y.UrlLoadCompelete (yhecols.js:1)
at yhecols.js:1
at yhecols.js:1
solution:
Add equipment YHFileAsyncWriter
BUG——Could not resolve placeholder ‘xxx‘ in value ‘${xxx}‘
report errors
1、Error creating bean with name ‘xxx’: Injection of autowired dependencies failed
2、Could not resolve placeholder ‘xxx’ in value ‘${xxx}’
3、Failed to load applicationcontext
Guess
Guess 1: no configuration in YML
guess 2: duplicate or conflicting configuration names, such as my EML
guess 3: no @ component is added to the entity class
guess 4: redundant symbols appear in YML, such as spaces
oneself
User defined EML reports an error, but PNG does not report an error. It is speculated that PNG has affected the EML below. Change “\” to “\ \”, and the EML will run normally (when copying the path to YML, double slash will be automatically changed to single slash, which means single slash is OK, but not expected…).
Original——
custom:
path:
png: C:\Users\Administrator\Desktop\AutoMail\png\
eml: C:\Users\Administrator\Desktop\AutoMail\eml\
xls: C:\Users\Administrator\Desktop\AutoMail\xls\
Now——
custom:
path:
png: C:\\Users\\Administrator\\Desktop\\AutoMail\\png\\
eml: C:\\Users\\Administrator\\Desktop\\AutoMail\\eml\\
xls: C:\\Users\\Administrator\\Desktop\\AutoMail\\xls\\
pyvista error: root:GLEW could Missing GL version settlement method
Project scenario:
Windows10 + python3.6 + pyvista0.31.3
Problem Description:
Problem Description: after upgrading the windows system, a strange error suddenly appeared in the well run code about pyvista visualization ply file some time ago:
ERROR:root:GLEW could not be initialized: Missing GL version
Cause analysis:
After upgrading windows, some things have been added to the environment variable path, resulting in the environment variable being too long, exceeding the maximum length of 1023 characters, and the following environment variables have been truncated.
Solution:
Find a way to shorten the path of the environment variable, delete some paths that are not used very much, or use RapidEE environment variable editing tool to optimize
ValueError: check_ hostname requires server_ The solution record of the host name
Error: valueerror: check when installing scikit image library with PIP_ hostname requires server_ hostname
Valueerror: check_ hostname requires server_ Hostname is usually due to version conflict and other reasons. After looking up the experience of many big men on the Internet, we finally find that the problem is caused by the network agent, which is commonly known as the VPN problem.
After the VPN is turned off, the problem is solved, and the scikit image library is successfully installed!
Error: the solution of “241” and “343” in program
When encountering the error: strain ‘,’241’,’343 ‘in program
An error is a compilation error in C/C + +.
The error refers to the source program has illegal characters, illegal characters need to be removed. Generally, the coder uses Chinese input method or directly copies and pastes the code from other places. Chinese space, Chinese quotation marks and various Chinese punctuation marks appear in the code.
Solution:
open the error file in Notepad and save it in ANSI format. You can see that some unrecognized characters become garbled.
1. Delete the space in the wrong line and the space before and after it, and try again
2. Change the color that is obviously different from other punctuation marks( Most compilers have color recognition)
3. If the code is relatively short, it is recommended to re type it all
Solution to javax.naming.noinitialcontextexception error
When using DBCP to configure data sources, a test class was written. In the test class, DBCP was called to get the database connection error: javax.naming.NoInitialContextException: Need to specify class name in environment or or in,
Check whether the dependent jar package is imported:
commons-dbcp2-2.8.0. Jar
commons-pool2-2.10.0. Jar
mysql8.0 jar package
mysql5.0 jar package
Test code:
package test;
import org.junit.Test;
import tools.DataSourceUtil;
import java.sql.Connection;
public class test {
@Test
public void test(){
Connection connection = DataSourceUtil.getConnection();
System.out.println(connection);
}
}
Database source code:
package tools;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;
public class DataSourceUtil {
// Get the connection
public static Connection getConnection() {
// ctrl + alt + t --- select 6
// instantiate the object of the initial context
Connection connection = null;
try {
InitialContext initialContext = new InitialContext();
// Get the data in the configuration and get the object object
Object lookup = initialContext.lookup("java:comp/env/jdbc/easybuy");
// unboxing strong turn to get the connection pool
DataSource ds = (DataSource) lookup;
// get the connection pool to give me a connection
connection = ds.getConnection();
} catch (NamingException e) {
e.printStackTrace();
} catch (SQLException throwables) {
throwables.printStackTrace();
}
// Return to link
return connection;
}
// close connection
public static void closeConnection(Connection connection) {
if (connection != null) {
try {
connection.close();
} catch (SQLException throwables) {
throwables.printStackTrace();
}
}
}
}
Bug map:
reason:
When DBCP is used to connect to the database, the main function is always used to test. The initialcontext is only available in the context of the web application server. While the configuration file is in the web directory, it is obvious that if initialcontext wants to access the configuration file, it must run on the web server to connect to the database and get the connection object
It can’t be tested directly with the main function, it can only be displayed in Tomcat or servlet or JSP
Running results:
#Successfully get the connection object!
For the problem of rejecting old usage errors after numpy is updated, modified in numpy 1.20; for more details and guidance
There’s something wrong with numpy
Because the latest version of numpy is updated today, the previous usage is invalid
So You need to use the latest usage
Originally, my return value is like this
return np.array(df).astype(np.float)
Error:
DeprecationWarning:
np.float
is a deprecated alias for the builtin
float
. To silence this warning, usefloat
by itself. Doing this
will not modify any behavior and is safe. If you specifically wanted
the numpy scalar type, usenp.float64
here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
return np.array(df).astype(np.float)
It seems to be because of the version of the problem
If you look at the picture
Modify to the following can be.
return np.array(df, dtype=float)
perhaps
return np.array(df).astype(np.float64)
So you won’t make a mistake
java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
Bad writing
The cause of the bug:
in the service layer, the value passed in by the public list findbyproperty (string propertyname, object value) {}
method service of Dao layer is a value of string type, so an error is reported;
Modification:
rewrite the object type of Dao layer to string type to fix the bug.
org.springframework.beans.factory.UnsatisfiedDependencyException
Phenomenon service failed to start
the following error log
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/D:/IT/maven/repository/io/springfox/springfox-spring-web/2.7.0/springfox-spring-web-2.7.0.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping. Cannot map 'adminCompanyController' method
public java.lang.Object com.qqwl.gold.controller.AdminCompanyController.setExcellent(java.lang.Integer,java.lang.Integer)
to {POST /admin/jyCompany/setType}: There is already 'adminCompanyController' bean method
public java.lang.Object com.qqwl.gold.controller.AdminCompanyController.setType(java.lang.Integer,java.lang.Integer) mapped.
Cause analysis: the mapping path with the same name leads to
java.lang.Throwable: Substituted for the exception com.bea.xml.SchemaTypeLoaderException which lack
Weblogic error message:
<Error> <Console> <AdminServer> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <webuser> <> <> <1624366734323> <BEA-240003> <Administration Console encountered the following error: weblogic.management.provider.UpdateException: [Management:141191]The prepare phase of the configuration update failed with an exception.
at weblogic.management.provider.internal.RuntimeAccessDeploymentReceiverService.updateDeploymentContext(RuntimeAccessDeploymentReceiverService.java:777)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doUpdateDeploymentContextCallback(DeploymentReceiverCallbackDeliverer.java:147)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.updateDeploymentContext(DeploymentReceiverCallbackDeliverer.java:28)
at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.callDeploymentReceivers(ReceivedPrepare.java:203)
at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.handlePrepare(ReceivedPrepare.java:112)
at weblogic.deploy.service.internal.statemachines.targetserver.ReceivedPrepare.receivedPrepare(ReceivedPrepare.java:52)
at weblogic.deploy.service.internal.targetserver.TargetRequestImpl.run(TargetRequestImpl.java:211)
at weblogic.deploy.service.internal.transport.CommonMessageReceiver$1.run(CommonMessageReceiver.java:457)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:553)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
Caused by: java.lang.Throwable: Substituted for the exception com.bea.xml.SchemaTypeLoaderException which lacks a String contructor, original message - XML-BEANS compiled schema: Could not locate compiled schema resource schemacom_bea_xml/system/s0BC706AE0F5CDA9F4183EB0C5C434EEA/keystores8f60elemtype.xsb (schemacom_bea_xml.system.s0BC706AE0F5CDA9F4183EB0C5C434EEA.keystores8f60elemtype) - code 0
at com.bea.xbean.schema.SchemaTypeSystemImpl$XsbReader.<init>(SchemaTypeSystemImpl.java:1519)
at com.bea.xbean.schema.SchemaTypeSystemImpl.resolveHandle(SchemaTypeSystemImpl.java:3505)
at com.bea.xml.SchemaComponent$Ref.getComponent(SchemaComponent.java:113)
at com.bea.xml.SchemaType$Ref.get(SchemaType.java:872)
at com.bea.xbean.schema.SchemaParticleImpl.getType(SchemaParticleImpl.java:194)
at com.bea.xbean.validator.Validator.beginEvent(Validator.java:389)
at com.bea.xbean.validator.Validator.nextEvent(Validator.java:241)
at com.bea.xbean.validator.ValidatingXMLStreamReader.validate_event(ValidatingXMLStreamReader.java:581)
at com.bea.xbean.validator.ValidatingXMLStreamReader.next(ValidatingXMLStreamReader.java:546)
at com.bea.xbean.richParser.XMLStreamReaderExtImpl.next(XMLStreamReaderExtImpl.java:1122)
at com.bea.staxb.runtime.internal.MarshalStreamUtils.advanceToNextStartElement(MarshalStreamUtils.java:120)
at com.bea.staxb.runtime.internal.UnmarshalResult.advanceToNextStartElement(UnmarshalResult.java:830)
at com.bea.staxb.runtime.internal.ByNameUnmarshaller.deserializeContents(ByNameUnmarshaller.java:57)
at com.bea.staxb.runtime.internal.AttributeUnmarshaller.unmarshalIntoIntermediary(AttributeUnmarshaller.java:47)
at com.bea.staxb.runtime.internal.LiteralUnmarshalResult.unmarshalElementProperty(LiteralUnmarshalResult.java:184)
at com.bea.staxb.runtime.internal.LiteralUnmarshalResult.extractAndFillElementProp(LiteralUnmarshalResult.java:156)
at com.bea.staxb.runtime.internal.ByNameUnmarshaller.deserializeContents(ByNameUnmarshaller.java:67)
at com.bea.staxb.runtime.internal.AttributeUnmarshaller.unmarshalIntoIntermediary(AttributeUnmarshaller.java:47)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalBindingType(UnmarshalResult.java:199)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:169)
at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:67)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:150)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:327)
at weblogic.management.provider.internal.RuntimeAccessDeploymentReceiverService.handleConfigTreeLoad(RuntimeAccessDeploymentReceiverService.java:1092)
at weblogic.management.provider.internal.RuntimeAccessDeploymentReceiverService.updateDeploymentContext(RuntimeAccessDeploymentReceiverService.java:697)
>
Because SSL is configured in Weblogic, an error is reported during activation. There is a cluster in the project, and this error occurs,
solve:
Stop the server services corresponding to other cluster nodes, and then modify and activate them. At this time, the changes can be activated normally.
If one node is configured in the cluster, other nodes need to be configured.
[Solved] Uncaught ReferenceError: FileAsyncWriter is not defined
Question: problem:
Uncaught ReferenceError: FileAsyncWriter Writer is not defined
at Object.writelog (dScript_main_main_print_open-equipm.flow_main_cover-open carcarcarcarcarcarcarcards.js:34)
at E.that.that.ecolsMemberberFFunc (dScript_main_main_cover-up-against-openequiequiequiequiequiequiequipmor.flow_flow_print_open open open-reading carcarcarcarcarcarcarcards.js:81s:81)
at E.Z.ExecuteteScriptteScript Func (yhecols.js.js.js:js:1) at E.Z.ExecuteFunc2 (yhecols.js:1)
at E.DevicesEvent (yhecols.js:1)
at s.DispathEvent (yhecols.js:1)
at Y.UrlLoadCompelete (yhecols.js:1)
at yhecols.js:1
Solution:
Adding Devices YHFileAsyncWriter