今天在做ssm整合的时候发现了一个错误,头疼了半天没解决,错误如下:
三月 10, 2018 6:43:37 下午 org.apache.catalina.core.AprLifecycleListener init
警告: The APR based Apache Tomcat Native library failed to load. The error reported was [H:\apache-tomcat-7.0.70\bin\tcnative-1.dll: Can’t load AMD 64-bit .dll on a IA 32-bit platform]
java.lang.UnsatisfiedLinkError: H:\apache-tomcat-7.0.70\bin\tcnative-1.dll: Can’t load AMD 64-bit .dll on a IA 32-bit platform
at java.lang.ClassLoader
NativeLibrary.load(NativeMethod)atjava.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)atjava.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)atjava.lang.ClassLoader.loadLibrary(ClassLoader.java:1880)atjava.lang.Runtime.loadLibrary0(Runtime.java:849)atjava.lang.System.loadLibrary(System.java:1088)atorg.apache.tomcat.jni.Library.<init>(Library.java:42)atorg.apache.tomcat.jni.Library.initialize(Library.java:178)atorg.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:201)atorg.apache.catalina.core.AprLifecycleListener.isAprAvailable(AprLifecycleListener.java:109)atorg.apache.catalina.connector.Connector.setProtocol(Connector.java:592)atorg.apache.catalina.connector.Connector.<init>(Connector.java:66)atorg.apache.catalina.startup.ConnectorCreateRule.begin(ConnectorCreateRule.java:62)atorg.apache.tomcat.util.digester.Digester.startElement(Digester.java:1282)atcom.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)atcom.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)atcom.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1342)atcom.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImplFragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2770)
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.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1555)
at org.apache.catalina.startup.Catalina.load(Catalina.java:616)
at org.apache.catalina.startup.Catalina.load(Catalina.java:667)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:253)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427)
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/7.0.70
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Jun 15 2016 16:27:45 UTC
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 7.0.70.0
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 8
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.2
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: x86
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files (x86)\Java\jdk1.7.0_51\jre
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.7.0_51-b13
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: H:\apache-tomcat-7.0.70
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: H:\apache-tomcat-7.0.70
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:6508
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=H:\apache-tomcat-7.0.70
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=H:\apache-tomcat-7.0.70
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=H:\apache-tomcat-7.0.70/common/endorsed
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.io.tmpdir=H:\apache-tomcat-7.0.70\temp
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.library.path=C:\Program Files (x86)\Java\jdk1.7.0_51\bin;H:\apache-tomcat-7.0.70\bin
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dsun.io.useCanonCaches=false
三月 10, 2018 6:43:37 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“http-bio-8080”]
三月 10, 2018 6:43:37 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler [“ajp-bio-8009”]
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 698 ms
三月 10, 2018 6:43:37 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
三月 10, 2018 6:43:37 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.70
三月 10, 2018 6:43:37 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory H:\apache-tomcat-7.0.70\webapps\test_springmvc
三月 10, 2018 6:43:50 下午 org.apache.catalina.startup.TldConfig execute
信息: 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.
三月 10, 2018 6:43:50 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
三月 10, 2018 6:43:51 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Logging initialized using ‘class org.apache.ibatis.logging.stdout.StdOutImpl’ adapter.
三月 10, 2018 6:43:53 下午 com.sun.faces.config.ConfigureListener contextInitialized
信息: 初始化上下文 ‘/test_springmvc’ 的 Mojarra 2.0.3 (FCS b03)
三月 10, 2018 6:43:54 下午 com.sun.faces.spi.InjectionProviderFactory createInstance
信息: JSF1048:有 PostConstruct/PreDestroy 注释。标有这些注释的 ManagedBeans 方法将表示注释已处理。
三月 10, 2018 6:43:57 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [1,510] milliseconds.
三月 10, 2018 6:43:58 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet ‘MyDispatcher’
三月 10, 2018 6:44:08 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory H:\apache-tomcat-7.0.70\webapps\test_springmvc has finished in 30,878 ms
三月 10, 2018 6:44:08 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [“http-bio-8080”]
三月 10, 2018 6:44:08 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler [“ajp-bio-8009”]
三月 10, 2018 6:44:08 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 30974 ms
Creating a new SqlSession
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@140a194] was not registered for synchronization because synchronization is not active
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@140a194]
三月 10, 2018 6:47:20 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [MyDispatcher] in context with path [/test_springmvc] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.
The error may exist in org/dao/IDeptDaoMapper.xml
The error may involve org.dao.IDeptDao.findDeptAll
The error occurred while executing a query
Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
Last packet sent to the server was 0 ms ago.] with root cause
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at java.net.Socket.connect(Socket.java:528)
at java.net.Socket.<init>(Socket.java:425)
at java.net.Socket.<init>(Socket.java:241)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:284)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2043)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:723)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:173)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:164)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:153)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at org.mybatis.spring.transaction.SpringManagedTransaction.openConnection(SpringManagedTransaction.java:81)
at org.mybatis.spring.transaction.SpringManagedTransaction.getConnection(SpringManagedTransaction.java:67)
at org.apache.ibatis.executor.BaseExecutor.getConnection(BaseExecutor.java:279)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:72)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:59)
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:267)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:137)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:96)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:77)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.mybatis.spring.SqlSessionTemplate
SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)atcom.sun.proxy.Proxy5.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
at com.sun.proxy.
Proxy7.findDeptAll(UnknownSource)atorg.service.impl.DeptServiceImpl.findDeptAll(DeptServiceImpl.java:106)atorg.action.DeptController.findDeptAll(DeptController.java:52)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)atjava.lang.reflect.Method.invoke(Method.java:606)atorg.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)atorg.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)atorg.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)atorg.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:685)atorg.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)atorg.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)atorg.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)atorg.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)atorg.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:624)atorg.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:731)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)atorg.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)atorg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)atorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)atorg.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)atorg.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)atorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)atorg.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1082)atorg.apache.coyote.AbstractProtocolAbstractConnectionHandler.process(AbstractProtocol.java:623)
at org.apache.tomcat.util.net.JIoEndpoint
SocketProcessor.run(JIoEndpoint.java:316)atjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)atjava.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:744)
最后发现居然是我mysql数据库服务忘记开了,,,吧mysql服务开了就可以 ,以后可得细心了,不能犯这么低级的错误了
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
评论(0)