Java.lang.NoSuchMethodError:org.apache.catalina.connector.Connector.setProtocol (ljava/lang/string;)

Source: Internet
Author: User
Tags addchild

1. Before the project code changed a computer, and then ran back to the time of the inexplicable error, probably have some of the following error message

2017-11-27 11:32:01 ERROR [RMI TCP Connection (5) -127.0.0.1] Org.springframework.web.context.ContextLoader 356-context Initialization failed Java.lang.NoSuchMethodError:org.apache.catalina.connector.Connector.setProtocol (Ljava/lang /string) V at com.alibaba.dubbo.remoting.http.tomcat.tomcathttpserver.<init> (TomcatHttpServer.java:66) at Com.alibaba.dubbo.remoting.http.tomcat.TomcatHttpBinder.bind (tomcathttpbinder.java:29) at Com.alibaba.dubbo.remoting.http.httpbinder$adpative.bind (Httpbinder$adpative.java) at Com.alibaba.dubbo.rpc.protocol.rest.DubboHttpServer.doStart (dubbohttpserver.java:54) at Com.alibaba.dubbo.rpc.protocol.rest.BaseRestServer.start (baserestserver.java:38) at Com.alibaba.dubbo.rpc.protocol.rest.RestProtocol.doExport (restprotocol.java:89) at Com.alibaba.dubbo.rpc.protocol.AbstractProxyProtocol.export (abstractproxyprotocol.java:69) at Com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export (protocollistenerwrapper.java:56) at Com.alibaba.dubbo.rpc.pRotocol. Protocolfilterwrapper.export (protocolfilterwrapper.java:55) at Com.alibaba.dubbo.rpc.protocol$adpative.export ( Protocol$adpative.java) at Com.alibaba.dubbo.registry.integration.RegistryProtocol.doLocalExport ( registryprotocol.java:153) at Com.alibaba.dubbo.registry.integration.RegistryProtocol.export ( registryprotocol.java:107) at Com.alibaba.dubbo.rpc.protocol.ProtocolListenerWrapper.export ( protocollistenerwrapper.java:54) 27-nov-2017 11:32:01.818 Severe [RMI TCP Connection (5) # -127.0.0.1] Org.apache.catalina.core.StandardContext.startInternal one or more listeners failed to start. Full details would be found in the appropriate container log file at Com.alibaba.dubbo.rpc.protocol.ProtocolFilterWrapper.
Export (protocolfilterwrapper.java:53) at Com.alibaba.dubbo.rpc.protocol$adpative.export (Protocol$Adpative.java) 27-nov-2017 11:32:01.819 Critical [RMI TCP Connection (5) # -127.0.0.1] Org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors at CoM.alibaba.dubbo.config.serviceconfig.doexporturlsfor1protocol (serviceconfig.java:489) at Com.alibaba.dubbo.config.ServiceConfig.doExportUrls (serviceconfig.java:285) at Com.alibaba.dubbo.config.ServiceConfig.doExport (serviceconfig.java:246) at Com.alibaba.dubbo.config.ServiceConfig.export (serviceconfig.java:145) at Com.alibaba.dubbo.config.spring.ServiceBean.onApplicationEvent (servicebean.java:110) at Org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener ( simpleapplicationeventmulticaster.java:163) at Org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent ( simpleapplicationeventmulticaster.java:136) at Org.springframework.context.support.AbstractApplicationContext.publishEvent (Abstractapplicationcontext.java : 381) at Org.springframework.context.support.AbstractApplicationContext.publishEvent ( abstractapplicationcontext.java:335) at Org.springframework.context.support.AbstractApplicationContext.finishRefresh (Abstractapplicationcontext.java:855) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:541) at
	Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (contextloader.java:444) At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:326) at Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:107) at Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4643) at Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5105) at Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:183) at Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:740) at Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:716) at Org.apache.catalina.core.StandardHost.addChild (standardhost.java:703) at ORG.APACHE.CATALINA.STARTUP.HOSTCONFIG.MANAGEAPP (Hostconfig.java:1729) 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:498) at Org.apache.tomcat.util.modeler.BaseModelMBean.invoke ( basemodelmbean.java:287) 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:456) at Org.apache.catalina.mbeans.MBeanFactory.createStandardContext (mbeanfactory.java:405) 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:498) at Org.apache.tomcat.util.modeler.BaseModelMBean.invoke (basemodelmbean.java:287) 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:1468) at javax.management.remote.rmi.rmiconnectionimpl.access$300 (rmiconnectionimpl.java:76) at Javax.management.remote.rmi.rmiconnectionimpl$privilegedoperation.run (rmiconnectionimpl.java:1309) at Javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation (rmiconnectionimpl.java:1401) at Javax.management.remote.rmi.RMIConnectionImpl.invoke (rmiconnectionimpl.java:829) 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:498) at Sun.rmi.server.UnicastServerRef.dispatch (Unicastserverref.java : 357) 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$0 (tcptransport.java:683) 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:1149) at Java.util.concurrent.threadpoolexecutor$worker.run (ThreadPoolExecutor.java:624) At Java.lang.Thread.run (thread.java:748)

Again, some of the following errors:

2017-11-27 11:32:02 INFO [RMI TCP Connection (5) # -127.0.0.1] Org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean 481-closing JPA Entitymanagerfactory for Persistence unit ' hrunit ' 2017-11-27 11:32:02 INFO [RMI TCP Connection (5) # -127.0.0.1] Com.alibaba.druid.pool.DruidDataSource 1436-{dataSource-1} closed 27-nov-2017 11:32:02.143 warning [RMI TCP Connection (5)- 127.0.0.1] Org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc the Web application [ROOT] Registered the JDBC driver [Com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the Web application is Stopped.
To prevent a memory leak, the JDBC Driver has been, forcibly. 27-nov-2017 11:32:02.143 Warning [RMI TCP Connection (5) # -127.0.0.1] ORG.APACHE.CATALINA.LOADER.WEBAPPCLASSLOADERBASE.CLEARREFERENCESJDBC the Web application [ROOT] registered the JDBC driver [Com.mysql.jdbc.Driver] but failed to unregister it's the Web application was stopped. To prevent a memory leak, the JDBC DriVer has been forcibly unregistered. [2017-11-27 11:32:02,159] Artifact Open-hr-service-provider:war Exploded:error during artifact deployment. The server log for details.

2. Solution:

① is searching for the keyword "to prevent a memory leak, the JDBC Driver has the been forcibly unregistered", find the solution given two points, one is to copy JDBC Driver to Tomcat Lib directory, the second is the annotation of the Tomcat configuration file Server.xml (<listener classname=) Org.apache.catalina.core.JreMemoryLeakPreventionListener "/>", so that after the operation or not.

② search for the keyword "java.lang.NoSuchMethodError:org.apache.catalina.connector.Connector.setProtocol (ljava/lang/string;) V", No solution was found.

After ③ changed the new computer, my development tools, idea, MAVEN, Tomcat, JDK are all the latest downloads, The latest version of Tomcat (apache-tomcat-9.0.1), my colleague suggested I change to a tomcat, I'd better replace apache-tomcat-8.5.23.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.