zoukankan      html  css  js  c++  java
  • ssm整合框架遇到的问题(会更新)

    简介  

      我的项目是在eclipse中编译运行的,已经使用maven搭建好了项目整体结构,使用ssm框架进行项目整合(项目不是固定的),此次博客主要是把在调试框架过程中遇到的问题一一展现出来,当然这只是开始,后续会慢慢更新。

    第一个问题

       报错代码信息

      

    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Server version:        Apache Tomcat/8.5.28
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Server built:          Feb 6 2018 23:10:25 UTC
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Server number:         8.5.28.0
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: OS Name:               Windows 7
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: OS Version:            6.1
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Architecture:          amd64
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Java Home:             C:Program FilesJavajre1.8.0_102
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: JVM Version:           1.8.0_102-b14
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: JVM Vendor:            Oracle Corporation
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: CATALINA_BASE:         D:eclipse2eclipse fold.metadata.pluginsorg.eclipse.wst.server.core	mp0
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: CATALINA_HOME:         G:TomcatTmcat8.5
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Command line argument: -Dcatalina.base=D:eclipse2eclipse fold.metadata.pluginsorg.eclipse.wst.server.core	mp0
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Command line argument: -Dcatalina.home=G:TomcatTmcat8.5
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Command line argument: -Dwtp.deploy=D:eclipse2eclipse fold.metadata.pluginsorg.eclipse.wst.server.core	mp0wtpwebapps
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Command line argument: -Djava.endorsed.dirs=G:TomcatTmcat8.5endorsed
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.VersionLoggerListener log
    信息: Command line argument: -Dfile.encoding=GBK
    七月 19, 2018 10:21:50 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:Program FilesJavajre1.8.0_102in;C:WindowsSunJavain;C:Windowssystem32;C:Windows;C:/Program Files/Java/jre1.8.0_102/bin/server;C:/Program Files/Java/jre1.8.0_102/bin;C:/Program Files/Java/jre1.8.0_102/lib/amd64;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesJavajdk1.8.0_102in;C:Program FilesJavajdk1.8.0_102jrein;D:gitGitGitcmd;C:Program FilesMySQLMySQL Utilities 1.6;D:Mavenjavamavenin;;C:UsersAdministrator.SKY-20180707LYJDesktop;;.]
    七月 19, 2018 10:21:50 下午 org.apache.coyote.AbstractProtocol init
    信息: Initializing ProtocolHandler ["http-nio-8080"]
    七月 19, 2018 10:21:50 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
    信息: Using a shared selector for servlet write/read
    七月 19, 2018 10:21:50 下午 org.apache.coyote.AbstractProtocol init
    信息: Initializing ProtocolHandler ["ajp-nio-8009"]
    七月 19, 2018 10:21:50 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
    信息: Using a shared selector for servlet write/read
    七月 19, 2018 10:21:50 下午 org.apache.catalina.startup.Catalina load
    信息: Initialization processed in 1047 ms
    七月 19, 2018 10:21:50 下午 org.apache.catalina.core.StandardService startInternal
    信息: Starting service [Catalina]
    七月 19, 2018 10:21:50 下午 org.apache.catalina.core.StandardEngine startInternal
    信息: Starting Servlet Engine: Apache Tomcat/8.5.28
    七月 19, 2018 10:21:51 下午 org.apache.catalina.startup.HostConfig deployDescriptor
    信息: Deploying configuration descriptor [D:eclipse2eclipse fold.metadata.pluginsorg.eclipse.wst.server.core	mp0confCatalinalocalhostssm_template01.xml]
    七月 19, 2018 10:21:51 下午 org.apache.catalina.startup.SetContextPropertiesRule begin
    警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ssm_template01' did not find a matching property.
    七月 19, 2018 10:21:53 下午 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.
    七月 19, 2018 10:21:53 下午 org.apache.catalina.core.ApplicationContext log
    信息: No Spring WebApplicationInitializer types detected on classpath
    七月 19, 2018 10:21:53 下午 org.apache.catalina.core.ApplicationContext log
    信息: Initializing Spring root WebApplicationContext
    [org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization started
    [org.springframework.web.context.support.StandardServletEnvironment]Adding PropertySource 'servletConfigInitParams' with lowest search precedence
    [org.springframework.web.context.support.StandardServletEnvironment]Adding PropertySource 'servletContextInitParams' with lowest search precedence
    [org.springframework.web.context.support.StandardServletEnvironment]Adding PropertySource 'jndiProperties' with lowest search precedence
    [org.springframework.web.context.support.StandardServletEnvironment]Adding PropertySource 'systemProperties' with lowest search precedence
    [org.springframework.web.context.support.StandardServletEnvironment]Adding PropertySource 'systemEnvironment' with lowest search precedence
    [org.springframework.web.context.support.StandardServletEnvironment]Initialized StandardServletEnvironment with PropertySources [StubPropertySource@307187458 {name='servletConfigInitParams', properties=java.lang.Object@5a08d95f}, StubPropertySource@1703806333 {name='servletContextInitParams', properties=java.lang.Object@505585e3}, JndiPropertySource@940242868 {name='jndiProperties', properties=org.springframework.jndi.JndiLocatorDelegate@24d403cb}, MapPropertySource@837050305 {name='systemProperties', properties={java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=C:Program FilesJavajre1.8.0_102in, java.vm.version=25.102-b14, shared.loader=, java.vm.vendor=Oracle Corporation, java.vendor.url=http://java.oracle.com/, path.separator=;, tomcat.util.buf.StringCache.byte.enabled=true, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, file.encoding.pkg=sun.io, user.country=CN, user.script=, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=Service Pack 1, tomcat.util.scan.StandardJarScanFilter.jarsToScan=log4j-web*.jar,log4j-taglib*.jar,log4javascript*.jar,slf4j-taglib*.jar, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:UsersAdministrator.SKY-20180707LYJDesktop, java.runtime.version=1.8.0_102-b14, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=G:TomcatTmcat8.5endorsed, os.arch=amd64, java.io.tmpdir=C:UsersADMINI~1.SKYAppDataLocalTemp\, line.separator=
    , java.vm.specification.vendor=Oracle Corporation, java.naming.factory.url.pkgs=org.apache.naming, user.variant=, os.name=Windows 7, sun.jnu.encoding=GBK, java.library.path=C:Program FilesJavajre1.8.0_102in;C:WindowsSunJavain;C:Windowssystem32;C:Windows;C:/Program Files/Java/jre1.8.0_102/bin/server;C:/Program Files/Java/jre1.8.0_102/bin;C:/Program Files/Java/jre1.8.0_102/lib/amd64;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesJavajdk1.8.0_102in;C:Program FilesJavajdk1.8.0_102jrein;D:gitGitGitcmd;C:Program FilesMySQLMySQL Utilities 1.6;D:Mavenjavamavenin;;C:UsersAdministrator.SKY-20180707LYJDesktop;;., java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=6.1, java.util.concurrent.ForkJoinPool.common.threadFactory=org.apache.catalina.startup.SafeForkJoinWorkerThreadFactory, user.home=C:UsersAdministrator.SKY-20180707LYJ, catalina.useNaming=true, user.timezone=Asia/Shanghai, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=GBK, java.specification.version=1.8, tomcat.util.scan.StandardJarScanFilter.jarsToSkip=bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,jaspic-api.jar,catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-storeconfig.jar,catalina-tribes.jar,jasper.jar,jasper-el.jar,ecj-*.jar,tomcat-api.jar,tomcat-util.jar,tomcat-util-scan.jar,tomcat-coyote.jar,tomcat-dbcp.jar,tomcat-jni.jar,tomcat-websocket.jar,tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,tomcat-jdbc.jar,tools.jar,commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,commons-math*.jar,commons-pool*.jar,jstl.jar,taglibs-standard-spec-*.jar,geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,junit.jar,junit-*.jar,hamcrest-*.jar,easymock-*.jar,cglib-*.jar,objenesis-*.jar,ant-launcher.jar,cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,xom-*.jar, catalina.home=G:TomcatTmcat8.5, java.class.path=G:TomcatTmcat8.5inootstrap.jar;G:TomcatTmcat8.5in	omcat-juli.jar, user.name=Administrator, java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory, package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.naming.,org.apache.tomcat., java.vm.specification.version=1.8, sun.java.command=org.apache.catalina.startup.Bootstrap start, java.home=C:Program FilesJavajre1.8.0_102, sun.arch.data.model=64, user.language=zh, java.specification.vendor=Oracle Corporation, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, java.version=1.8.0_102, java.ext.dirs=C:Program FilesJavajre1.8.0_102libext;C:WindowsSunJavalibext, sun.boot.class.path=C:Program FilesJavajre1.8.0_102lib
    esources.jar;C:Program FilesJavajre1.8.0_102lib
    t.jar;C:Program FilesJavajre1.8.0_102libsunrsasign.jar;C:Program FilesJavajre1.8.0_102libjsse.jar;C:Program FilesJavajre1.8.0_102libjce.jar;C:Program FilesJavajre1.8.0_102libcharsets.jar;C:Program FilesJavajre1.8.0_102libjfr.jar;C:Program FilesJavajre1.8.0_102classes, server.loader=, java.vendor=Oracle Corporation, catalina.base=D:eclipse2eclipse fold.metadata.pluginsorg.eclipse.wst.server.core	mp0, file.separator=\, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar", sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, wtp.deploy=D:eclipse2eclipse fold.metadata.pluginsorg.eclipse.wst.server.core	mp0wtpwebapps, package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat., sun.desktop=windows, sun.cpu.isalist=amd64}}, SystemEnvironmentPropertySource@1306705539 {name='systemEnvironment', properties={LOCALAPPDATA=C:UsersAdministrator.SKY-20180707LYJAppDataLocal, PROCESSOR_LEVEL=6, FP_NO_HOST_CHECK=NO, USERDOMAIN=SKY-20180707LYJ, LOGONSERVER=\SKY-20180707LYJ, JAVA_HOME=C:Program FilesJavajdk1.8.0_102, SESSIONNAME=Console, ALLUSERSPROFILE=C:ProgramData, PROCESSOR_ARCHITECTURE=AMD64, PSModulePath=C:Windowssystem32WindowsPowerShellv1.0Modules\, SystemDrive=C:, MAVEN_HOME=D:Mavenjavamaven, APPDATA=C:UsersAdministrator.SKY-20180707LYJAppDataRoaming, USERNAME=Administrator, windows_tracing_logfile=C:BVTBinTestsinstallpackagecsilogfile.log, ProgramFiles(x86)=C:Program Files (x86), CommonProgramFiles=C:Program FilesCommon Files, Path=C:/Program Files/Java/jre1.8.0_102/bin/server;C:/Program Files/Java/jre1.8.0_102/bin;C:/Program Files/Java/jre1.8.0_102/lib/amd64;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesJavajdk1.8.0_102in;C:Program FilesJavajdk1.8.0_102jrein;D:gitGitGitcmd;C:Program FilesMySQLMySQL Utilities 1.6;D:Mavenjavamavenin;;C:UsersAdministrator.SKY-20180707LYJDesktop;, PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC, OS=Windows_NT, windows_tracing_flags=3, COMPUTERNAME=SKY-20180707LYJ, PROCESSOR_REVISION=4e03, CLASSPATH=.;C:Program FilesJavajdk1.8.0_102libdt.jar;C:Program FilesJavajdk1.8.0_102lib	ools.jar;, CommonProgramW6432=C:Program FilesCommon Files, ComSpec=C:Windowssystem32cmd.exe, DEVMGR_SHOW_DETAILS=1, ProgramData=C:ProgramData, ProgramW6432=C:Program Files, HOMEPATH=UsersAdministrator.SKY-20180707LYJ, SystemRoot=C:Windows, TEMP=C:UsersADMINI~1.SKYAppDataLocalTemp, HOMEDRIVE=C:, PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 78 Stepping 3, GenuineIntel, USERPROFILE=C:UsersAdministrator.SKY-20180707LYJ, TMP=C:UsersADMINI~1.SKYAppDataLocalTemp, CommonProgramFiles(x86)=C:Program Files (x86)Common Files, ProgramFiles=C:Program Files, PUBLIC=C:UsersPublic, NUMBER_OF_PROCESSORS=4, windir=C:Windows}}]
    [org.springframework.web.context.support.StandardServletEnvironment]Replacing PropertySource 'servletContextInitParams' with 'servletContextInitParams'
    [org.springframework.web.context.support.XmlWebApplicationContext]Refreshing Root WebApplicationContext: startup date [Thu Jul 19 22:21:53 CST 2018]; root of context hierarchy
    [org.springframework.core.env.StandardEnvironment]Adding PropertySource 'systemProperties' with lowest search precedence
    [org.springframework.core.env.StandardEnvironment]Adding PropertySource 'systemEnvironment' with lowest search precedence
    [org.springframework.core.env.StandardEnvironment]Initialized StandardEnvironment with PropertySources [MapPropertySource@828827675 {name='systemProperties', properties={java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=C:Program FilesJavajre1.8.0_102in, java.vm.version=25.102-b14, shared.loader=, java.vm.vendor=Oracle Corporation, java.vendor.url=http://java.oracle.com/, path.separator=;, tomcat.util.buf.StringCache.byte.enabled=true, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, file.encoding.pkg=sun.io, user.country=CN, user.script=, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=Service Pack 1, tomcat.util.scan.StandardJarScanFilter.jarsToScan=log4j-web*.jar,log4j-taglib*.jar,log4javascript*.jar,slf4j-taglib*.jar, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:UsersAdministrator.SKY-20180707LYJDesktop, java.runtime.version=1.8.0_102-b14, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=G:TomcatTmcat8.5endorsed, os.arch=amd64, java.io.tmpdir=C:UsersADMINI~1.SKYAppDataLocalTemp\, line.separator=
    , java.vm.specification.vendor=Oracle Corporation, java.naming.factory.url.pkgs=org.apache.naming, user.variant=, os.name=Windows 7, sun.jnu.encoding=GBK, java.library.path=C:Program FilesJavajre1.8.0_102in;C:WindowsSunJavain;C:Windowssystem32;C:Windows;C:/Program Files/Java/jre1.8.0_102/bin/server;C:/Program Files/Java/jre1.8.0_102/bin;C:/Program Files/Java/jre1.8.0_102/lib/amd64;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesJavajdk1.8.0_102in;C:Program FilesJavajdk1.8.0_102jrein;D:gitGitGitcmd;C:Program FilesMySQLMySQL Utilities 1.6;D:Mavenjavamavenin;;C:UsersAdministrator.SKY-20180707LYJDesktop;;., java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=6.1, java.util.concurrent.ForkJoinPool.common.threadFactory=org.apache.catalina.startup.SafeForkJoinWorkerThreadFactory, user.home=C:UsersAdministrator.SKY-20180707LYJ, catalina.useNaming=true, user.timezone=Asia/Shanghai, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=GBK, java.specification.version=1.8, tomcat.util.scan.StandardJarScanFilter.jarsToSkip=bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,jaspic-api.jar,catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-storeconfig.jar,catalina-tribes.jar,jasper.jar,jasper-el.jar,ecj-*.jar,tomcat-api.jar,tomcat-util.jar,tomcat-util-scan.jar,tomcat-coyote.jar,tomcat-dbcp.jar,tomcat-jni.jar,tomcat-websocket.jar,tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,tomcat-jdbc.jar,tools.jar,commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,commons-math*.jar,commons-pool*.jar,jstl.jar,taglibs-standard-spec-*.jar,geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,junit.jar,junit-*.jar,hamcrest-*.jar,easymock-*.jar,cglib-*.jar,objenesis-*.jar,ant-launcher.jar,cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,xom-*.jar, catalina.home=G:TomcatTmcat8.5, java.class.path=G:TomcatTmcat8.5inootstrap.jar;G:TomcatTmcat8.5in	omcat-juli.jar, user.name=Administrator, java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory, package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.naming.,org.apache.tomcat., java.vm.specification.version=1.8, sun.java.command=org.apache.catalina.startup.Bootstrap start, java.home=C:Program FilesJavajre1.8.0_102, sun.arch.data.model=64, user.language=zh, java.specification.vendor=Oracle Corporation, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, java.version=1.8.0_102, java.ext.dirs=C:Program FilesJavajre1.8.0_102libext;C:WindowsSunJavalibext, sun.boot.class.path=C:Program FilesJavajre1.8.0_102lib
    esources.jar;C:Program FilesJavajre1.8.0_102lib
    t.jar;C:Program FilesJavajre1.8.0_102libsunrsasign.jar;C:Program FilesJavajre1.8.0_102libjsse.jar;C:Program FilesJavajre1.8.0_102libjce.jar;C:Program FilesJavajre1.8.0_102libcharsets.jar;C:Program FilesJavajre1.8.0_102libjfr.jar;C:Program FilesJavajre1.8.0_102classes, server.loader=, java.vendor=Oracle Corporation, catalina.base=D:eclipse2eclipse fold.metadata.pluginsorg.eclipse.wst.server.core	mp0, file.separator=\, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar", sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, wtp.deploy=D:eclipse2eclipse fold.metadata.pluginsorg.eclipse.wst.server.core	mp0wtpwebapps, package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat., sun.desktop=windows, sun.cpu.isalist=amd64}}, SystemEnvironmentPropertySource@1408352921 {name='systemEnvironment', properties={LOCALAPPDATA=C:UsersAdministrator.SKY-20180707LYJAppDataLocal, PROCESSOR_LEVEL=6, FP_NO_HOST_CHECK=NO, USERDOMAIN=SKY-20180707LYJ, LOGONSERVER=\SKY-20180707LYJ, JAVA_HOME=C:Program FilesJavajdk1.8.0_102, SESSIONNAME=Console, ALLUSERSPROFILE=C:ProgramData, PROCESSOR_ARCHITECTURE=AMD64, PSModulePath=C:Windowssystem32WindowsPowerShellv1.0Modules\, SystemDrive=C:, MAVEN_HOME=D:Mavenjavamaven, APPDATA=C:UsersAdministrator.SKY-20180707LYJAppDataRoaming, USERNAME=Administrator, windows_tracing_logfile=C:BVTBinTestsinstallpackagecsilogfile.log, ProgramFiles(x86)=C:Program Files (x86), CommonProgramFiles=C:Program FilesCommon Files, Path=C:/Program Files/Java/jre1.8.0_102/bin/server;C:/Program Files/Java/jre1.8.0_102/bin;C:/Program Files/Java/jre1.8.0_102/lib/amd64;C:ProgramDataOracleJavajavapath;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:Program FilesJavajdk1.8.0_102in;C:Program FilesJavajdk1.8.0_102jrein;D:gitGitGitcmd;C:Program FilesMySQLMySQL Utilities 1.6;D:Mavenjavamavenin;;C:UsersAdministrator.SKY-20180707LYJDesktop;, PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC, OS=Windows_NT, windows_tracing_flags=3, COMPUTERNAME=SKY-20180707LYJ, PROCESSOR_REVISION=4e03, CLASSPATH=.;C:Program FilesJavajdk1.8.0_102libdt.jar;C:Program FilesJavajdk1.8.0_102lib	ools.jar;, CommonProgramW6432=C:Program FilesCommon Files, ComSpec=C:Windowssystem32cmd.exe, DEVMGR_SHOW_DETAILS=1, ProgramData=C:ProgramData, ProgramW6432=C:Program Files, HOMEPATH=UsersAdministrator.SKY-20180707LYJ, SystemRoot=C:Windows, TEMP=C:UsersADMINI~1.SKYAppDataLocalTemp, HOMEDRIVE=C:, PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 78 Stepping 3, GenuineIntel, USERPROFILE=C:UsersAdministrator.SKY-20180707LYJ, TMP=C:UsersADMINI~1.SKYAppDataLocalTemp, CommonProgramFiles(x86)=C:Program Files (x86)Common Files, ProgramFiles=C:Program Files, PUBLIC=C:UsersPublic, NUMBER_OF_PROCESSORS=4, windir=C:Windows}}]
    七月 19, 2018 10:21:53 下午 org.apache.catalina.core.StandardContext listenerStart
    严重: Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:343)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:223)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:194)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:621)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:522)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:409)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4753)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
        at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:159)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329)
        ... 25 more
    
    七月 19, 2018 10:21:53 下午 org.apache.catalina.core.StandardContext startInternal
    严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
    七月 19, 2018 10:21:53 下午 org.apache.catalina.core.StandardContext startInternal
    严重: Context [/ssm_template01] startup failed due to previous errors
    七月 19, 2018 10:21:53 下午 org.apache.catalina.core.ApplicationContext log
    信息: Closing Spring root WebApplicationContext
    七月 19, 2018 10:21:53 下午 org.apache.catalina.core.StandardContext listenerStop
    严重: Exception sending context destroyed event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
    java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
        at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:176)
        at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1041)
        at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1017)
        at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:967)
        at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:525)
        at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:112)
        at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4800)
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5437)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    
    七月 19, 2018 10:21:53 下午 org.apache.catalina.startup.HostConfig deployDescriptor
    信息: Deployment of configuration descriptor [D:eclipse2eclipse fold.metadata.pluginsorg.eclipse.wst.server.core	mp0confCatalinalocalhostssm_template01.xml] has finished in [2,708] ms
    七月 19, 2018 10:21:53 下午 org.apache.coyote.AbstractProtocol start
    信息: Starting ProtocolHandler ["http-nio-8080"]
    七月 19, 2018 10:21:53 下午 org.apache.coyote.AbstractProtocol start
    信息: Starting ProtocolHandler ["ajp-nio-8009"]
    七月 19, 2018 10:21:53 下午 org.apache.catalina.startup.Catalina start
    信息: Server startup in 3096 ms
    [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
    [org.springframework.web.context.ContextLoader]Context initialization failed
    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:343)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:223)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:194)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
        at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:621)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:522)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:409)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:291)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4753)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:629)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
        at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:159)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329)
        ... 25 more
    [org.springframework.web.context.support.XmlWebApplicationContext]Closing Root WebApplicationContext: startup date [Thu Jul 19 22:21:53 CST 2018]; root of context hierarchy
    View Code

      我从中截取了部分错误

      根据错误提示,我来到applicationContext.xml配置文件中,发现好像并没有什么错误,弄了好久,才发现一个不起眼的小错误,先贴上代码

      发现前:

          

      发现后:

           

      没错,就是大小写错误!哎,以前从没发现过这个错误,一直以为是取的一个名字而已,很受伤......

     第二个问题

      错误关键信息

      

      纠结了好久,才解决

      原因,依赖关系不正确

      将

      <dependency>
        <groupId>org.hibernate.validator</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>6.0.10.Final</version>
      </dependency>

      改为  

      <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>2.0.0.CR3</version>
      </dependency>

      问题解决,要是有类似的问题的朋友希望可以帮助你们!

      第三个问题

       错误代码信息

    java.lang.Exception: No tests found matching [{ExactMatcher:fDisplayName=testfindUserById], {ExactMatcher:fDisplayName=testfindUserById(com.lxc.ssm.test.testSpringAndMybatis)], {LeadingIdentifierMatcher:fClassName=com.lxc.ssm.test.testSpringAndMybatis,fLeadingIdentifier=testfindUserById]] from org.junit.internal.requests.ClassRequest@f2a0b8e
        at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:40)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createFilteredTest(JUnit4TestLoader.java:77)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:68)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
    View Code

      出现以上错误从两点查找,这个一般很少出现错误 
      一. 
      查看Test的函数有没有加static,加了会出错 
      二. 
      查看Test的函数有没有返回值,有会出错,Test函数,据我目前观察返回类型都是void

      另外看见网上有人说是spring-test版本问题,这个我没遇到过,就不知道了,如果上面两种检查过了,还没找到问题所在,可能就是spring-test版本问题了

      就我的报错信息结合代码,发现是犯了第一个错误,在方法上添加了static

      

      这里我在说一下,因为我的项目是用maven搭建的结构,而且我的spring的jar包是兼容的,所以不存在spring-test jar错误的问题。就我排错无数的经验来说,jdk1.8的运行环境, 必须要使用spring5.x的版本(经验所得,你们可以试试)

    第四个问题

       这个问题可是花了一天半的时间才能圆满解决。

      报错代码信息

    Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
        at java.util.zip.ZipFile.read(Native Method)
        at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
        at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717)
        at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)
        at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
        at sun.misc.IOUtils.readFully(IOUtils.java:65)
        at java.util.jar.JarFile.getBytes(JarFile.java:425)
        at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)
        at java.util.jar.JarFile.getManifest(JarFile.java:180)
        at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:111)
        ... 13 more
    View Code

      出现这个错误,立马百度,说是maven下载jar包的时候因为没有下载完全。怪就怪我对maven的本地仓库不怎么熟悉,花了几个小时的时间找错的jar包(就是那种在网上不停

    百度类似的情况,想有没有一模一样的缺失jar包的例子),但是我试过了,并不是。所以还是要结合实际情况,根据自己的来进行查找。这是我找错误的jar包的第一种方法。

      第二种方法(说出来好笑)就是在pom.xml文件里把jar包一个个的测试和利用maven test测试,但是都没有什么用。

      第三种方法就是在本地仓库里找jar包是不是没有下载完全

      像这种情况就是jar包没有下载完全(网上其实已经说了,但是我理解错了,就自己做了第二种方法,害自己耽误了很长时间)。排错了以后就没问题了。

      究根结底,就是jar包没下载完全!

    第五个问题

       报错代码信息

      

      这个问题,怎么说呢,还是jar的问题。

      理由是Log4jConfigListener已经在spring5.x版本后不适用了,也就是说可以在spring3.x或者spring4.x里使用。

      找到这个症结后,我就在网上maven里下载了几个jar包

      

      然后在web.xml里就可以使用新的监听器了

      

      注意,在spring5.x版本后是Log4jServletContextListener,在spring5.x前是Log4jContextListener

    第六个问题

    报错信息:

    javax.validation.BootstrapConfiguration.getClockProviderClassName()Ljava/lang/String;

    我在网上找了相关错误的讲解,都没有解决我的问题,问题直指springmvc.xml的配置文件。

    然后又花了段时间精力转移到配置文件上,可我确信没有错误。然后想想可能是jar包版本的问题。

    开始我是下载了最新的hibernate-validator版本,然后我就在想是不是太新了,我的环境可能支持不了。果然,在maven的网站上下载了这个版本

    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-validator</artifactId>
      <version>5.0.3.Final</version>
    </dependency>

    然后保存,再次部署项目,错误消失!!!

      

      

     

  • 相关阅读:
    MSchart设置网格线
    搭建ELDK交叉编译环境
    Virtualbox设置共享文件夹的方法
    VS2010自动关闭问题的解决方法
    如何让PHPCms内容页支持JavaScript
    Phpcms V9 调用全站最新文章的代码
    Phpcms V9 调用随机文章的方法
    VMware下Ubuntu不能和主机共享文件夹的解决方法
    Xshell无法连接Ubuntu的解决办法
    Phpcms V9 调用全站文章排行的解决方案
  • 原文地址:https://www.cnblogs.com/lxc116317/p/9338777.html
Copyright © 2011-2022 走看看