Error when setting up Java Code

vshivk99
vshivk99 Member Posts: 13

Hi, When I am setting up the BasicReplier and BasicRequestor code in STS, I am getting below error No "exception of type JCSMPException can be thrown; an exception type must be a subclass of Throwable" in design time. Am I missing anything or any jar file? I just coped the BasicReplier and BAsicRequestor code and I cannot run ./gradlew assemble as I dont have access tot in my network.

Tagged:

Comments

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 959 admin

    Hi @vshivk99,
    Hoping to help, but can you share what BasicReplier and BasicRequestor you are trying to use?
    In general you'll need all the dependencies specified in the build.gradle file to be local if your machine can't reach out to the online repos to access them.

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 634 admin

    Hi @vshivk99 ... I'm assuming (??) that you are looking at the JCSMP samples? Or are you looking at specific Spring samples??

    If you don't have access to a network to allow Gradle to download the required JARs, then you'll need to manually copy in the required JARs and place them in a lib folder or something similar to use. Main ones you'll need can be downloaded from https://solace.com/downloads, the Java/JCSMP API, and then modify the build.gradle file by changing the repositories section:

    repositories {
        mavenCentral()
        jcenter()
        flatDir {      // temporary until new API is moved to central repo
            dirs 'lib'  // create a 'lib' folder and copy all required JARs in
        }
    }
    

    Or have Eclipse or whatever build the samples once you get the required JARs downloaded.

    Good luck!

  • vshivk99
    vshivk99 Member Posts: 13

    Thanks for the response