You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Petter Måhlén (JIRA)" <ji...@apache.org> on 2006/10/27 13:01:16 UTC
[jira] Created: (VELOCITY-469) Spaces in velocimacro.library hard
to troubleshoot
Spaces in velocimacro.library hard to troubleshoot
--------------------------------------------------
Key: VELOCITY-469
URL: http://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
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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
[jira] Closed: (VELOCITY-469) Spaces in velocimacro.library hard to
troubleshoot
Posted by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org>.
[ 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: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
[jira] Resolved: (VELOCITY-469) Spaces in velocimacro.library hard
to troubleshoot
Posted by "Will Glass-Husain (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/VELOCITY-469?page=all ]
Will Glass-Husain resolved VELOCITY-469.
----------------------------------------
Fix Version/s: 1.5
Resolution: Duplicate
Fixed in upcoming version 1.5. See VELOCITY-274.
> Spaces in velocimacro.library hard to troubleshoot
> --------------------------------------------------
>
> Key: VELOCITY-469
> URL: http://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.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org