October 10, 2017 at 9:45 am #539210
I don’t believe this issue is directly related to MyEclipse, but I’m baffled nonetheless.
I installed a local JAR File into my local maven repo for SPSS (since that JAR isn’t seemingly available elsewhere).
But at runtime that JAR throws an “error=2, No such file or directory” when running the code. The code that references the JAR compiles fine. In MyEclipse, the Maven dependencies all look good (no red) and MyEclipse’s Project libraries show the correct path to the JAR I added to the repo.
Also, the JAR file works correctly in standalone mode with a regular Java Application project (where it’s a regular local library file), but not in the Maven project where I added it to the repo.
Here’s the mvn command I used to install the JAR:
mvn install:install-file -Dfile=spssjavaplugin.jar -DgroupId=com.ibm -DartifactId=spssplugin -Dversion=23 -Dpackaging=jar
Here is the pom.xml referencing that same file (in MyEclipse, the entries are OK). The code referencing the JAR compiles)
Here’s the error at RUNTIME trying to access this JAR in code. I’m baffled about this error below.
“java.io.IOException: Cannot run program “/Users/mike/.m2/repository/com/ibm/spssjavaplugin/MacOS/StartXD.sh”: error=2, No such file or directory
The Error Stack:
java.io.IOException: Cannot run program “/Users/mike/.m2/repository/com/ibm/statistics/spssjavaplugin/MacOS/StartXD.sh”: error=2, No such file or directory
at com.ibm.statistics.plugin.XDAPI.start(Unknown Source)
at com.ibm.statistics.plugin.StatsUtil.start(Unknown Source)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
… 3 more
Can’t find anything online to help so I’m hoping someone there has seen this problem.
Thanks very much in advance for suggestions how to get around this issue.
– mOctober 12, 2017 at 12:19 am #539430
Please share with us some more details for further investigation.
1. The type of project i.e whether it is a Maven web/java project to which the jar is added as dependency.
2. It is not clear why the shell script is running from the maven local repo and not from the application’s files when built. Please share with us more details about how exactly you are running the project. Also let us know how you are running the project for the case where the jar works.
I suggest you also cross post to development forums like stackoverflow.com for better help from the developer community.