ecstasy created VELOCITY-932:
--------------------------------
Summary: Resource not found when executing jar file, works fine in
IDE
Key: VELOCITY-932
URL: https://issues.apache.org/jira/browse/VELOCITY-932
Project: Velocity
Issue Type: Bug
Components: Engine
Affects Versions: 2.2, 1.7.x
Environment: local
Reporter: ecstasy
Hello, I have a simple maven project with 1 class file. The project works fine
in eclipse but when creating a jar out of it and executing it, it runs into
error of ResourceNotFound
{code:java}
SEVERE: ResourceManager : unable to find resource
'\templates\welcomeLetter.vm' in any resource loader.
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: org.apache.velocity.exception.ResourceNotFoundException: Unable to
find resource '\templates\welcomeLetter.vm'
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:474)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1514)
at
org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:373)
at
net.rajanpanchal.handlers.WelcomeLetterGeneratorHandler.<clinit>(WelcomeLetterGeneratorHandler.java:48)
{code}
Attaching project with source code and jar
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]