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;
}
}