简体   繁体   中英

Error While invoking java code from javascript adapter

I am using IBM MobileFirst 7.1 and I am calling java code from Javascript adapter. But, I am getting error while calling adapter. Error is:

 {  
   "errors": [  
      "Ecma Error: TypeError: Cannot call property main1 in object [JavaPackage com.sample.customcode.SendMail]. It is not a function, it is \"object\". (2016-10- 
05T10:46:40.941Z\/74c15a587d1ce37bbfce9925722acab7b6321aad\/UsingJavaInAdapter-impl.js#19)"  
   ],    
   "info": [  
   ],  
   "isSuccessful": false,  
   "warnings": [  
    ]  
}   

I have changed Java compiler level to 1.6 as well as default JRE to 1.6 from 1.7.
But still I am facing same error. This code is working in one project in same eclipse workspace. But in another project this not working.

Make sure to also change the Java compiler level for the specific project. Right-click the project and select Properties -> Java Build Path -> Java Compiler.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM