- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这次开始学一个Hiberante,mvn compile
编译报错:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building First Hibernate Tutorial 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ hibernate-tutorial --
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ hibernate-tutorial ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\Dokumente und Einstellungen\Ettling\tutorial-hibernate\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] \Dokumente und Einstellungen\Ettling\tutorial-hibernate\src\main\java\org\hibernate\tutorial\util\HibernateUtil.java:[17,89] error: cannot find symbol
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.344s
[INFO] Finished at: Wed Jun 19 17:53:44 CEST 2013
[INFO] Final Memory: 8M/23M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:compile (default-compile) on project hibernate-tutorial: Compilation failure
[ERROR] \Dokumente und Einstellungen\Ettling\tutorial-hibernate\src\main\java\org\hibernate\tutorial\util\HibernateUtil.java:[17,89] error: cannot find symbol
[ERROR] -> [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/MAVE/MojoFailureException
我也是 Maven 的新手,所以这对我来说有点困难。
和HibernateUtil
类代码
package org.hibernate.tutorial.util;
import org.hibernate.HibernateException;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;
public class HibernateUtil {
public static final SessionFactory SESSION_FACTORY = buildSessionFactory();
private static SessionFactory buildSessionFactory() throws HibernateException {
Configuration configuration = new Configuration();
configuration.configure();
ServiceRegistry serviceRegistry =
new ServiceRegistryBuilder().applySettings(configuration.getProperties()).buildServiceRegistry();
return configuration.buildSessionFactory(serviceRegistry);
}
}
如果我目前理解这门课的问题,但我真的无法理解缺少哪个符号。
谢谢你的时间。
最佳答案
问题解决了。这是 maven bug .您也可以使用 JDK 6 来解决这个问题。
关于java - hibernate 教程。 Maven 编译时出现 MojoFailureException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17196281/
我已经使用参数配置了 Maven Surefire 插件: 60 因此,当测试运行超过 60 秒时,surefire 插件会中断它。 当我使用 mvn test 或 mvn install 时
这次开始学一个Hiberante,mvn compile编译报错: [INFO] Scanning for projects... [INFO] [INFO] --------------------
当我在 eclipse clean+Build 中使用 ANT 时,它不会给我任何错误/问题。 但是,当我使用 Maven 构建时,会出现以下错误: [INFO] Scanning for proje
当我尝试为我的 WAR 项目运行命令 mvn archetype:create-from-project 时,在读取 .java 文件后会显示此异常: [ERROR] Failed to execut
AbstractMavenMojo 的执行方法声明它抛出两个异常:MojoExecutionException 和 MojoFailureException。抛出任一结果都会导致构建停止,并且日志在每
尝试在 Maven/Springboot 项目中运行(集成)测试时出现错误。我得到一个 initializationError >> NoClassDefFound在我要初始化的对象上。 错误日志:
我已经安装了 maven 2 并按照下面链接中提到的教程进行操作 maven.apache.org/guides/getting-started/maven-in-five-minutes.html
我是一名优秀的程序员,十分优秀!