Jetspeed 2
  1. Jetspeed 2
  2. JS2-462

Need to clean up Velocity logs, too many warnings and some errors even

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-FINAL
    • Fix Version/s: 2.1-dev, 2.1
    • Component/s: Layout
    • Labels:
      None
    • Environment:
      Tomcat 5.5.12 under windows 2000

      Description

      There are too many warnings and some error messages in velocity.log. Need a clean up.

        Activity

        Hide
        Ate Douma added a comment -

        One of the error messages is that the default global Velocity macros file VM_global_library.vm isn't found.
        Because Jetspeed doesn't provide this file, I've fixed this by correcting the initialization of the default Velocity instance during VelocityViewServlet initialization,
        as well as correcting Spring assembly of Velocity Engines for the adminVelocityEngine and the AjaxVelocityEngine like this:

        <bean id="adminVelocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
        <property name="resourceLoaderPath"><value>/WEB-INF/templates/</value></property>
        <property name="velocityProperties">
        <props>
        <!-- clear out default global VM_global_library.vm leading to ERROR logging because its not available -->
        <prop key="velocimacro.library"></prop>
        </props>
        </property>
        </bean>

        Show
        Ate Douma added a comment - One of the error messages is that the default global Velocity macros file VM_global_library.vm isn't found. Because Jetspeed doesn't provide this file, I've fixed this by correcting the initialization of the default Velocity instance during VelocityViewServlet initialization, as well as correcting Spring assembly of Velocity Engines for the adminVelocityEngine and the AjaxVelocityEngine like this: <bean id="adminVelocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean"> <property name="resourceLoaderPath"><value>/WEB-INF/templates/</value></property> <property name="velocityProperties"> <props> <!-- clear out default global VM_global_library.vm leading to ERROR logging because its not available --> <prop key="velocimacro.library"></prop> </props> </property> </bean>
        Hide
        Ate Douma added a comment -

        Fixed many common Velocity usage (and logging) problems.
        Velocity is by no means perfect and it still produces WARNING and ERROR messages which really can be ignored.
        Hopefully with the next version 1.5 it will have become a bit cleaner...

        Show
        Ate Douma added a comment - Fixed many common Velocity usage (and logging) problems. Velocity is by no means perfect and it still produces WARNING and ERROR messages which really can be ignored. Hopefully with the next version 1.5 it will have become a bit cleaner...

          People

          • Assignee:
            Ate Douma
            Reporter:
            Yang Sie
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development