Torque
  1. Torque
  2. TORQUE-73

Missing log4j.jar for Torque Generator?

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3-RC1
    • Fix Version/s: 3.3
    • Component/s: Generator
    • Labels:
      None
    • Environment:
      Windows XP

      Description

      1. I have downloaded the Torque 3.3 (RC1) Generator package.
      2. I want to run the jdbc target; I set all properties as required in the build.properties file
      3. I set my ANT_HOME and JAVA_HOME (ANT 1.6.4 from Eclipse, JDK 1.5)
      4. I execute ant -f build-torque.xml jdbc (actually, any other target has the same problem)
      5. I receive a velocity error

      6. I install log4j.jar into the lib directory
      7. It works!

      Maybe I am missing something, and it should work without log4j, but in my environment it does not.

        Activity

        Hide
        CG Monroe added a comment -

        Hmm, I think I found the problem here. Velocity 1.3 has a runtime dependancy on having at least one of three logging mechanisms available, log4j, logkit, or avalon-logkit. In the past, we supplied the logkit-1.01.jar as a dependency. But this has been dropped from the new version. (not sure why).

        Adding log4j resolved the Velocity runtime dependancy but I'm not sure if this is the correct solution.

        Anyone have good insight on which logging jar we should add back in? I think Thomas V was using the new Avalon-Logkit? Should we go to that as newer than the old original logkit?

        Show
        CG Monroe added a comment - Hmm, I think I found the problem here. Velocity 1.3 has a runtime dependancy on having at least one of three logging mechanisms available, log4j, logkit, or avalon-logkit. In the past, we supplied the logkit-1.01.jar as a dependency. But this has been dropped from the new version. (not sure why). Adding log4j resolved the Velocity runtime dependancy but I'm not sure if this is the correct solution. Anyone have good insight on which logging jar we should add back in? I think Thomas V was using the new Avalon-Logkit? Should we go to that as newer than the old original logkit?
        Hide
        Thomas Vandahl added a comment -

        I'd add the log4j.jar. The Torque generator has no other Avalon dependencies and log4j is quite common in other projects.

        Show
        Thomas Vandahl added a comment - I'd add the log4j.jar. The Torque generator has no other Avalon dependencies and log4j is quite common in other projects.
        Hide
        Thomas Fox added a comment -

        I'd also add the log4j dependency. What concerns me more is that we did not notice the problem before. Somehow the dependency is not needed if the generator is run via the maven plugin, probably because maven provides a logger itself.
        But for the next version, we should male the test project executable for all build methods we support (ant, maven1, maven2) to be able to spot such errors.

        Show
        Thomas Fox added a comment - I'd also add the log4j dependency. What concerns me more is that we did not notice the problem before. Somehow the dependency is not needed if the generator is run via the maven plugin, probably because maven provides a logger itself. But for the next version, we should male the test project executable for all build methods we support (ant, maven1, maven2) to be able to spot such errors.
        Hide
        Thomas Fox added a comment -

        Added log4j-1.2.14 to the dependencies and verified that it shows up in the lib directory when building a distribution.

        Show
        Thomas Fox added a comment - Added log4j-1.2.14 to the dependencies and verified that it shows up in the lib directory when building a distribution.

          People

          • Assignee:
            Unassigned
            Reporter:
            Joerg Friedrich
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development