Category Archives: How to Fix

Error installing OS X virtual machine vcu-0: verify vmcore / VM / main / physmem_ monitor.c:1123

Create a new virtual machine, select Apple MacOS X 10.10 as the operating system of the client, and other parameters can be set by default.

Pay attention not to rush to open the client after it is built, because if you open it directly, you will find that the new client will not start.

Read Mac OS X Unlocker for VMware v2.0 readme.txt You will find the answer. The default OSX client set up by VMware 11 will crash directly. There are two solutions:

Replace VM with HW 10

Or edit VMX file and add smc.version = 0 

Go to the client’s installation directory and open the VMX file. For example, if your client’s name is OSX, this file is OSX.vmx ,

You will see an SMC parameter:

smc.present = “TRUE”

hold smc.version =0 load the line after this parameter, save and exit. Restart the client and found it started normally.

Please specify which branch you want to merge with

$git pull

 

$ git pull
warning: no common commits
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
From github.com:nonfuxinyang/android-study
 * [new branch]      master     -> origin/master
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master

Seeing the second tip, we now know a solution. That is to specify the link relationship between the current working directory, working branch, and remote warehouse and branch. ≪ BR & gt;

for example, we set the master branch corresponding to the remote warehouse

git branch — set upstream master origin / Master

so every time we want to push or pull, we just need to enter Git push or git pull.

Before that, we have to specify the remote branch that we want to push or pull.

git push origin master

git pull origin master.

 

 

 

 

Solve the problem of error: cannot pass objects of non trivially copyable type ‘STD:: String’ in C / C + +

catalog

1. Problem description 2. Cause analysis 3. Solution

1. Problem description

When running the program, the compiler reports an error:

error: cannot pass objects of non-trivially-copyable type ‘std::string {aka struct std::basic_ string}’ through ‘…’ |

2. Cause analysis

The error is displayed on this line:

printf("%c %s %lld %lld\n", p, edges, ver, edge);

Where edges is of string type.

Grammar:

const char *c_ str();c_ Str() function returns a pointer to a normal C string, the content of which is the same as that of this string string. In order to be compatible with C, there is no string type in C, so it must pass the member function C of string class object_ Str () converts a string object to a string style in C.

3. Solutions

In use, add C_ str();

printf("%c %s %lld %lld\n", p, edges.c_str(), ver, edge);

[oh-my-zsh] Insecure completion-dependent directories detected

Question content:

[oh-my-zsh] Insecure completion-dependent directories detected:
drwxrwxr-x  3 st  admin   96 11 26 09:08 /usr/local/share/zsh
drwxrwxr-x  4 st  admin  128 11 26 10:16 /usr/local/share/zsh/site-functions

[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.

[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh]     compaudit | xargs chmod g-w,o-w

[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.

It is necessary to add Zsh through content expression_ DISABLE_ Compfix = “true” in front of the contents of the zshrc file

Operation steps:

vim ~/.zshrc

File addition

ZSH_DISABLE_COMPFIX="true"

Execute the command after saving the file

source ~/.zshrc

Completion o ( ̄ ▽  ̄) d ✨✨✨

Matlab prompt error

Enter the following code
(1)

a = [1 2;3 4];
a(6) = 7;

Prompt:
attempt to grow array along ambiguous dimension.
in Chinese:
attempt to grow large array along fuzzy dimension

The following codes are correct
(2)

a = [1 2;3 4];
a(5, 8) = 7;

Why is it that code (1) is wrong and code (2) is at a loss when it exceeds the predefined matrix size?

The cause of the problem is as indicated in the prompt

, the program cannot determine the dimension of the matrix.
What do you mean?
Although the code segment (2) exceeds the predefined matrix dimension: 2-by-2, it can determine the matrix dimension after an assignment (a (5, 8) = 7): 5-by-8.
The code segment (1) is a linear index -- 6, which is converted to a matrix subscript of 2-by-3 or 3-by-2??
The computer doesn't know, so it reports an error. " attempts to grow data along fuzzy dimensions ". This tip, feel very awkward, in fact, is very correct .

The scheme failed with ‘command’ failed

PIP install pylibmc installation failure and its solution. During installation, the following errors are reported, and there may be other errors, similar to the following:

pip install pylibmc==1.6.1
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pylibmc==1.6.1
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/0c/f7a3af34b05c167a69ed1fc330b06b658dac4ab25b8632c52d1022dd5337/pylibmc-1.6.1.tar.gz (64 kB)
Building wheels for collected packages: pylibmc
  Building wheel for pylibmc (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/yangchangjia/PycharmProjects/Nox/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"'; __file__='"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-wheel-73t1n0ft
       cwd: /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/
  Complete output (28 lines):
  /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
    with open("README.rst", "U", encoding="utf-8") as r:
  /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated
    with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.15-x86_64-3.8
  creating build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/autoconf.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/pools.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/client.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/__init__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/test.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/consts.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/__main__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  running build_ext
  building '_pylibmc' extension
  creating build/temp.macosx-10.15-x86_64-3.8
  creating build/temp.macosx-10.15-x86_64-3.8/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -DUSE_ZLIB -I/Users/yangchangjia/PycharmProjects/Nox/venv/include -I/Users/yangchangjia/.pyenv/versions/3.8.6/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.macosx-10.15-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
  In file included from src/_pylibmcmodule.c:34:
  src/_pylibmcmodule.h:42:10: fatal error: 'libmemcached/memcached.h' file not found
  #include <libmemcached/memcached.h>
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pylibmc
  Running setup.py clean for pylibmc
Failed to build pylibmc
Installing collected packages: pylibmc
    Running setup.py install for pylibmc ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/yangchangjia/PycharmProjects/Nox/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"'; __file__='"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-record-tox14kc6/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yangchangjia/PycharmProjects/Nox/venv/include/site/python3.8/pylibmc
         cwd: /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/
    Complete output (28 lines):
    /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
      with open("README.rst", "U", encoding="utf-8") as r:
    /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated
      with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.15-x86_64-3.8
    creating build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/autoconf.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/pools.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/client.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/__init__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/test.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/consts.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/__main__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    running build_ext
    building '_pylibmc' extension
    creating build/temp.macosx-10.15-x86_64-3.8
    creating build/temp.macosx-10.15-x86_64-3.8/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -DUSE_ZLIB -I/Users/yangchangjia/PycharmProjects/Nox/venv/include -I/Users/yangchangjia/.pyenv/versions/3.8.6/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.macosx-10.15-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
    In file included from src/_pylibmcmodule.c:34:
    src/_pylibmcmodule.h:42:10: fatal error: 'libmemcached/memcached.h' file not found
    #include <libmemcached/memcached.h>
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/yangchangjia/PycharmProjects/Nox/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"'; __file__='"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-record-tox14kc6/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yangchangjia/PycharmProjects/Nox/venv/include/site/python3.8/pylibmc Check the logs for full command output.

Solution:

brew install libmemcached
pip install wheel
pip install pylibmc

Installation successful:

pip install pylibmc
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pylibmc
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/0c/f7a3af34b05c167a69ed1fc330b06b658dac4ab25b8632c52d1022dd5337/pylibmc-1.6.1.tar.gz (64 kB)
Building wheels for collected packages: pylibmc
  Building wheel for pylibmc (setup.py) ... done
  Created wheel for pylibmc: filename=pylibmc-1.6.1-cp38-cp38-macosx_10_15_x86_64.whl size=33323 sha256=9a8ecb4933b8a455b7ffe9db042011f3a9865c18441b8e5204d843bc0e6da1a3
  Stored in directory: /Users/yangchangjia/Library/Caches/pip/wheels/a1/8e/7e/d1b6684901c01de15a45efb8b5172c1dc7b9c6a7386d369839
Successfully built pylibmc
Installing collected packages: pylibmc
Successfully installed pylibmc-1.6.1

Multi-object editing not supported error resolution

error message

resolvent

Add a property [caneditmultipleobjects] before your editor class declaration.

When an editor without this attribute selects multiple objects, it will prompt “multi object editing not supported”, and other drawing errors will not be displayed.

Note: the script file of customeditor must be placed in the assets / editor folder in the project, and using unityeditor; must be added to the reference of the script header file;.

using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

[CustomEditor(typeof(TestLightmapsHolder))]
[CanEditMultipleObjects]//add this
public class TestLightmapsHolderEditor : Editor
{
    public override void OnInspectorGUI()
    {
        TestLightmapsHolder holder = target as TestLightmapsHolder;
        base.OnInspectorGUI();
        if (GUILayout.Button("Save light mapping"))
            holder.SaveLightmaps();
    }
}

Unable to initialize GTK: could not open display

When using virt manager to install KVM virtual machine, an error will be reported and the prompt will be displayed

Unable to initialize GTK: could not open display

The log shows:

WARNING! The remote SSH server rejected X11 forwarding request.

Solution:
Yum - y install xorg-x11-xauth
log out of xshell, log in again, and then call virt manager

Solution: Spring no matching editors or conversion strategy found

1、 Exception information:

17:14:37.972 [localhost-startStop-1] ERROR o.s.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'beanUtil': Injection of resource dependencies failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'java.util.HashMap$Values' to required type 'com.hcb.mc.factory.FactoryList'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.util.HashMap$Values] to required type [com.hcb.mc.factory.FactoryList]: no matching editors or conversion strategy found
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:306) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:631) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:588) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:645) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:508) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:449) ~[spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:133) [spring-webmvc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at javax.servlet.GenericServlet.init(GenericServlet.java:160) [servlet-api.jar:3.0.FR]
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266) [catalina.jar:7.0.29]
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185) [catalina.jar:7.0.29]
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080) [catalina.jar:7.0.29]
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5027) [catalina.jar:7.0.29]
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314) [catalina.jar:7.0.29]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:7.0.29]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [catalina.jar:7.0.29]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [catalina.jar:7.0.29]
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [na:1.6.0_30]
	at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.6.0_30]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [na:1.6.0_30]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.6.0_30]
	at java.lang.Thread.run(Unknown Source) [na:1.6.0_30]
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'java.util.HashMap$Values' to required type 'com.hcb.mc.factory.FactoryList'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.util.HashMap$Values] to required type [com.hcb.mc.factory.FactoryList]: no matching editors or conversion strategy found
	at org.springframework.beans.SimpleTypeConverter.convertIfNecessary(SimpleTypeConverter.java:58) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.SimpleTypeConverter.convertIfNecessary(SimpleTypeConverter.java:43) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:759) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:707) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:438) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:416) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:549) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:150) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:303) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	... 30 common frames omitted
