Category Archives: Error

[Solved] MATLAB/SIMULINK Generate Codes Error: change the default character encoding setting

SIMULINK click to generate C code to report an error
Error message:
Error encountered while executing PostCodeGenCommand for model ‘RTW_sc3’: Close all block diagrams (using ‘bdclose all’) before trying to change the default character encoding setting
Caused by:
Close all block diagrams (using ‘bdclose all’) before trying to change the default character encoding setting

reason:
Caused by not setting the default encoding

 

Solution:


Add these two sentences in the initialization:

currentCharacterEncoding = slCharacterEncoding();
slCharacterEncoding('Windows-1252');

[Solved] Rabbitmq startup Error: FAILED – check /var/log/rabbitmq/startup_{log, _err}

Report an error:
Starting rabbitmq-server: FAILED – check /var/log/rabbitmq/startup_{log, _err}
This way
Check the startup_log:
ERROR: epmd error for host 192: badarg (unknown POSIX error)
like this

Solution:
1. Turn off SELINUX:
Enter the command: vi /etc/selinux/config
Modify: SELINUX=disabled
2. Enter the command: vi /etc/rabbitmq/rabbitmq-env.conf
Add a line: NODENAME=rabbit@localhost
Start again successfully.
Enter the command: service rabbitmq-server start

[Solved] Mvel user-defined function error: duplicate function

The mvel custom expression repeats and reports an error: duplicate function

Reason: the function will be cached during the first call, and the function will be prompted to repeat when calling again

Scheme: put funciton into the cache first, and call the function in the declaration cache directly when calling again

The user-defined function name should not be the same as the parameter name

Example code:

@RunWith(SpringRunner.class)
@SpringBootTest
public class MvelTest {
        
    @Test
    public void evalTest(){
        String roundup = "def roundup(num) { roundnum = null; if(num != null){ int roundnum = Math.round(num); } return roundnum; }";
        VariableResolverFactory functionFactory = new MapVariableResolverFactory();
        MVEL.eval(roundup, functionFactory);

        VariableResolverFactory resolverFactory = new MapVariableResolverFactory();
        resolverFactory.setNextFactory(functionFactory);
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("A", new BigDecimal(2.33));
        map.put("B", new BigDecimal(4));
        String exp = "roundup(A*B)";
        System.out.println(MVEL.eval(exp, map, resolverFactory));

        System.out.println("------------");

        VariableResolverFactory resolverFactory2 = new MapVariableResolverFactory();
        resolverFactory2.setNextFactory(functionFactory);
        Map<String, Object> map2 = new HashMap<String, Object>();
        map2.put("A", new BigDecimal(3.33));
        map2.put("B", new BigDecimal(2));
        System.out.println(MVEL.eval(exp, map2, resolverFactory2));
    }
}

Error code example

Add the roundup function to the cache

Successful first execution

Call again and add the roundup function to the cache again

A function in variableresolverfactory threw an exception

[Solved] axios Configurate baseURL Error: Uncaught TypeError: Cannot set properties of undefined (setting ‘baseURL’)

Problem: the Axios configuration baseurl reported an error

Solution:

Reinstall the old version of Axios

npm i [email protected] -S

OVER~

After checking, it is determined that there is no problem with the writing method, and clearing the cache is invalid.

I thought of upgrading my browser two days ago, so I changed my browser, but I still reported an error.

Uninstallation reinstallation is invalid.

npm i axios -S

NPM I Axios installs the latest version by default

So back to the previous version

I searched the information for a long time and didn’t find why I reported an error. Let’s continue the development first~

Quartz Error: qrtz_locks doesn’t exist [How to Solve]

Problem Description: qrtz_locks doesn’t exist

Quartz supports data persistence, so if autowire is assembled automatically, create org springframework. scheduling. quartz. The schedulerfactorybean will automatically inject the database datasource into the database, so that quartz will report an error because it thinks it will persist the data.

Solution: whether spring’s default autowire is set to “autodetect” or “byname”, a * QRTZ_LOCKS’ doesn’t exist

Method 1: do not use the default autowire attribute;

Method 2: set autowire = “no” to schedulerfactorybean without changing the spring default autowire attribute.

<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean" autowire="no">
    <property name="triggers">
        <list>
            <ref bean="simpleTriggerBean" />
        </list>
    </property>
</bean>

Normally, it will display org quartz.core.Quartzscheduler runs locally, uses memory, and does not support persistence.

Task :app:lintVitalRelease FAILED [How to Solve]

Task :app:lintVitalRelease FAILED

Error message:
task: app: lintvitalrelease failed

Cause of problem:
dl google. Com can’t connect, or there is a problem with the code. I can’t go to this to see the log myself

Solution:

1. Modify hosts (recommended)
find the ip of dl.google.com through the ip-check-online website

2. Add in gradle Android

android{
  lintOptions{
     checkReleaseBuilds false
     abortOnError false
  }
}

[Solved] Spring Boot Startup Error: DataSourceProperties$DataSourceBeanCreationException

Error message:

Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver

Reason of error :

The @Configuration annotation injects a dataSource bean into spring. Because there is no configuration information related to dataSource in the project, when spring creates a dataSource bean, an error will be reported due to lack of relevant information.

 

Solution :

Add a condition @SpringBootApplication(exclude = {DataSourceAutoConfiguration. class}) to the annotation on the startup boot class of Spring boot to prevent Spring boot from automatically injecting dataSource

[Solved] VSCode Click to Start Debug Error: “The Language Support for Java server crashed”

Because vscode is often in the unused state, there are some problems when starting. The following errors will be prompted

The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted

The java.jdt.ls.vmargs field in the previous setting.json is filled in casually. An error message will appear during runtime. Click on it to check the log, and you can see that the error statement is in the line where you just filled it out, because The path cannot be found and the server crashes.

Solution: Re-assign the “java.jdt.ls.vmargs” field to: “-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication”. Then reopen vscode or reload window in Ctrl+Alt+P.

[Solved] Origin parameter: http://localhost:8081/actuator/hystrix.stream is not in the allowed list of proxy

Use the hystrix dashboard to monitor errors

Error 1

Origin parameter: http://localhost:8081/actuator/hystrix.stream is not in the allowed list of proxy host names.
If it should be allowed add it to hystrix.dashboard.proxyStreamAllowList.

Because the proxy address is not configured.

Solution: add the following configuration in the application

hystrix:
  dashboard:
    proxy-stream-allow-list: "localhost"

Error report 2

Solution: Expose hystrix Stream endpoint

management:
  endpoints:
    web:
      exposure:
        include: hystrix.stream