[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6932) Quick Start basic tutorial test fails
Peter Lynch (JIRA)
noreply at atlassian.com
Mon Jan 2 16:51:19 EST 2012
Quick Start basic tutorial test fails
-------------------------------------
Key: HHH-6932
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6932
Project: Hibernate Core
Issue Type: Bug
Components: testsuite
Affects Versions: 4.0.0.Final
Reporter: Peter Lynch
The basic tutorial included with the version 4.0.0.Final download includes a JUnit test which fails when executed.
Steps to reproduce:
1. Download and extract version 4.0.0.Final from http://sourceforge.net/projects/hibernate/files/hibernate4/4.0.0.Final/
2. Unzip \documentation\quickstart\en-US\html\files\hibernate-tutorials.zip
3. Navigate to the extract directory and open command prompt at the \basic subdirectory
4. Type mvn clean test
Expected behaviour:
Test runs successfully
Actual behaviour:
"resource: org/hibernate/tutorial/hbm/Event.hbm.xml not found". Stacktrace:
E:\java\hibernate-tutorial\basic>mvn test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Hibernate hbm.xml Tutorial 4.0.0.Final
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ hibernate-tutorial-hbm ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory E:\java\hibernate-tutorial\basic\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ hibernate-tutorial-hbm ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ hibernate-tutorial-hbm ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory E:\java\hibernate-tutorial\basic\src\main\java
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ hibernate-tutorial-hbm ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 2 source files to E:\java\hibernate-tutorial\basic\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ hibernate-tutorial-hbm ---
[INFO] Surefire report directory: E:\java\hibernate-tutorial\basic\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.hibernate.tutorial.hbm.NativeApiIllustrationTest
3/01/2012 10:37:55 AM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
3/01/2012 10:37:55 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.0.0.Final}
3/01/2012 10:37:55 AM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
3/01/2012 10:37:55 AM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
3/01/2012 10:37:55 AM org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
3/01/2012 10:37:55 AM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
3/01/2012 10:37:55 AM org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: org/hibernate/tutorial/hbm/Event.hbm.xml
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.171 sec <<< FAILURE!
Results :
Tests in error:
testBasicUsage(org.hibernate.tutorial.hbm.NativeApiIllustrationTest): resource: org/hibernate/tutorial/hbm/Event.hbm.xml not found
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.344s
[INFO] Finished at: Tue Jan 03 10:37:55 NZDT 2012
[INFO] Final Memory: 7M/17M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.2:test (default-test) on project hibernate-tutoria
l-hbm: There are test failures.
[ERROR]
[ERROR] Please refer to E:\java\hibernate-tutorial\basic\target\surefire-reports for the individual test results.
[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/MAVEN/MojoFailureException
Suggested fix:
Move the Event.hbm.xml from \basic\src\test\java\org\hibernate\tutorial\hbm\ to \basic\src\test\resources\org\hibernate\tutorial\hbm\
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list