No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Can freemarker.cache.TemplateLoader exception for RESTHandler be related to my SmartGWT upgrade from 12.0p to 12.1p?

    Hi Isomorphic,

    I'm in the process of updating from v12.0p_2020-03-11 to v12.1p_2022-06-03.
    The normal application seems to run fine to far. Right now I'm trying to access RESTHandler and get this exception when doing so (1st GET to /RESTHandler):
    SCHWERWIEGEND: Allocate exception for servlet [RESTHandler]
    java.lang.ClassNotFoundException: freemarker.cache.TemplateLoader
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
        at java.lang.Class.getConstructor0(Unknown Source)
        at java.lang.Class.getConstructor(Unknown Source)
        at org.apache.catalina.core.DefaultInstanceManager.newInstance(
        at org.apache.catalina.core.StandardWrapper.loadServlet(
        at org.apache.catalina.core.StandardWrapper.allocate(
        at org.apache.catalina.core.StandardWrapperValve.invoke(
        at org.apache.catalina.core.StandardContextValve.invoke(
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
        at org.apache.catalina.core.StandardHostValve.invoke(
        at org.apache.catalina.valves.ErrorReportValve.invoke(
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(
        at org.apache.catalina.valves.rewrite.RewriteValve.invoke(
        at org.apache.catalina.core.StandardEngineValve.invoke(
        at org.apache.catalina.connector.CoyoteAdapter.service(
        at org.apache.coyote.http11.Http11Processor.service(
        at org.apache.coyote.AbstractProcessorLight.process(
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$
        at org.apache.tomcat.util.threads.TaskThread$
        at Source)
    I know that you are not in the Stack trace, but could this be related to a change between versions? I did not read anything about freemarker in the docs, so I'm a bit confused.
    What I do is to compile my application with 12.0p and 12.1p and deploy them both under different subdomains on my local Tomcat 9.0.31.
    It also happens if I just deploy the new 12.1p version.
    Both have the same (apart from bumped version numbers) 100 jars in the ROOT\WEB-INF\lib folder.

    I'll investigate further, but if this means anything to you, please let me know.

    Best regards

    We do include freemarker-2.3.30.jar with the SC 12.1 Power SDK download, as it's required for the server framework (yes by RESTHandler). So perhaps somehow that JAR didn't get deployed? You may want to ensure that all JARs included with the SDK got deployed.


      Hi Isomorphic,

      thanks, that will help.
      You are right, I did not deploy it, apart from bumped versions I deployed the same jars as with 12.0p.
      Please note that freemarker is not listed as dependency in JavaModuleDependencies. Of course I try to deploy as little jars as possible (faster build, faster upload, faster deploy, less confusion) and I'm pretty sure that you gave the tip to strip the deployed jars to a minimum somewhere else. This tip is still current, right? And the benefit of JavaModuleDependencies-docs is to know what to deploy, right?

      FYI: I checked differences between the Javadocs for 12.0p and 12.1 and noticed that apart from fixes the 12.1 version also includes broken javadoc markup resulting in html in the document (<style>....)

      Best regards


        Thanks for letting us know - we'll make sure the documentation problems get resolved


          Hi Isomorphic,

          I can see that the 13.0p docs now mention freemarker, but the 12.1p docs, where the dependency was introduced, do not so, yet. Also, the 12.1p docs still have the broken markup.

          Best regards


            Hi Isomorphic,

            I can see that the 12.1p docs are updated now as well, thanks.

            Best regards