Maven Embedded Jetty Container fails to load Taglibs: Unable to initialize TldLocationsCache

I'm using the Maven Cargo Plugin to startup a Jetty web container for running some integration tests in a separate project module.

The problem i'm battling with occurs when i added taglibs into the jsp pages and tried hitting them from the integration tests. When jetty tries to compile the pages it fails with this error:

org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null

The web app works fine when run in an installed Tomcat container or standalone Jetty run through maven on the command line, so i think the problem must be down to something to do with how cargo embeds jetty and then how jetty compiles the app.

I've tried running in forked and unforked modes, adding the taglibs to the container classpath, explicitly defining taglibs in web.xml and having no config there...all to no avail.

Here's the test project i'm using to debug:


<?xml version='1.0' encoding='UTF-8'?>
<web-app version="2.4" xmlns=""



And the test module pom.xml:

<?xml version="1.0" encoding="UTF-8"?>">



        <!-- Integration Test Embedded Servlet Container -->

Here's the stacktrace from the error:

    2009-01-24 13:53:06.766::WARN:  /taglibs-test/index.jsp: 
org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: null
    at org.apache.jasper.compiler.TldLocationsCache.init(
    at org.apache.jasper.compiler.TldLocationsCache.getLocation(
    at org.apache.jasper.JspCompilationContext.getTldLocation(
    at org.apache.jasper.compiler.Parser.parseTaglibDirective(
    at org.apache.jasper.compiler.Parser.parseDirective(
    at org.apache.jasper.compiler.Parser.parseElements(
    at org.apache.jasper.compiler.Parser.parse(
    at org.apache.jasper.compiler.ParserController.doParse(
    at org.apache.jasper.compiler.ParserController.parse(
    at org.apache.jasper.compiler.Compiler.generateJava(
    at org.apache.jasper.compiler.Compiler.compile(
    at org.apache.jasper.compiler.Compiler.compile(
    at org.apache.jasper.compiler.Compiler.compile(
    at org.apache.jasper.JspCompilationContext.compile(

I've tracked this down to the following lines in jasper's TldLocationsCache:

   private void init() throws JasperException {
        if (initialized) return;
        try {
            initialized = true;
        } catch (Exception ex) {
            throw new JasperException(Localizer.getMessage(
                    "jsp.error.internal.tldinit", ex.getMessage()));

Any help is greatly appreciated!!



Bug report filed:

Need Your Help

Verify in app purchase receipt without external server?

iphone objective-c ios

I would like to verify an in-app purchase receipt by sending a JSON to, but im not sure how. I can find lots of tutorials on how to do it with a php server, but I...

Issues querying google sitemap.xml with Linq to XML

c# linq-to-xml google-sitemap

I have a Linq-2-XML query that will not work if a google sitemap that I have created has its urlset element populated with attributes but will work fine if there are no attributes present.