Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1261

"rest endpoint-from-entity" fails, ClassNotFoundException: org.apache.log4j.Priority

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 1.4.1.Final
    • Fix Version/s: 1.4.2.Final
    • Component/s: Plugin API
    • Labels:
      None
    • Environment:

      (Environment-independent, but...) JDK 1.6.0_45, Windows Server 2008 R2

    • Steps to Reproduce:
      Hide

      Use Forge 1.4.1.

      Create a project with "rest setup" and "persistence setup", and create a JPA Entity class.

      Try "rest endpoint-from-entity" and watch it fail with ClassNotFoundException

      Show
      Use Forge 1.4.1. Create a project with "rest setup" and "persistence setup", and create a JPA Entity class. Try "rest endpoint-from-entity" and watch it fail with ClassNotFoundException

      Description

      Summary: the org.freemarker module should express a dependency on org.apache.log4j but doesn't

      Workaround: edit modules/org/freemarker/main/module.xml and add the dependency

      The long version:

      "rest endpoint-from-entity" works fine in the version of Forge that is bundled in JBoss Tools 4.1 (Forge 1.3.3).

      However, the DTO-based functionality added in FORGE-1060 looked tasty, so I downloaded Forge 1.4.1 and took it for a spin.

      Regardless of whether I run 1.4.1 standalone or within JBoss Tools (Eclipse), "rest endpoint-from-entity" fails with

      java.lang.ClassNotFoundException: org.apache.log4j.Priority from [Module "org.freemarker:main"

      (I have a complete stack trace but it doesn't add anything profound).

      Once I edited modules/org/freemarker/main/module.xml and added a dependency for the "org.apache.log4j" class, "rest endpoint-from-entity" ran happily and generated the expected classes.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  gastaldi George Gastaldi
                  Reporter:
                  tm2 Thomas Maslen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: