Category Archives: Error

[Solved] wpf Prism Error: Error CS0234 type or namespace name ‘dryioc’ does not exist

Error cs0234 type or namespace name ‘dryioc’ (missing assembly reference?) does not exist in namespace ‘test.Prism’

Source of the problem: the folder named “prism” cannot appear in the project. The folder containing c# code (txt and so on do not seem to cause this problem) has a higher priority, resulting in some wrong positioning of things.

Solution: rename the prism folder.

Problem recurrence steps: create a new folder named prism for the project and add a Class1 CS file, run
in the official sample, because the project uses the simplest demo and only uses the custom adapter, the official sample will not report an error.

Note: I can run normally after deleting the red part, and then paste the red part back for several times. It causes me to cancel the automatic replenishment before each subsequent startup to continue the operation.

Maven Package Error: [Warning] The Pom for xxx is missing , no dependency inform

When creating a multi-module project using maven

Error reported when packaging for service_edu
[WARNING] The POM for com.mxc:wa-service:jar:1.0-SNAPSHOT is missing, no dependency information available
Solve the problem by executing install on the parent service module, and then you can package the service_edu

at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264) [How to Solve]

Reason:

Graphic verification codes need to be used in the project. There is no problem with local use. The following problems occur when deployed online:

java.lang.NullPointerException: null
        at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
        at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
        at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
        at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
        at sun.font.SunFontManager$2.run(SunFontManager.java:431)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.font.SunFontManager.<init>(SunFontManager.java:376)
        at sun.awt.FcFontManager.<init>(FcFontManager.java:35)
        at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at java.lang.Class.newInstance(Class.java:442)
        at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)

The main reason is the font problem. The modification scheme is as follows:

You only need to add the following item in the docker deployment file of the project:

RUN apk add –update ttf-dejavu fontconfig

The configuration file after adding is as follows:

FROM openjdk:8-jdk-alpine
VOLUME /tmp
ADD xx.jar app.jar
RUN apk add --update ttf-dejavu fontconfig
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]

[Solved] CDP7.1.7 Install hive on tez Error: Can’t create directory /mnt/ssd/yarn/nm/usercache/urika/appcache/application_1424508393097_0004 – Permission denied

1. overview

The compatibility of hive and hive on tez of CDP is not good enough. Normal installation will report various errors. For example, after installing hive, installing hive on tez will report an error: can’t create directory/MNT/SSD/yarn/nm/usercache/urika/appcache/application_1424508393097_0004 – Permission denied.

2. Cause analysis

It is suspected that hive has created the directory, but hive # on tez creates the file when using it, resulting in inconsistent user permissions.

3. Solution

The earliest solutions came from:

https://community.cloudera.com/t5/Support-Questions/Can-t-create-directory-yarn-nm-usercache-urika-appcache/td-p/24891

Delete the hive on tez server with hiveserver2, change the directory, and then restart it.

[Solved] Hadoop3 Install Error: there is no HDFS_NAMENODE_USER defined. Aborting operation.

When executing the official documentation installation guide, enter the command:
sbin/start-dfs.sh
Error: there is no HDFS_NAMENODE_USER defined. Aborting operation.

According to the error message, we found that HDFS_NAMENODE_USER and HDFS_DATANODE_USER are not defined
Solution:
Add the following codes in sbin/start-dfs:

HDFS_DATANODE_USER=root
HADOOP_SECURE_DN_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root

[Solved] react Project Error: Support for the experimental syntax ‘decorators-legacy’ isn’t currently enabled

The write method of high-level component decorator is used in react project, and then the project reports an error. The information is as follows:

Support for the experimental syntax ‘decorators-legacy’ isn’t currently enabled

 

Solution:

1. Install Babel plugin transform decorators legacy

yarn add babel-plugin-transform-decorators-legacy

2. Modify the configuration file, package Add the following code to JSON:

"plugins": [

["@babel/plugin-proposal-decorators", { "legacy": true }]],

Package There is no Babel configuration in JSON, which needs to be executed

yarn eject

Display the configuration of react script that is not displayed in package JSON

If the console reports an error after execution, the solution is to submit the local modification and execute

git add
git commit -m ''

Then execute the yarn eject

3. Install Babel plugin transform decorators legacy

4. Modify package Babel in JSON

"babel": {

"plugins": [

["@babel/plugin-proposal-decorators", { "legacy": true }]

],

"presets": [

"react-app"

]}

Vue + Django Project-Browser cross-domain error: Access-Control-Allow-Origin

Browser error reporting

Check the front end and check the error information as follows

Access to XMLHttpRequest at ‘ http://127.0.0.1:8000/categorys/ ‘ from origin ‘ http://localhost:8080 ‘ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

Solve cross domain problems through the back end

Refer to the solution on GitHub

Search Django CORS headers to see

1. Installing in a virtual environment

python -m pip install django-cors-headers

2. Configure settings

INSTALLED_APPS = [
    ...,
    "corsheaders",
    ...,
]


MIDDLEWARE = [
    ...,
    "corsheaders.middleware.CorsMiddleware",
    "django.middleware.common.CommonMiddleware",
    ...,
]
# CorsMiddleware should be prior to CommonMiddleware

CORS_ALLOW_ALL_ORIGINS=True

After restarting the project, the browser will no longer report cross-domain errors

C# String was not recognized as a valid DateTime [How to Solve]

Error reason: because the date string cannot be converted normally.

Resolution code:

class Program
    {
        static void Main(string[] args)
        {

            //1, the correct way to write (without the symbols of the date string to convert the common date format, formatDate output results are: 2021-10-11)
            IFormatProvider ifp = new CultureInfo("zh-CN", true);
            string formatDate = DateTime.ParseExact("20211011", "yyyyMMdd", ifp).ToString("yyyy-MM-dd");

            Console.WriteLine(formatDate);
            Console.ReadKey();
        }
    }

[Solved] Symbol HardFault_Handler multiply defined (by context_rvds.o and stm32f10x_it.o)

The error means: In the context_rvds.c and stm32f10x_it.c files, HardFault_Handler has a duplicate definition

In the context_rvds.c and stm32f10x_it.c files, PendSV_Handler has repeated definitions

Search HardFault_Handler, the results are as follows

My project is under the C drive, the search is a full project search, the search results should not have D drive! ! !

Find the problem and find it as follows

Adding rtos to the project leads to repeated definitions of HardFault_Handler and PendSV_Handler! ! !

Remove the rtos kernel check box or comment out the HardFault_Handler and PendSV_Handler functions in the stm32f10x_it.c file, compile again, and the problem is solved.