Search code examples
javajarexecutable-jarpojooracle-service-bus

Java Callout action Class testJar.CustomXpath does not exist


I'm trying to convert the java class to jar file to consume it in Oracle service bus, but when i'm trying to deploy the code im getting below error

[PipelinePairNode1, Request Pipeline, stage1, Java Callout action] Class testJar.CustomXpath does not exist

Below is my Java class,

    package testJar;

public class CustomXpath {
    public CustomXpath() {
        super();
    }

    public static String greeting(String name) {
        return "Hi "+name;
    }
}

What is the right method to export to jar with .class files, where i'm going wrong.

This issue is at deployment time only.

Please help.


Solution

  • I have resolved this issue by creating a maven project and exporting the jar by using below command.

    mvn clean install
    
    1. create maven project
    2. select packaging as jar
    3. build -> mvn clean install
    4. generated jar you may use in OSB for java callout activity.

    Hope this method helps if anyone is facing issue.