| Author | Message | 
		
		  | kuladeep.dairy | 
			  
				|  Posted: Fri Dec 04, 2009 11:48 pm    Post subject: JNI Error |   |  | 
		
		  | Apprentice
 
 
 Joined: 11 Jul 2009Posts: 38
 
 
 | 
			  
				| Hi I am calling a java method from my ESQL. Procedure definitions look as below.  Please note that I am using WMB's jplugin2.jar for MbElement class. Please let me know if my JNI error is due to this jar usage. Many thanks. 
 CREATE PROCEDURE ESQLEvaluateXpath(IN ref REFERENCE,IN xpath CHARACTER )
 RETURNS CHAR
 LANGUAGE JAVA
 EXTERNAL NAME "com.ffic.epas.ESQLExt.ESQLEvaluateXpath";
 
 
 public static String ESQLEvaluateXpath(MbElement mbE, String xp)
 {
 String finalResult = "";
 
 Object obj = null;
 try{
 obj=mbE.evaluateXPath(xp);
 if (obj instanceof String) {
 finalResult = (String) obj;
 //System.out.print(finalResult);
 }else if (obj instanceof Boolean) {
 Boolean bResult= (Boolean) obj;
 finalResult=bResult.toString();
 }else if (obj instanceof Double)
 {
 Double dResult=(Double) obj;
 finalResult=dResult.toString();
 }else {
 finalResult = "Nothing";
 }
 }
 catch (Exception e) {
 
 finalResult ="exception";//todo
 }
 return finalResult;
 }
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | WMBDEV1 | 
			  
				|  Posted: Sat Dec 05, 2009 2:57 am    Post subject: |   |  | 
		
		  | Sentinel
 
 
 Joined: 05 Mar 2009Posts: 888
 Location: UK
 
 | 
			  
				| What JNI error? Did you not think including the details of the error would be useful? |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Sat Dec 05, 2009 5:00 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| Is this connected to this thread?  _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kuladeep.dairy | 
			  
				|  Posted: Sat Dec 05, 2009 12:57 pm    Post subject: |   |  | 
		
		  | Apprentice
 
 
 Joined: 11 Jul 2009Posts: 38
 
 
 | 
			  
				| I didnt get any other error. it just says JNI error. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | kuladeep.dairy | 
			  
				|  Posted: Sat Dec 05, 2009 12:58 pm    Post subject: |   |  | 
		
		  | Apprentice
 
 
 Joined: 11 Jul 2009Posts: 38
 
 
 | 
			  
				| Vitor. Yes.. I couldnt send a reply to that thread for some reason. So i had to create this one.. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Sat Dec 05, 2009 6:41 pm    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| kuladeep.dairy wrote: |  
	| Vitor. Yes.. I couldnt send a reply to that thread for some reason. So i had to create this one.. |  
 Then refer to your previous thread in this one so people have access to all the infomation.
 
 You should also stop updating the previous one, or it's going to get confusing. At best, information & advice will get split across the 2.
 
 You should also PM the Administrator with whatever error you were getting while trying to post, so a bug hunt can be initiated.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |