Java 中注入失败,初始化失败 5C

D:\Java\Apache\tomcat\bin\catalina.bat run
[2018-07-06 10:17:02,297] Artifact mmall:war: Server is not connected. Deploy is not available.
Using CATALINA_BASE: "C:\Users\Administrator.IntelliJIdea15\system\tomcat\Unnamed_mmall_5"
Using CATALINA_HOME: "D:\Java\Apache\tomcat"
Using CATALINA_TMPDIR: "D:\Java\Apache\tomcat\temp"
Using JRE_HOME: "D:\Java\jdk1.8"
Using CLASSPATH: "D:\Java\Apache\tomcat\bin\bootstrap.jar;D:\Java\Apache\tomcat\bin\tomcat-juli.jar"
06-Jul-2018 10:17:04.197 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.36
06-Jul-2018 10:17:04.202 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Jun 9 2016 13:55:50 UTC
06-Jul-2018 10:17:04.202 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.36.0
06-Jul-2018 10:17:04.203 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
06-Jul-2018 10:17:04.203 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
06-Jul-2018 10:17:04.203 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
06-Jul-2018 10:17:04.204 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: D:\Java\jdk1.8\jre
06-Jul-2018 10:17:04.204 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_31-b13
06-Jul-2018 10:17:04.205 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
06-Jul-2018 10:17:04.205 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\Administrator.IntelliJIdea15\system\tomcat\Unnamed_mmall_5
06-Jul-2018 10:17:04.205 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\Java\Apache\tomcat
06-Jul-2018 10:17:04.210 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
06-Jul-2018 10:17:04.211 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
06-Jul-2018 10:17:04.213 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
06-Jul-2018 10:17:04.214 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
06-Jul-2018 10:17:04.214 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
06-Jul-2018 10:17:04.215 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
06-Jul-2018 10:17:04.218 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator.IntelliJIdea15\system\tomcat\Unnamed_mmall_5\conf\logging.properties
06-Jul-2018 10:17:04.218 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
06-Jul-2018 10:17:04.219 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=D:\Java\Apache\tomcat\endorsed
06-Jul-2018 10:17:04.221 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\Administrator.IntelliJIdea15\system\tomcat\Unnamed_mmall_5
06-Jul-2018 10:17:04.221 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\Java\Apache\tomcat
06-Jul-2018 10:17:04.222 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\Java\Apache\tomcat\temp
06-Jul-2018 10:17:04.222 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.7 using APR version 1.5.2.
06-Jul-2018 10:17:04.222 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
06-Jul-2018 10:17:05.281 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2h 3 May 2016)
06-Jul-2018 10:17:05.603 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
06-Jul-2018 10:17:05.630 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
06-Jul-2018 10:17:05.634 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2175 ms
06-Jul-2018 10:17:05.705 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
06-Jul-2018 10:17:05.705 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.36
06-Jul-2018 10:17:05.727 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8080"]
06-Jul-2018 10:17:05.766 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
06-Jul-2018 10:17:05.788 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 153 ms
Connected to server
[2018-07-06 10:17:05,995] Artifact mmall:war: Artifact is being deployed, please wait...
06-Jul-2018 10:17:11.679 INFO [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
06-Jul-2018 10:17:11.805 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
06-Jul-2018 10:17:12.113 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.context.support.AbstractApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Fri Jul 06 10:17:12 CST 2018]; root of context hierarchy
06-Jul-2018 10:17:12.267 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [applicationContext.xml]
06-Jul-2018 10:17:13.049 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [applicationContext-datasource.xml]
06-Jul-2018 10:17:13.857 INFO [RMI TCP Connection(2)-127.0.0.1] org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties Loading properties file from class path resource [datasource.properties]
10:17:14,340 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
10:17:14,340 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
10:17:14,341 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/D:/Java/Apache/tomcat/webapps/ROOT/WEB-INF/classes/logback.xml]
10:17:14,499 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
10:17:14,502 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Setting ReconfigureOnChangeFilter scanning period to 1 minutes
10:17:14,502 |-INFO in ReconfigureOnChangeFilter{invocationCounter=0} - Will scan for changes in [[D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\logback.xml]] every 60 seconds.
10:17:14,502 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Adding ReconfigureOnChangeFilter as a turbo filter
10:17:14,512 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
10:17:14,522 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [console]
10:17:14,578 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@4:19 - no applicable action for [encoding], current ElementPath is [[configuration][appender][encoding]]
10:17:14,583 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
10:17:14,766 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
10:17:14,775 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [mmall]
10:17:14,831 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@18:21 - no applicable action for [append], current ElementPath is [[configuration][appender][rollingPolicy][append]]
10:17:14,843 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use gz compression
10:17:14,851 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern /developer/apache-tomcat-7.0.73/logs/mmall.log.%d{yyyy-MM-dd} for the active file
10:17:14,865 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern '/developer/apache-tomcat-7.0.73/logs/mmall.log.%d{yyyy-MM-dd}.gz'.
10:17:14,865 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
10:17:14,866 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Tue Jul 03 20:52:38 CST 2018
10:17:14,874 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
10:17:14,881 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[mmall] - Active log file name: /developer/apache-tomcat-7.0.73/logs/mmall.log
10:17:14,881 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[mmall] - File property is set to [/developer/apache-tomcat-7.0.73/logs/mmall.log]
10:17:14,885 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender]
10:17:14,885 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [error]
10:17:14,886 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@33:21 - no applicable action for [append], current ElementPath is [[configuration][appender][rollingPolicy][append]]
10:17:14,888 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use gz compression
10:17:14,888 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern /devsoft/apache-tomcat-7.0.73/logs/error.log.%d{yyyy-MM-dd} for the active file
10:17:14,894 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - The date pattern is 'yyyy-MM-dd' from file name pattern '/devsoft/apache-tomcat-7.0.73/logs/error.log.%d{yyyy-MM-dd}.gz'.
10:17:14,894 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Roll-over at midnight.
10:17:14,894 |-INFO in c.q.l.core.rolling.DefaultTimeBasedFileNamingAndTriggeringPolicy - Setting initial period to Tue Jul 03 20:52:38 CST 2018
10:17:14,895 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
10:17:14,914 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[error] - Active log file name: /developer/apache-tomcat-7.0.73/logs/error.log
10:17:14,914 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[error] - File property is set to [/developer/apache-tomcat-7.0.73/logs/error.log]
10:17:14,918 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.mmall] to INFO
10:17:14,918 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [com.mmall] to false
10:17:14,918 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [mmall] to Logger[com.mmall]
10:17:14,920 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [console] to Logger[com.mmall]
10:17:14,920 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.mmall.dao] to DEBUG
10:17:14,920 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
10:17:14,920 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [console] to Logger[ROOT]
10:17:14,921 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [error] to Logger[ROOT]
10:17:14,921 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
10:17:14,923 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@4fd39943 - Registering current configuration as safe fallback point