Caused by: java.lang.IllegalStateException: Cannot convert value of type [java.util.HashMap$Values] to required type [com.hcb.mc.factory.FactoryList]: no matching editors or conversion strategy found
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:241) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:92) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	at org.springframework.beans.SimpleTypeConverter.convertIfNecessary(SimpleTypeConverter.java:49) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
	... 39 common frames omitted
2014-5-17 17:14:37 org.apache.catalina.core.ApplicationContext log
Warming: StandardWrapper.Throwable

2、 Cause of the problem:

There are two spring IOC configuration files in the project: beanDefines.xml and springMVC.xml .among beanDefines.xml There is no spring component scanning configuration available stay springMVC.xml The configuration of spring component scanning is as follows: < context:component-scan base-package= “com” />. thus beanDefines.xml It works springMVC.xml The configuration of spring component scanning is carried out. beanDefines.xml The bean defined in was not scanned, causing the exception.

 

3、 Solutions:

The two spring IOC configuration files are configured with different ranges of spring component scanning

1.springMVC.xml

	<context:component-scan base-package="com" use-default-filters="false">
	  		<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" />
	</context:component-scan>
           
        <task:annotation-driven/>

2. Biendefen

     <context:component-scan base-package="com" use-default-filters="false">
	  		<context:include-filter type="annotation" expression="org.springframework.stereotype.Service" />
     </context:component-scan>