ich java 8
und tomcat 7
und maven 3.3.9
mit der Maven Tomcat-Plugin:tomcat7 + Maven Plugin: Tomcat wird nicht mit meinem Krieg beginnt
<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8085</port>
</configuration>
</plugin>
</plugins>
</build>
Eine Zeit lang alles funktionierte gut und tomcat7:run-war
gearbeitet.
Und jetzt bin ich diesen Fehler ohne ersichtlichen Grund bekommen:
[INFO] --- tomcat7-maven-plugin:2.2:run-war (default-cli) @ tomcat-example ---
[INFO] Running war on http://localhost:8085/tomcat-example
[INFO] Using existing Tomcat server configuration at /Users/shikloshi/java_workspace/webapp-examples/tomcat-example/target/tomcat
[INFO] create webapp with contextPath: /tomcat-example
Jul 04, 2016 2:30:45 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8085"]
Jul 04, 2016 2:30:45 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Tomcat
Jul 04, 2016 2:30:45 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.693s
[INFO] Finished at: Mon Jul 04 14:30:45 IDT 2016
[INFO] Final Memory: 17M/307M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run-war (default-cli) on project tomcat-example: Could not start Tomcat: Failed to start component [StandardServer[-1]]: Failed to start component [StandardService[Tomcat]]: Failed to start component [StandardEngine[Tomcat]]: Failed to start component [Realm[MemoryRealm]]: Memory database file /Users/shikloshi/java_workspace/webapp-examples/tomcat-example/target/tomcat/conf/tomcat-users.xml cannot be read -> [Help 1]
Dies ist der Fehler:
Tomcat: Failed to start component [StandardServer[-1]]: Failed to start component [StandardService[Tomcat]]: Failed to start component [StandardEngine[Tomcat]]: Failed to start component [Realm[MemoryRealm]]: Memory database file /Users/shikloshi/java_workspace/webapp-examples/tomcat-example/target/tomcat/conf/tomcat-users.xml cannot be read -> [Help 1]
Wer zum Schreiben des Katers Konfiguration in meinem Zielverzeichnis verantwortlich ist und warum Ist es nicht geschrieben?
auf welchem Port Sie ausgeführt haben, konfigurieren Sie tomcat in CATALINA_HOME/conf/server.xml ??? – emoleumassi
Dies ist kein Port-Problem, ich habe 8086 verwendet, aber das sind alte Protokolle. Irgendwie löschte ich alle Tomcat-Verzeichnis innerhalb des Zielverzeichnisses (es ist da, weil ich das Tomcat Maven-Plugin verwende) und es hat plötzlich funktioniert. – Shikloshi
Bitte überprüfen Sie, ob keine Tomcat-Instanz läuft. Dies könnte das Verzeichnis sperren und wenn Sie das Plugin starten, kann es nicht in die Datei schreiben, die irrtümlich erwähnt wurde. – walkeros