3

I am trying to build the hibernate-orm from the source in GitHub: https://github.com/hibernate/hibernate-orm.

I followed the "quickstart" guideline, in the GitHub site:

git clone git://github.com/hibernate/hibernate-orm.git
cd hibernate-orm
./gradlew clean build
The build requires a Java 8 JDK as JAVA_HOME, but will ensure Java 6  compatibility.

However, I got the following error:

FAILURE: Build failed with an exception.

  • Where:

Build file '/Users/salee/git/hibernate-orm/build.gradle' line: 291

  • What went wrong:

A problem occurred configuring project ':hibernate-c3p0'.

A problem occurred configuring project ':hibernate-core'.

Cannot get property 'absolutePath' on null object

Would anyone help me?

Community
  • 1
  • 1
salee
  • 189
  • 1
  • 1
  • 9

2 Answers2

1

This sounds like a broken build. In which case, your best option may be to raise an issue in Hibernate's GitHub project and attach the output of

./gradlew --stacktrace clean build

Alternatively, pull the latest code and try again. It seems unlikely that the build will stay broken for long and it may already have been fixed.

Peter Ledbrook
  • 4,302
  • 1
  • 21
  • 18
0

I have resolved the problem. It is because of my Mac environment, where rt.jar is classes.jar: What is the use of rt.jar file in java? [duplicate]

By typing "./gradlew --stacktrace clean build," I found the null error occurs at the line 156 of HibernateBuildPlugin.groovy.

javaCompileTask.options.bootClasspath = java6Home.runtimeJar.absolutePath

I found that the runtimeJar becomes null, and modified the line to

javaCompileTask.options.bootClasspath = "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar"

Then,the building of hibernate-orm was successful.

Community
  • 1
  • 1
salee
  • 189
  • 1
  • 1
  • 9