0

I was trying to run hibernate core java tests inside a container using gradle. I am getting this error during gradlew test.

Task :hibernate-core:compileTestJava FAILED FAILURE: Build failed with an exception. * What went wrong: Failed to capture fingerprint of input files for task ':hibernate-core:compileTestJava' property 'source' during up-to-date check. > Failed to create MD5 hash for file '/hibernate-orm/hibernate-core/src/test/java/org/ hibernate/internal/util/hib3rnat3/C0nst4nts???.java' as it does not exist. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. 

How do I resolve this?

The actual name of the file is: /hibernate-orm/hibernate-core/src/test/java/org/hibernate/internal/util/hib3rnat3/C0nst4nts३.java So the issue I think could be due to filename encoding problem and it is not able to resolve character and hence the error.

I think I can rule out the possibility of ? being used as wildcard character here because md5sum works fine with it. At least bash has no problem with it, gradle might have.

root@9eec67a60ee5:/hibernate-orm/hibernate-core# md5sum /hibernate-orm/hibernate-core/src/test/java/org/hibernate/internal/util/hib3rnat3/C0nst4nts???.java c2474fdef0224623dccd2615049b2bc8 /hibernate-orm/hibernate-core/src/test/java/org/hibernate/internal/util/hib3rnat3/C0nst4nts३.java 

Another difference between the logs on the host and in container is:

At least one daemon option is different. Wanted: DefaultDaemonContext[uid=null,javaHome=/jvm/jdk1.8.0_211,daemonRegistryDir=/root/.gradle/daemon,pid=10183,idleTimeout=null,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=US-ASCII,-Duser.country=US,-Duser.language=en,-Duser.variant] Actual: DefaultDaemonContext[uid=4e16e139-fd03-47b2-95b4-92da7853825f,javaHome=/jvm/jdk1.8.0_211,daemonRegistryDir=/root/.gradle/daemon,pid=9578,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=utf-24,-Duser.country=US,-Duser.language=en,-Duser.variant] Looking for a different daemon... 

The difference between expected and actual here is the file.encoding.

1 Answer 1

1

You need to generate a locale such as en_US.UTF-8 inside the container by

$ locale-gen en_IN.utf-8

and then change the value of env var $LANG

$ export LANG=en_US

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.