Error upon using UserAgent

One Star

Error upon using UserAgent

Hi,
I am encountering an error upon creating user defined function for TMAP.
It says,
Exception in thread "main" java.lang.Error: java.lang.NoClassDefFoundError: eu/bitwalker/useragentutils/UserAgent

This is my function:
package routines;
import eu.bitwalker.useragentutils.UserAgent;
public class getUserAgent {
/**
* getBrowser returns browser used for the specified userAgentString
*
*
* {talendTypes} String
*
* {Category} User Defined
*
* {param} string("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)") input: The string need to be printed.
*
* {example} helloExemple("world") # hello world !.
*/
public static String getBrowser(String userAgentString) {
UserAgent agent = UserAgent.parseUserAgentString(userAgentString);
String browser = String.valueOf(agent.getBrowser());
return browser;
}
}
Community Manager

Re: Error upon using UserAgent

Hi
The error indicates the external jar used in this routine is missing, right click on the routine and select 'Edit routine dependencies' option import your external jar.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Error upon using UserAgent

i already did that, but still that error appears
Community Manager

Re: Error upon using UserAgent

Hi
Which version are you using? Not sure it was a bug, do you mind to email your jar to me for a quick testing on my side?
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business