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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads