0 Replies Latest reply on Jan 21, 2014 4:51 AM by prashamsjain

    org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'templates/testemail.vm'

    prashamsjain Newbie

      Hello guys,


      I am trying migrating my application ear in jboss as7 and getting error mentioned above. my testemail.vm is in jar only.


      application structure is:

      app.ear

                -app-ejb.jar   

                     --- META-INF

                     --- velocity.properties

                     --- templates

                          ---testemail.vm

                          ---test1email.vm       

      code :

           Template template = Velocity.getTemplate("templates/testemail.vm");

      where templates folder(consisting vm files) is within src/main/resources of app-ejb project

       

      Configuration in my velocity.properties are

      resource.loader = file

      file.resource.loader.description = Velocity File Resource Loader

      file.resource.loader.class = org.apache.velocity.runtime.resource.loader.FileResourceLoader

      file.resource.loader.cache = false

      file.resource.loader.modificationCheckInterval = 2

       

      Can anyone help me to resolve this ?

       

      Thanks.