i have followed this document module 5.5 in this url \"http://www.ibm.com/developerworks/mobile/worklight/getting-started.html#authentication\" or ftp://public.dhe.ibm.com
I just figured this out. It's funny how everyone went silent on this issue for two months. For me it wasn't obvious at all because it works in some projects and simply doesn't in others. The same is true for machines. It'll work one place, but not another (if you're not aware of what's going on).
Check your .project file and make sure it has the right buildCommand tags in it.
org.eclipse.jdt.core.javabuilder
org.eclipse.wst.jsdt.core.javascriptValidator
org.eclipse.wst.common.project.facet.core.builder
com.worklight.studio.plugin.WorklightProjectBuilder
org.eclipse.wst.validation.validationbuilder
Read more at: ECMA TypeError calling Java class from Worklight adapter