N
N
Nikolay Baranenko2017-03-08 22:46:40
IntelliJ IDEA
Nikolay Baranenko, 2017-03-08 22:46:40

Why does App Server stop, reason: javax.management.InstanceNotFoundException: Catalina:type=Server error occur when building a project?

Hello.
I have a project in Intellige IDEA trying to build it and getting an error

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

noticed that the error began to occur after I registered several virtual hosts in
server.xml
<Host name="example1"  appBase="webapps" unpackWARs="true" autoDeploy="true">
  <Alias>example1.newhost.org</Alias>

  <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
           prefix="example1_access_log" suffix=".txt"
           pattern="%h %l %u %t &quot;%r&quot; %s %b" />

  <Context path="" docBase="example1"
       debug="0" reloadable="true"/>
</Host>


<Host name="example2"  appBase="webapps" unpackWARs="true" autoDeploy="true">
  <Alias>example2.newhost.org</Alias>

  <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
           prefix="example2_access_log" suffix=".txt"
           pattern="%h %l %u %t &quot;%r&quot; %s %b" />

  <Context path="" docBase="example2"
       debug="0" reloadable="true"/>
</Host>


<Host name="example3"  appBase="webapps" unpackWARs="true" autoDeploy="true">
  <Alias>example3.newhost.org</Alias>

  <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
           prefix="example3_access_log" suffix=".txt"
           pattern="%h %l %u %t &quot;%r&quot; %s %b" />

  <Context path="" docBase="example3"
       debug="0" reloadable="true"/>
</Host>

if you remove the information about them, then the project is going normally.
What needs to be corrected so that the project builds normally and with information about the hosts?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2017-03-09
@zolt85

I'm not 100% sure, but it seems to me that tomcat expects exmple1.war in the webapps folder (and for other hosts by analogy). When you start tomcat from IDEA, it builds the application depending on the deployment settings in the tamcat-a launch configuration. Check the tomcat documentation for a description of virtual hosts. And the IDEA documentation for setting up the deployment.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question