[10:17:14.980][DEBUG][org.apache.ibatis.logging.LogFactory][RMI TCP Connection(2)-127.0.0.1] Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
[10:17:15.587][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Property configuration or 'configLocation' not specified, using default MyBatis Configuration
[10:17:15.736][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Registered plugin: 'com.github.pagehelper.PageHelper@16a000a1'
06-Jul-2018 10:17:15.795 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\Java\Apache\tomcat\webapps\manager
06-Jul-2018 10:17:16.008 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\Java\Apache\tomcat\webapps\manager has finished in 212 ms
[10:17:16.139][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Parsed mapper file: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\CartMapper.xml]'
[10:17:16.195][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Parsed mapper file: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\CategoryMapper.xml]'
[10:17:16.285][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Parsed mapper file: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\OrderItemMapper.xml]'
[10:17:16.350][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Parsed mapper file: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\OrderMapper.xml]'
[10:17:16.422][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Parsed mapper file: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\PayInfoMapper.xml]'
[10:17:16.507][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Parsed mapper file: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\ProductMapper.xml]'
[10:17:16.526][DEBUG][org.mybatis.spring.SqlSessionFactoryBean][RMI TCP Connection(2)-127.0.0.1] Parsed mapper file: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\ShippingMapper.xml]'
06-Jul-2018 10:17:16.547 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userManageController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.service.IUserService com.mmall.controller.backend.UserManageController.iUserService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iUserService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.dao.UserMapper com.mmall.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\com\mmall\dao\UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:381)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:293)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1696)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:484)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:433)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$240(TCPTransport.java:683)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/1865884405.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.service.IUserService com.mmall.controller.backend.UserManageController.iUserService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iUserService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.dao.UserMapper com.mmall.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\com\mmall\dao\UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)
... 59 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'iUserService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.dao.UserMapper com.mmall.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\com\mmall\dao\UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:292)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:957)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:480)
... 61 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mmall.dao.UserMapper com.mmall.service.impl.UserServiceImpl.userMapper; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\com\mmall\dao\UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)
... 72 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userMapper' defined in file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\com\mmall\dao\UserMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': : Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1278)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1170)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:957)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:480)
... 74 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1014)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:957)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:855)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1263)
... 85 more
Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:522)
at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:381)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)
... 95 more
Caused by: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。
at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:259)
at org.apache.ibatis.parsing.XPathParser.(XPathParser.java:125)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.(XMLMapperBuilder.java:78)
at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:519)
... 98 more
Caused by: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.java:1994)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:879)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:348)
at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java:257)
... 101 more

06-Jul-2018 10:17:16.653 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
06-Jul-2018 10:17:16.654 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
[2018-07-06 10:17:16,722] Artifact mmall:war: Error during artifact deployment. See server log for details.

7个回答

xml格式没问题吧?

applicationContext-datasource.xml的配置有问题,还有UserMapper.xml也有问题,可以贴出来看下

检查下UserMapper.xml的这个文件,可能有一个tag写错了。。可以把这个文件贴出来

nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。;

[D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]

columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。;
意思是UserMapper.xml文件的第十行的标签的属性名必须在以上几个关键词中,不能自己定义,检查一下是不是写错了

Failed to parse mapping resource: 'file [D:\Java\Apache\tomcat\webapps\ROOT\WEB-INF\classes\mappers\UserMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 209; columnNumber: 10; 元素类型为 "mapper" 的内容必须匹配 "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*|select*)+"。;
很明显的错啊,UserMapper.xml那里写错了,贴出来看一下

低级问题,xml里标签名或者属性写错了,估计已经解决了吧

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
注入失败
注入线程失败 显示0x000000 内存不能read 这是为什么 求解
glview初始化失败,opencv初始化失败
glview初始化失败,opencv初始化失败,glview是cocos2dx初始化中的,感觉这两个是一个问题。rn重装了os就出现这个问题了。rn驱动都是最新的,配置环境都是正确的rn[code=c]director->setOpenGLView(glview);[/code]glview为NULL;rnopencv是0x3E633E46 处有未经处理的异常(在 test.exe 中): 0xC0000005: 执行位置 0x3E633E46 时发生访问冲突。rn已运行就这样,连跟踪都进不去
loadlibrary ... 失败 初始化例程失败
用regsvr32运行自己写的dll时出现这个提示rndll代码:rn#includernrnBOOL APIENTRY DllMain(HANDLE, DWORD, LPVOID)rnrn MessageBox(NULL, "2", "1", NULL);rn return false;rnrn弹出对话框后确定后就弹出这个错误提示了。rn[img=http://hi.csdn.net/attachment/201111/22/7297650_13219540157FGc.jpg][/img]rn[img=http://hi.csdn.net/attachment/201111/22/7297650_13219540261pGH.jpg][/img]rn这个是咋回事?
关于Spring容器初始化注入失败
关于Spring容易注入失败 单元测试时有时候可能是因为多个配置文件冲突了 可以在启动类中去除配置文件解决
java工具类@Autowired注入失败
失败原因 使用了@PostConstruct 注解 同时java类当中存在构造函数 @PostConstruct public void init() { autoSSPD = this; } public AutoSSPD(String[] ids,String tex){ this.ids = ids; this.te...
Java多线程中Spring的Bean注入失败
问题说明 : 在spring框架进行项目开发,平时遇到了需要批量处理的数据的时候,会选择多线程进行数据批跑,但是会发现,启动多线程后,线程会出现service或者mapper文件注入失败的问题,导致线程启动失败,其中bean的注入方式选择的是spring常规的注解@Autowired进行注入 原因分析 : web容器在启动应用时,spring容器是无法感知多线程的那些bean的,所以多线程...
SparkContext初始化失败,java空指针异常
求助!!! SparkContext初始化失败,java空指针异常 在windows上运行spark,已经按照网上步骤安装了hadoop-common-bin,配置了host和环境变量,pycharm跑起来就报下面的错误,困扰多时,希望有大佬解答。 代码如下: from pyspark import SparkConf from pyspark.sql import SparkSession #s...
zuulFilter中注入bean 失败
一. 为什么要用到这个    上周想实现在网关层 zuul 实现用户认证操作,即需要在网关过滤器中调用其他的微服务,按常规做法在 filter 中用 @Autowired 注解一个feign 接口,启动 一直失败,用度娘谷歌查了又查,只找到一些类似【在过滤器中注入bean】失败,但说的都是springMVC 并不是springcloud中的网关层 二. 解决方法     查了很久,最终
单文档中 串口初始化失败
现象:rn程序一开始运行就提示 the device is not open.rnrn我用串口调试工具,确认串口是正确的,而且是能够工作的。rnrn在单文档中增加了一个listview类,并向其添加了一个CMscomm1 COM 控件。rn[code=c]rnclass CListCtrlView : public CViewrnrnprotected:rn enum NUM_BUTTONS = 9;rn CListCtrl m_List;rn CImageList m_Image;rn CImageList* m_pDragImage;rn BOOL m_bDragging;rn int m_nDragIndex, m_nDropIndex;rn HTREEITEM m_hDropItem;rn CWnd* m_pDropWnd;rn CSyncCommWorker m_serial;rn CMscomm1 myComm;rn void DropItemOnTree (CTreeCtrl* pTree);rn void DropItemOnList (CListCtrl* pList);rn void GetAllItem();rn CListCtrlView(); // protected constructor used by dynamic creationrn DECLARE_DYNCREATE(CListCtrlView)rnrn// Attributesrnpublic:rnrn// Operationsrnpublic:rnrn// Overridesrn // ClassWizard generated virtual function overridesrn //AFX_VIRTUAL(CListCtrlView)rn public:rn virtual void OnInitialUpdate();rn protected:rn virtual void OnDraw(CDC* pDC); // overridden to draw this viewrn //AFX_VIRTUALrnrn// Implementationrnprotected:rn virtual ~CListCtrlView();rn#ifdef _DEBUGrn virtual void AssertValid() const;rn virtual void Dump(CDumpContext& dc) const;rn#endifrnrn // Generated message map functionsrnprotected:rn //AFX_MSG(CListCtrlView)rn afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);rn afx_msg void OnSize(UINT nType, int cx, int cy);rn afx_msg void OnLButtonUp(UINT nFlags, CPoint point);rn afx_msg void OnMouseMove(UINT nFlags, CPoint point);rn //AFX_MSGrn afx_msg void OnBeginDrag (NMHDR* pnmhdr, LRESULT* pResult);rn DECLARE_MESSAGE_MAP()rn;rn[/code]rnrn串口初始化代码rn[code=c]rnvoid CListCtrlView::OnInitialUpdate() rnrn CView::OnInitialUpdate();rn rn // TODO: Add your specialized code here and/or call the base classrnrn DWORD dwStyle = m_List.GetExtendedStyle();rn dwStyle |= LVS_EX_FULLROWSELECT;//选中某行使整行高亮(只适用与report风格的listctrl)rn dwStyle |= LVS_EX_GRIDLINES;//网格线(只适用与report风格的listctrl)rn //dwStyle |= LVS_EX_CHECKBOXES;//item前生成checkbox控件rn m_List.SetExtendedStyle(dwStyle); //设置扩展风格rn #if 1rn CString str; rn DWORD style=WS_VISIBLE|WS_CHILD;rn if (!myComm.Create(NULL,style,CRect(0,0,0,0),this,IDC_MSCOMM1))rn rn AfxMessageBox(_T("failed to creat the mscomm!"));rn rn //CString str;rn Sleep(1000);rn if(myComm.get_PortOpen())rn rn myComm.put_PortOpen(0);rn rn //str.Format(_T("%d,N,8,1"),bps);rn myComm.put_PortOpen(0);rn myComm.put_CommPort(12);rn rn myComm.put_Settings("9600,N,8,1"); rn myComm.put_InBufferSize(1024);//设置串口BUFFER的大小 rn myComm.put_InBufferCount(0);//清空串口buffer rn myComm.put_InputMode(1);//设置读取方式为二进制方式 rn myComm.put_InputLen(512);//设置一次读取字节数rn myComm.put_RThreshold(1); rn myComm.put_PortOpen(1);rn#endifrnrn rnrnrn[/code]
DS18B20 初始化失败 纠结中
为了单独测试这个DS18B20的初始化,弄了个最小化的电路如下:rnDS18B20接P1.7,LED接P1.0rn[img=http://hi.csdn.net/attachment/201006/24/0_1277391558vA6V.gif][/img]rnrn如果初始化成功,则LED应该点亮.rn程序:rn[code=C/C++]#include rnrnsbit DQ = P1^7;rnrnsbit LED = P1^0; rnrnvoid delay2us(unsigned char t)rnrn while(--t)rn ;rnrnrnvoid main(void)rnrn bit x;rn DQ = 1;rn delay2us(1);rn DQ = 0;rn delay2us(200);rn delay2us(100);rn DQ = 1;rn delay2us(35);rn x = DQ;rn delay2us(20);rnrn while(1)rn rn LED = x;rn rn[/code]rnrn
DLL为何注入失败
环境:Win81 中文64bit, VS2014rn参考文档:rnWindows核心编程(第5版) 第22章rnhttp://blog.chinaunix.net/uid-26275986-id-3141902.htmlrnhttp://blog.chinaunix.net/uid-26275986-id-3141902.htmlrnrn要求结果:注入自己写的dll,看见一个弹出框rn [code=c] case DLL_PROCESS_ATTACH: rn // attach to process rn // return FALSE to fail DLL load rn MessageBoxA(0, "I am a dll!", "DLL Message", MB_OK | MB_ICONINFORMATION); rn break; [/code]rn实现结果:rn我分别尝试了 1. 自身进程 2. notepad.exe 3. mspaint.exe 4. calc.exe 5. winlogon.exe 6. firefox.exe 7 Alipaybsm.exe rn其中:1/2/3/4都成功了,能看见弹出框。rn 5在CreateRemoteThread()失败了,返回5. rn 6/7调用CreateRemoteThread()没失败,但是 WaitForSingleObject(hThread, INFINITE);这句立即返回WAIT_OBJECT_0。我没看见弹出框。rn 6/7运行在admin用户下rnrn疑问:rn 1. 为何6/7不能成功?rn 2. 如何让5成功?rnrn目前已无分可用,希望大家帮忙解答
spring 注入失败报错
报错代码片段: Error creating bean with name 'itemServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire...
springboot报错注入失败
2019-05-05 12:49:26.346 WARN 1900 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframewor...
Autowried注入失败
原因 在分布式开发中,在开发搜索系统时,发布Dubbo服务由于自己的糊涂,忘记, 设置web.xml文件了,难怪怎么修改Dubbo服务,都不会报错,spring容器都没初始化,服务没有发布成功。 在Web层才提示错误 org.springframework.beans.factory.BeanCreationException: Error creating bean with name
注入bean失败
1 . springboot+dubbo+zookeeper启动provider时报错RedisUtils注入失败 RedisUtils是以工具jar包依赖到shop-user工程中,该工程包含2个项目shop-user-provider和shop-user-consumer ,  配置application.yml没问题 ,  解决办法在主程序上加注解   @Import({RedisUti...
@autowire 注入失败
idea 启动报错  Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'WXCouponSupplyServ...
spring bean 注入失败
1.异常信息 2.有可能引起的原因: 1.在applicationContext-service.xml的配置文件里的包扫描不对 2.在web.xml里没有加载spring容器 3.分布式工程,使用dubbo通信,在服务层,或者消费层, 单词写错了 4.还有一种可能,有可能是pom 里的jar包冲突 当时我看了这些就去解决,但是都无效 这个异常属于bean创建异常,原因是我的xml的路径设...
注入bean失败异常
org.springframework.beans.factory.BeanCreationException: 注入 bean 失败异常 bean 注入失败的原因包括以下几种但不限于这几种: 对应的 bean 没有添加注解; 对应的 bean 添加注解错误,例如将 Spring 的@Service错选成 dubbo 的; 选择错误的自动注入方法等。 然后发现是注解少写了一个@Service,在U...
spring自动注入失败
启动没有报错,但是注入失败xxService的值为null。应该是哪里的问题搞了一下午都没有解决。。。
mapper注入失败
Error creating bean with name 'slideMapper' defined in file xxx新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富...
反射注入失败的原因!
因为前一段时时间公司没有什么新项目,个人闲着无聊就写自己人生中第一个框架(方便自己以后偷懒...)。可能是自己的技术还是不够吧,这期间遇到很多问题,而且网上基本找不到这种问题的答案,这也是我写这篇博文的原因。 下面来讲一下我在其中遇到主要的问题,注入失败(主要是对spring不熟悉造成的) 框架是通过配置文减里指定的类里面指定的方法去对页面静态化处理
SpringMVC+mybatis注入失败?
[code=html]org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.ints.service.UserService com.ints.controller.UserController.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.ints.service.UserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @org.springframework.beans.factory.annotation.Autowired(required=true)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)rn at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:663)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:629)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:677)rn at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:548)rn at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:489)rn at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)rn at javax.servlet.GenericServlet.init(GenericServlet.java:212)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)rn at org.apache.catalina.core.StandardService.start(StandardService.java:525)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:595)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn at java.lang.reflect.Method.invoke(Unknown Source)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)rnCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.ints.service.UserService com.ints.controller.UserController.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.ints.service.UserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @org.springframework.beans.factory.annotation.Autowired(required=true)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)rn at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)rn ... 34 morernCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.ints.service.UserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @org.springframework.beans.factory.annotation.Autowired(required=true)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1047)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)rn ... 36 morern2016-11-21 14:31:06,381 [main] ERROR [org.springframework.web.servlet.DispatcherServlet] - Context initialization failed[/code]rnrnrnrnrn[img=https://img-bbs.csdn.net/upload/201611/21/1479710146_181811.png][/img]
HttpSolrServer注入失败
[b]HttpSolrServer老是注入失败[/b]rn[color=#FF0000] Error creating bean with name 'itemServiceImp': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.apache.solr.client.solrj.impl.HttpSolrServer com.taotao.search.service.imp.ItemServiceImp.httpSolrServer; nested exception is java.lang.NoClassDefFoundError: org/apache/http/entity/mime/content/ContentBodyrn[/color]rn[b]这是我的applicationContext-Service的配置文件[/b]rn[img=https://img-bbs.csdn.net/upload/201806/05/1528164070_275524.png][/img]rn[b]奇怪的是,我写的测试类中从ApplicationContext中能找到类并使用[/b]rn[img=https://img-bbs.csdn.net/upload/201806/05/1528164169_605601.png][/img]rn[b]而service死活注入不了[/b]rn[img=https://img-bbs.csdn.net/upload/201806/05/1528164252_703887.png][/img]rn[b]请问这到底是怎么回事?[/b]rn
spring 注入失败
web.xmlrnrnrn rn contextConfigLocationrn classpath:applicationContext-*.xmlrn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn dispatcherServletrn org.springframework.web.servlet.DispatcherServletrn rn contextConfigLocationrn /WEB-INF/profiles/applicationContext.xmlrn rn 1rn rn rn dispatcherServletrn *.dorn rnrnrn CloudServpagern rn index.htmlrn index.htmrn index.jsprn default.htmlrn default.htmrn default.jsprn rnrnrnapplicationContext.xmlrnrnrn rn rn rn org.springframework.web.servlet.view.JstlViewrn rn rn /WEB-INF/web/rn rn rn .jsprn rn rnrn rn rn rn rn loginActionrn loginActionrn loginActionrn loginActionrnrn roleActionrn roleActionrnrn houseActionrn houseActionrn houseActionrn rn rnrn rnrn rn rn rn rnrnrnrnapplicationContext-ibatis.xmlrnrnrnrnrn rn rn rn java:comp/env/jdbc/CloudServpagern rn rnrn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rn rn rn rnrnrnrn rn rn rn rn rn rn classpath:springSqlMapConfig.xmlrn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnapplicationContext-beans.xmlrnrnrn rn rn rnrn rn rn rn rnrn rn rn rn rnrnrnrnrn以上是我的spring配置文件rn下面是action 使用 对象时,发现对象没有注入,HouseBusiness为null。rnpublic class LoginAction extends MultiActionController rnrn private HouseBusiness housebusiness;rn rn public HouseBusiness getHousebusiness() rn return housebusiness;rn rnrn public void setHousebusiness(HouseBusiness housebusiness) rn this.housebusiness = housebusiness;rn rnrnibatis也注入失败rn严重: Servlet.service() for servlet dispatcherServlet threw exceptionrnjava.lang.IllegalArgumentException: No SqlMapClient specifiedrn
DLL注入失败 2
继续昨晚的调试。今天请教了一个高手,他觉得可能原因有:1.游戏有防护,防止读写——但是为啥CE和OD可以直接附加并分析呢?2.有的游戏不响应消息循环里的键盘消息,对其进行了屏蔽——不是很明白,如果是这样的话,游戏是怎么相应键盘消息的呢?比如说输入账号,或者是聊天?虽然不明白,但还是先尝试一下通过函数来提升一下注入进程的权限——结果还是失败,返回的错误码显示是 AdjustTokenPrivileg...
dubbo开发注入失败
dubbo开发时注入报错,以下是错误信息 Description: A component required a bean of type 'com.sangular.dolphin.api.item.AttributeServiceRemote' that could not be found. Action: Consider defining a bean of type 'co...
springmvc注入失败
注入失败的问题,感觉很头痛,而且经常是稀里糊涂的解决了,遇到了又不知道是哪里出了问题。这里总结几种出现该问题的解决方法,通常都是这些地方不注意造成的。 通常错误是这样。 可能出问题的地方: 1.忘记加注解 这个比较少见,都不会忘记,另外注解要加在实现类里面,不要加在接口里面(有的人还会犯这种问题)。 2.忘记打开注解方式 3.扫描的包不正确,或者是没有扫描到全部
autoware自动注入失败
注入失败,个人总结 有这么几点, 1:spring 配置文件没有扫描包 检查下有没有这句 2:你的被注入的类有没有被spring管理 也就是有没有加注解, 3,:还有一点是一般新手可能遇到的,就是给servlet注入,这点和第二点是一样的,就是servlet不是被spring管理的,而是被tomcat或者其他服务器容器管理的,两者使用的不是同一个对象,这时,如果需要在你的servlet中使用
线程注入失败
[code=C/C++]rn//Dll5.dll,要注入的dllrn#include rnBOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) rn rnrn switch (ul_reason_for_call) rnrn rnrn case DLL_PROCESS_ATTACH: rnrn MessageBox(0,"HelloWorld!","message",0); //弹个窗口rnrn break; rnrn case DLL_THREAD_ATTACH: rnrn break; rnrn case DLL_THREAD_DETACH: rnrn break; rnrn case DLL_PROCESS_DETACH: rnrn break; rnrn rnrn return TRUE; rnrn rnrn[/code]rnrnrn[code=C/C++]rn//注入程序程序最后提示注入成功了,但是确没有弹窗口.rn#include rn#include rnint main(int argc,char* argv[]) rn HWND hWin = NULL;rn HANDLE hProcess = NULL;rn HANDLE reMoteThread = NULL;rn unsigned long pid = 0;rn void* pointer = NULL;rn char* dllName = "Dll5.dll";rn PTHREAD_START_ROUTINE startAddress = NULL;rn hWin = FindWindow("notepad",NULL);//注入的是notepad.exe记事本,运行程序前,先打开记事本rn if(hWin == NULL) rn printf("找不到窗口!");rn return 0;rn rn GetWindowThreadProcessId(hWin,&pid);rn //printf("%d\n",pid);rn hProcess = OpenProcess(PROCESS_ALL_ACCESS,true,pid);rn if(hProcess == NULL) rn printf("无法打开进程!");rn return 0;rn rn pointer = VirtualAllocEx(hProcess,NULL,9,MEM_COMMIT,PAGE_READWRITE);rn// printf("%d",pointer);rn if (WriteProcessMemory(hProcess,pointer,dllName,9,NULL) == 0) rn printf("写入进程失败!");rn return 0;rn rn startAddress = (PTHREAD_START_ROUTINE )GetProcAddress(GetModuleHandle("kernel32"),"LoadLibraryW");rn if (startAddress == NULL) rn printf("无法获得loadliabrary的地址!");rn return 0;rn rn reMoteThread = CreateRemoteThread(hProcess,NULL,0,startAddress,pointer,0,NULL);rn if (reMoteThread == NULL) rn printf("创建远程线程失败!");rn CloseHandle(hProcess);rn return 0;rn rn VirtualFree(pointer,9,MEM_DECOMMIT);rn CloseHandle(reMoteThread);rn CloseHandle(hProcess);rn printf("远程线程注入成功!");rn return 0;rnrnrn[/code]
dll注入失败
rn使用了easyhook,rn1、 Config.Register("WowInjector App", "InjectedDll.dll", "DllInjector.exe");这一行出错,说什么the given user library "injecteddll.dll" is not strongly named;rnrn2、wowPid = procs[0].Id;居然是0,我多调试几次试试。。。rnrn3、我怎么知道注入成功没成功。。。rnrnrnusing System;rnusing System.Collections.Generic;rnusing System.Diagnostics;rnusing System.Runtime.Remoting;rnusing EasyHook;rnrnnamespace DllInjectorrnrn class Programrn rn public static string ChannelName;rnrn public class WoWInterface : MarshalByRefObjectrn rn public void IsInstalled(Int32 InClientPID)rn rn return;rn rnrn public void WriteConsole(String Write)rn rn Console.WriteLine(Write);rn rn rnrn static void Main(string[] args)rn rn Config.Register("WowInjector App", "InjectedDll.dll", "DllInjector.exe");rnrn int wowPid;rn Process[] procs = Process.GetProcessesByName("Wow.exe");rn wowPid = procs[0].Id;rnrn RemoteHooking.IpcCreateServer(ref ChannelName, WellKnownObjectMode.SingleCall);rn RemoteHooking.Inject(wowPid, InjectionOptions.Default, "InjectedDll.dll", "InjectedDll.dll", ChannelName);rn rn rnrn
service注入失败
首先报错误 空指针 rn[code=java]java.lang.NullPointerExceptionrn at action.UserRegisterAction.execute(UserRegisterAction.java:34)[/code]rn后来我测试 userService确实为nullrn[code=java]rnrn private IUserService userService;rn rn public String execute()rn System.out.println("进入");rn Map errors = this.validate(person,rpassword);rn request.setAttribute("errors", errors);rn if(errors.isEmpty())rn tryrn userService.create(person);[/code]rn配置文件看了许多都没看出错误 前2个都成功了 就第三个出错rn[code=java]rn rn rn rn rn rn rn rn rn [/code]
@autowired自动注入失败
Error creating bean with name 'employeeServiceImpl': Unsatisfied dependency expressed through field 'empMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.hdd.mapper.EmployeeMapper' available: ...rn怎么改啊?
ssm+shiro 注入失败
认证失败:Authentication failed for token submission [org.apache.shiro.authc.UsernamePasswordToken - admin, rememberMe=false]. Possible unexpected error? (Typical or expected login exceptions should exten...
springMVC 注入dao失败
这是baseSercice:rnpublic abstract class BaseServiceImpl implements BaseService rn @Autowiredrn protected BaseDao baseDao;rnrnrnrnrn这是userService:rnrn@Service("userService")rnpublic class UserServiceImpl extends BaseServiceImpl implements UserServicern @Resource(name = "userDao")rn private UserDao usersDao;rnrnrn这是loginService:rnrn@Service("loginService")rnpublic class LoginServiceImpl extends BaseServiceImpl implements LoginServicern @Resource(name = "loginDao") rn private LoginDao loginDao;rnrn异常:rnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.tian.dao.BaseDao com.tian.service.impl.BaseServiceImpl.baseDao; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.tian.dao.BaseDao] is defined: expected single matching bean but found 2: loginDao,userDaorn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5099)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5615)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)rn at java.util.concurrent.FutureTask.run(FutureTask.java:266)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.tian.dao.BaseDao com.tian.service.impl.BaseServiceImpl.baseDao; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.tian.dao.BaseDao] is defined: expected single matching bean but found 2: loginDao,userDaorn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)rn at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)rn ... 26 morernCaused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.tian.dao.BaseDao] is defined: expected single matching bean but found 2: loginDao,userDaorn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1054)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533)rn ... 28 morern三月 02, 2017 2:33:47 下午 org.apache.catalina.core.StandardContext listenerStartrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.tian.dao.BaseDao com.tian.service.impl.BaseServiceImpl.baseDao; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.tian.dao.BaseDao] is defined: expected single matching bean but found 2: loginDao,userDaorn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5099)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5615)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)rn at java.util.concurrent.FutureTask.run(FutureTask.java:266)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: protected com.tian.dao.BaseDao com.tian.service.impl.BaseServiceImpl.baseDao; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.tian.dao.BaseDao] is defined: expected single matching bean but found 2: loginDao,userDaorn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561)rn at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)rn ... 26 morernCaused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.tian.dao.BaseDao] is defined: expected single matching bean but found 2: loginDao,userDaornrn但是当我将userService和loginService中的继承去掉就不报错了,请问我要怎么在不去掉继承的情况解决这个问题rn
spring 注入失败!!!!!!!!
applicationContext.xmlrn[code=XML]rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn[/code]rnstruts.xmlrn[code=XML]rnrn rn rn rn rn rn rn[/code]rnloginAction.xmlrn[code=XML]rn rn rn rn /sendSuccss.jsprn rn rn rn[/code]rnweb.xmlrn[code=XML]rn rn contextConfigLocationrn rn /WEB-INF/applicationContext*.xmlrn rn rn rn org.springframework.web.context.ContextLoaderListenerrn rn[/code]rnUserServiceImpl.javarn[code=Java]rnpublic class UserServiceImpl implements UserService rn public UserDAO userDao;rnrn public UserDAO getUserDao() rn return userDao;rn rnrn public void setUserDao(UserDAO userDao) rn this.userDao = userDao;rn rn[/code]rnrn[code=Java]rnpackage com.quxiuna.struts.action.login;rnrnimport java.util.Map;rnrnimport com.opensymphony.xwork2.ActionContext;rnimport com.opensymphony.xwork2.ActionSupport;rnimport com.quxiuna.hibernate.po.RbacUser;rnimport com.quxiuna.service.UserService;rnimport com.quxiuna.util.Constants;rnrnpublic class LoginAction extends ActionSupport rn rn private static final long serialVersionUID = -1640288447822607013L;rn rn private String name;rn private String password;rn private String message;rn public UserService userService;rnrn public String getName() rn return name;rn rn rn public void setName(String name) rn this.name = name;rn rnrn public String getPassword() rn return password;rn rnrn public void setPassword(String password) rn this.password = password;rn rn rn @SuppressWarnings("unchecked")rn public String execute() rn RbacUser user = userService.login(name, password);rn if (user != null) rn ActionContext ctx = ActionContext.getContext(); rn Map session = ctx.getSession(); rn session.put(Constants.SESSSION_NAME, name);rn return SUCCESS;rn else rn message = "用户名或密码错误!"; rn return ERROR;rn rn rnrn public String getMessage() rn return message;rn rnrn public void setMessage(String message) rn this.message = message;rn rnrn public UserService getUserService() rn return userService;rn rnrn public void setUserService(UserService userService) rn this.userService = userService;rn rnrn[/code]rnrn报错rnjava.lang.NullPointerExceptionrn com.quxiuna.struts.action.login.LoginAction.execute(LoginAction.java:38)rn sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)rn sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)rn java.lang.reflect.Method.invoke(Unknown Source)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)rn com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)rn …………………………………………rn …………………………………………
@Autowired注入失败
在spring-mybatis.xml/applicationcontext.xml中没有加 <context:component-scan base-package=“com.xxx”/>,
Spring 注入失败的原因
有一次写代码如下   ApplicationContext ctx = new ClassPathXmlApplicationContext("beans.xml");  HarborBusiness service = (HarborBusiness) ctx.getBean("harborBusiness");   总是报no bean named   查了半天没查出来了,后来把前一...
springMVC 注入对象失败
最近有空想学着自己搭建一个SpringMVC的项目,因为之前都没咋学习相关的知识,所以在搭建过程中遇到了很多问题,其中第一问题就折腾了我好长时间,现在把它记录下来。 我是跟着这个博客开始进行搭建的,http://jinnianshilongnian.iteye.com/blog/1594806 1、下载所需的包 spring相关的jar包,可以从这个网址进行下载 : http://re
Spring @Autowired注入失败
今天做项目的时候出现了个问题,异常简要信息如下rn[code=java]Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.yuansheng.jst.permission.service.IPermissionService] is defined: expected single matching bean but found 2: permissonService,IPermissionService[/code]rn接口:rn[code=java]public interface IPermissionService rn[/code]rn实现类:rn[code=java]@Servicernpublic class PermissonService implements IPermissionService rn @Autowiredrn private PermissionMapper permissionMapper;rn rn[/code]rn控制器rn[code=java]@Controllerrn@Path("/permission")rn@Consumes(MediaType.APPLICATION_FORM_URLENCODED)rn@Produces(MediaType.APPLICATION_JSON)rnpublic class PermissionResource rn private Logger logger = Logger.getLogger(this.getClass());rn @Autowiredrn private IPermissionService permissionService;rnrn[/code]rnrn之前一直是这么注入的,没想到会出错,仔细检查后发现是由于实现类的名称中少写了一个字幕i导致的,即PermissionService写成了PermissonService,修改后就正确了。rn那么问题来了,@AutoWired默认是byType注入的,即使我的类名写错,接口也只有一个实现类,为什么会注入失败?而且异常信息是扫描到了两个可注入的类,其中一个还是IPermissionService,那么如果我实现类的名称写正确的话,为什么就能正确注入了,而没有扫描到两个?
@Resource注入spring失败
普通的class中的代码rn1、@Resourcern private AdBannerService bannerService;rnrnAdBannerService为接口 提供了AdBannerServiceImpl实现类rnrn2、spring的配置:是一次性把整个包都注入的rn[color=#FF0000] rn [/color]rn运行List adBanners=bannerService.adBannerList();rn就会报NullpointException错误,框架是SSI的rn不知道为什么会注入失败?求解!rnrn rn
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法