[ 
https://issues.apache.org/jira/browse/VELOCITY-469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henning Schmiedehausen closed VELOCITY-469.
-------------------------------------------


> Spaces in velocimacro.library hard to troubleshoot
> --------------------------------------------------
>
>                 Key: VELOCITY-469
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-469
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.4
>         Environment: N/A
>            Reporter: Petter Måhlén
>            Priority: Minor
>             Fix For: 1.5
>
>
> With the following velocity.properties file (note the spaces after 
> 'TypeConversions.vm'):
> -----
> resource.loader = classpath
> # this configuration allows you to supply template files somewhere on the 
> classpath
> classpath.resource.loader.description = Velocity Classpath Resource Loader
> classpath.resource.loader.class = 
> org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
> velocimacro.library=TypeConversions.vm  
> ---------
> One gets the following log entries:
> ----
> Fri Oct 27 10:42:39 CEST 2006   [info] Velocimacro : adding VMs from VM 
> library template : TypeConversions.vm  
> Fri Oct 27 10:42:39 CEST 2006  [error] ResourceManager : unable to find 
> resource 'TypeConversions.vm  ' in any resource loader.
> Fri Oct 27 10:42:39 CEST 2006   [info] Velocimacro : error using  VM library 
> template TypeConversions.vm   : 
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find 
> resource 'TypeConversions.vm  '
> ----
> It took me a few hours to notice that there were spaces after the '.vm' - it 
> would maybe be better to add a trim() to 
> VelocimacroFactory.initVelocimacro(), about line 164:
> ----
>                      if (lib != null && !lib.equals(""))
>                      {
>                          /*
>                           *  let the VMManager know that the following is 
> coming
>                           *  from libraries - need to know for auto-load
>                           */
> lib = lib.trim(); // NEW 
>                          vmManager.setRegisterFromLib( true );
>                          logVMMessageInfo("Velocimacro : adding VMs from " +
>                              "VM library template : " + lib  );
> ---

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to