idea2017 web应用Debug运行时,启动tomcat调试出错javax.management.InstanceNotFoundException: Catalina:type=Server

Seanx 发布于 2017/08/18 17:24
阅读 4K+
收藏 0

idea2017 web应用Debug运行时,启动tomcat调试出错:

Application Server was not connected before run configuration stop, reason: javax.management.InstanceNotFoundException: Catalina:type=Server

找了多个答案不能解决,后用排除解决方式:Tomcat8.5的server.xml里的配置问题。

临时配置了二级域名:

<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

        <!-- SingleSignOn valve, share authentication between web applications
             Documentation at: /docs/config/valve.html -->
        <!--
        <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
        -->

        <!-- Access log processes all example.
             Documentation at: /docs/config/valve.html
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />

      </Host>
	  
	   <Host name="m.testdev.com" debug="0" appBase=""
        unpackWARs="true" 
        xmlValidation="false" xmlNamespaceAware="false">

         <Alias>m.testdev.com</Alias>

        <Context path="" docBase="D:\Tomcat85\otherweb\FirstWeb"  reloadable="true" caseSensitive="false" debug="0"></Context>
      </Host>

 

<Host name="m.testdev.com" debug="0" appBase=""
        unpackWARs="true" 
        xmlValidation="false" xmlNamespaceAware="false">这一段移除了,IDE启动tomcat调试正常。

问题:现在只是找到原因,请问能说明一下为什么?

 

加载中
返回顶部
顶部