From Thursday, July, 9, 3:00 PM Pacific,
our Community site will be in
read-only mode
through Sunday, July 12th.
Thank you for your patience.

Error upon using UserAgent

Highlighted
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;
}
}
Highlighted
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
Highlighted
One Star

Re: Error upon using UserAgent

i already did that, but still that error appears
Highlighted
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 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog