facebook

Maven project Issue

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #539210 Reply

    Mork
    Participant

    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)
    <dependency>
    <groupId>com.ibm.statistics</groupId>
    <artifactId>spssjavaplugin</artifactId>
    <version>1.0</version>
    </dependency>

    ———

    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 java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
    at com.ibm.statistics.plugin.XDAPI.start(Unknown Source)
    at com.ibm.statistics.plugin.StatsUtil.start(Unknown Source)
    at spsssimple.Test.main(Test.java:10)
    Caused by: java.io.IOException: error=2, No such file or directory
    at java.lang.UNIXProcess.forkAndExec(Native Method)
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
    at java.lang.ProcessImpl.start(ProcessImpl.java:134)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
    … 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.

    – m

    #539430 Reply

    support-swapna
    Moderator

    Mork,

    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.

    –Swapna
    MyEclipse Support

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Maven project Issue

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in