Announcement

Collapse
No announcement yet.
X
  • 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):
    Code:
    SCHWERWIEGEND: Allocate exception for servlet [RESTHandler]
    java.lang.ClassNotFoundException: freemarker.cache.TemplateLoader
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1407)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
        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(DefaultInstanceManager.java:150)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1070)
        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:788)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:128)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
        at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:289)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:359)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:889)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1743)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
        at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown 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
    Blama

    #2
    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.

    Comment


      #3
      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
      Blama

      Comment


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

        Comment


          #5
          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
          Blama

          Comment


            #6
            Hi Isomorphic,

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

            Best regards
            Blama

            Comment

            Working...
            X