Are you adding commons-lang to the classpath? one thing to look out for is hive includes a section of commons-lang in hive-exec.jar which can make it problematic to get another commons-lang on the classpath.
Edward On Thu, Apr 5, 2012 at 5:09 PM, Tucker, Matt <[email protected]> wrote: > I’m trying to convert sanitized HTML data into standard HTML for a query, > and found that the Commons Lang project has existing methods to do this. I > downloaded the jar, with the thought of using the reflect() UDF to call the > unescapeHtml function, but it doesn’t work > (java.lang.ClassNotFoundException: > org.apache.commons.lang.StringEscapeUtils). > > > > add jar commons-lang3-3.1.jar; > > SELECT > > reflect("org.apache.commons.lang.StringEscapeUtils", "unescapeHtml", > htmlData) htmlData, > > COUNT(*) > > FROM TableName > > WHERE > > calendar_date >= '2012-03-29' AND > > calendar_date <= '2012-04-02' AND > > LOWER(htmlData) LIKE '%see%more%' > > GROUP BY reflect("org.apache.commons.lang.StringEscapeUtils", > "unescapeHtml", htmlData); > > > > I’m not yet familiar with reflect(), so I’m not sure if it’s an issue with > the jar that I’m adding or the reflect() statement. I get the same error if > I remove the aggregate function from the query. > > > > Matt Tucker > >
