I have no error when I am trying to call any method of the "Ursa_Routing_Output" object from the JNI code. But I am getting the same error when calling the constructor.
Problem with the Empty constructor
Exception in thread "Thread-23" java.lang.NoSuchMethodError: <init>
at com.comail.jni.UVSdk.getRPO(Native Method)
jclass jRpo=env->FindClass("com/comail/pojo/Ursa_Routing_Output");
if(jRpo==NULL)
{
printf("Class can't be found \n");
return NULL;
}
jmethodID test=env->GetMethodID(jRpo,"getAreaCommitment","()Ljava/lang/String;");
if(test==NULL)
{
printf("\nProblem with the Test Method \n");
return NULL;
}
jmethodID uroEmptyConst = env->GetMethodID(jRpo,"<init>","()v");
if(uroEmptyConst==NULL)
{
printf("\nProblem with the Empty constructor \n");
return NULL;
}
The corresponding methods in the Java class are :
public class Ursa_Routing_Output implements Serializable {
/**
* Class fields
*/
public Ursa_Routing_Output() {
super();
// TODO Auto-generated constructor stub
}
...........
............
public String getAreaCommitment() {
return AreaCommitment;
}
The corresponding class signatures generated through javap are :
public com.comail.pojo.Ursa_Routing_Output();
Signature: ()V
public java.lang.String getAreaCommitment();
Signature: ()Ljava/lang/String;
The code is able to find the class and its other methods. But it is not able to locate the constructor.
Can any one help me to locate the problem?