Unresolved symbols when compiling jasper report
<p>When I attempt to compile a jrxml file created in jasper studio v6.2.0, using the jasperreports 6.2.1 library, I get the following errors:</p>

<pre><code>net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
/home/david_clymer/Development/VistaShare/OutcomeTracker/HUD329902_1461778704578_563528.java:477: error: cannot find symbol
                value = CONCATENATE(((java.lang.String)field_ns058Agency_Physical_City.getValue()),",",((java.lang.String)field_ns058Agency_Physical_State.getValue()),"  ",((java.lang.String)field_ns058Agency_Ph
ysical_Zip.getValue())); //$JR_EXPR_ID=40$
                        ^
  symbol:   method CONCATENATE(String,String,String,String,String)
  location: class HUD329902_1461778704578_563528

...

9 errors
.
        at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:215)
        at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:357)
        at net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:273)
        at net.sf.jasperreports.engine.JasperCompileManager.compileToFile(JasperCompileManager.java:232)
        at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:542)
        at RunReport.compileReport(RunReport.java:80)
        at RunReport.main(RunReport.java:192)
</code></pre>

<p><strong>How do I ensure that these functions are imported and available?</strong></p>

<p>This is the debugging I've done so far:</p>

<p>According to my googling, this results from the absence of <code>jasperreports-functions-6.2.1.jar</code> in the java classpath. However, in my case it most definitely <em>is</em> in the classpath, and testing shows that its classes are accessible, but the methods are not:</p>

<pre><code>// Imports without error
import net.sf.jasperreports.functions.standard.TextFunctions;

public class Foo {
    public static void main(String[] args) {
        // Cannot resolve symbol INTEGER_VALUE
        Object foo = TextFunctions.INTEGER_VALUE;
    }
}
</code></pre>

<p>Decompiling the relevant class shows that the method is indeed there:</p>

<pre><code>david_clymer@zapazoid:~/Development/VistaShare/OutcomeTracker/jasperreports/lib/tmp$ jar -xf ../jasperreports-functions-6.2.1.jar 
david_clymer@zapazoid:~/Development/VistaShare/OutcomeTracker/jasperreports/lib/tmp$ java -jar ../../../procyon-decompiler-0.5.30.jar net/sf/jasperreports/functions/standard/TextFunctions.class |grep -A 7 INTEGER_VALUE
    @Function("INTEGER_VALUE")
    @FunctionParameters({ @FunctionParameter("textNumber") })
    public static Integer INTEGER_VALUE(final String textNumber) {
        if (textNumber == null) {
            logNullTextString();
            return null;
        }
        return Integer.parseInt(textNumber);
    }

david_clymer@zapazoid:~/Development/VistaShare/OutcomeTracker/jasperreports/lib/tmp$ grep TextFunctions jasperreports_extension.properties 
net.sf.jasperreports.extension.functions.text=net.sf.jasperreports.functions.standard.TextFunctions
</code></pre>

<p>I'm not really a java programmer, so maybe I'm doing something stupid. I just don't know how to reference the methods properly so that I can be <em>sure</em> that they <em>should</em> work.</p>

<p><strong>Update</strong>: using a static import:</p>

<pre><code>import static net.sf.jasperreports.functions.standard.TextFunctions.*
</code></pre>

<p>Allows those functions to be imported into the current namespace.</p>

<p>So, back to the original issue. If set <code>net.sf.jasperreports.compiler.keep.java.file=true</code> in <code>jasperreports.properties</code> and attempt to compile the report, I can examine the java file that jasper produces from the jrxml. I find that this file does not seem to import the necessary functions (<code>INTEGER_VALUE</code>, <code>CONCATENATE</code>, etc). The only imports it contains are:</p>

<pre><code>/*
 * Generated by JasperReports - 4/27/16 2:27 PM
 */
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.fill.*;
import net.sf.jasperreports.functions.standard.TextFunctions.*;

import java.util.*;
import java.math.*;
import java.text.*;
import java.io.*;
import java.net.*;
</code></pre>