OSGeo / PROJ-JNI

Java Native Interface for PROJ
https://osgeo.github.io/PROJ-JNI/
MIT License
23 stars 15 forks source link

The data present in the reparse point buffer is invalid. #73

Closed jigneshhadiya2 closed 6 months ago

jigneshhadiya2 commented 6 months ago

[exec] Error: could not load cache [exec] Result: 1

An Ant BuildException has occured: The following error occurred while executing this line: [ERROR] E:\Demo\PROJ-JNI\src\main\cpp\build.xml:59: Failed to create symlink E:\Demo\PROJ-JNI\target/target to target [ERROR] around Ant part ...... @ 7:106 in E:\Demo\PROJ-JNI\target\antrun\build-main.xml: E:\Demo\PROJ-JNI\target\target -> : The data present in the reparse point buffer is invalid.

desruisseaux commented 6 months ago

Does this error occurs on a clean build (e.g. after mvn clean or after a fresh clone), or when rebuilding a second time?

I'm not sure if it will make a difference, but you may try to edit src/main/cpp/build.xml around the line 55:

    <symlink overwrite="true" resource="${toString:native-binary}"
             link="${basedir}/${native-binary-filename}"/>`

and try to replace the / character by \ (the file separator on Window systems). If it works, I would like to know in order to improve that Ant script.

jigneshhadiya2 commented 6 months ago

The following error occurred while executing this line: E:\Demo\PROJ-JNI\src\main\cpp\build.xml:59: Failed to create symlink E:\Demo\PROJ-JNI\target\target to target

E:\Demo\PROJ-JNI\target\target -> : The data present in the reparse point buffer is invalid.

Same issue again

desruisseaux commented 6 months ago

Can you try to delete completely the <symlink> element? It was provided for convenience, but I think it is not essential.

jigneshhadiya2 commented 6 months ago

Found another issue with symlink

An Ant BuildException has occured: Failed to create symlink E:\Demo\PROJ-JNI\target/test-classes/org/osgeo/proj/PROJ-JNI to target around Ant part ...... @ 8:155 in E:\Demo\PROJ-JNI\target\antrun\build-main.xml: E:\Demo\PROJ-JNI\target\test-classes\org\osgeo\proj\PROJ-JNI -> : The data present in the reparse point buffer is invalid.

don't know how can i remove symlink from here

desruisseaux commented 6 months ago

Strangely, I could reproduce this error when executing Maven with the -Dmaven.test.skip=true option, but not with a plain mvn clean package. Which command did you used?

jigneshhadiya2 commented 6 months ago

Issue is happening with mvn clean package also

desruisseaux commented 6 months ago

The second symlink was needed for test execution only, so I was hopping that by skipping tests, the build would not try to create the link. We may try one more drastic action: in the pom.xml file, delete completely the <execution> section having <id>build-tests</id> (around lines 210 to 221). Then try mvn clean package -DskipTests.

jigneshhadiya2 commented 6 months ago

It worked, Thanks.😊

desruisseaux commented 6 months ago

Removed (for next release) the first symbolic link which was provided only for convenience purpose. The second symbolic link, created for testing purposes, it not yet removed because we have no good replacement. We may revisit after Maven 4 is ready.

Teyson commented 5 months ago

This would be very helpful to put in the readme! I have spent alot of hours trying to resolve this very same issue.