Other Software and Data

 View Only
  • 1.  Data Experience SDK

    Posted 21 days ago
    Edited by Steve Ogden 21 days ago
    I am having problems with the Data Experience Java SDK sample program.

    I have modified the pom.xml file per the README:
    <dependency>
    <groupId>com.precisely.pdx</groupId>
    <artifactId>precisely-pdx-sdk</artifactId>
    <version>${project.version}</version>
    <scope>system</scope>
    <systemPath>C:/Users/myuser/Documents/JavaProjects/Precisely/precisely-pdx-sdk-3.0.2-full.jar</systemPath>
    </dependency>

    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 15 days ago
    I fixed this by removing the lines for scope and systemPath from the pom.xml

    ------------------------------
    Steve Ogden
    Knowledge Community Shared Account
    ------------------------------