我正面临这个问题,当我使用Maven部署我的应用程序时,请提出一些解决方案。
错误日志,
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.790s
[INFO] Finished at: Wed Apr 23 10:44:13 IST 2014
[INFO] Final Memory: 54M/131M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project clustering.services: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre7\..\lib\tools.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :clustering.services
提前致谢。
设置JAVA_HOME
到jdk不到JDK_DIR/jre
,请参阅this问题,了解如何设置值
如果您使用的是Eclipse,请转到Windows-> Preferences。在Java-> Installed JREs下,双击列表中的项目并确保JRE主目录指向JDK(例如,将其设置为“C:\ Program Files \ Java \ jdk1.7.0_60”),然后离开其他一切都一样。
大声笑。也可以采用这种方案。
你的最后一台服务器是UP(可能是码头)。并且您正在部署(复制相同的源),运行相同的应用程序。
港口冲突
验证是否在pom.xml中指定了要在应用程序中执行的主类的名称。
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>com.enterprise.mainPacket.MainApp</mainClass>
</properties>
还要检查.fxml文件是否已重新定位,以便正确地寻址与之关联的控制器。 FX:控制器= “com.enterprise.mainPacket.FXMLController”
<VBox fx:id="vBMasterContainer" prefHeight="698.0" prefWidth="800.0" styleClass="theme" stylesheets="@/styles/style.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.enterprise.mainPacket.FXMLController">
确保源代码文件夹中没有空包。如果没有任何类,则会出现相同的错误
检查端口上是否存在冲突(另一个服务已在运行)!
我有同样的错误。我修复了java的路径,并错过了工具jar。我从另一个地方复制了它。之后一切正常。
我将pom.xml中的版本更改为1.2.1,错误已解决。