Other Software and Data

 View Only
  • 1.  Data Experience SDK

    Posted 01-07-2022 16:43
    Edited by Steve Ogden 01-07-2022 17:14
    I am having problems with the Data Experience Java SDK sample program.

    I have modified the pom.xml file per the README:

    And have installed the SDK jar in the local maven repo:
    mvn install:install-file -Dfile="C:\Users\myuser\Precisely\precisely-pdx-sdk-3.0.2-full.jar" -DgroupId="com.precisely.pdx" -DartifactId="precisely-pdx-sdk" -Dversion="3.0.2" -Dpackaging="jar"

    Then build it: mvn clean package

    No errors on build.

    Then run it:
    java -jar pdx-sdk-sample-commandline-3.0.2-full.jar -lp -a myapikey -s mysecretkey

    The result:
    Exception in thread "main" java.lang.NoClassDefFoundError: com/precisely/pdx/sdk/DataDeliveryClient

    I examined the full jar produced by maven using 'jar -tf' and there is no sign of any of the SDK classes in it. Something not right about that. Being a 'full' jar it should have all classes used by the project in it.

    I have also tried running with the SDK on the classpath:
    java -classpath "C:\Users\myuser\Precisely\precisely-pdx-sdk-3.0.2-full.jar" -jar pdx-sdk-sample-commandline-3.0.2-full.jar -lp -a myapikey -s mysecretkey

    Same results. Has anyone else tried using this or can anyone spot what I am doing wrong?

    Steve Ogden
    Knowledge Community Shared Account

  • 2.  RE: Data Experience SDK

    Posted 01-13-2022 10:15
    I fixed this by removing the lines for scope and systemPath from the pom.xml

    Steve Ogden
    Knowledge Community Shared Account