You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Lee Gang (JIRA)" <de...@velocity.apache.org> on 2011/01/05 11:15:46 UTC
[jira] Created: (VELTOOLS-134) ResourceTool work not propertly when
change the bundle property
ResourceTool work not propertly when change the bundle property
---------------------------------------------------------------
Key: VELTOOLS-134
URL: https://issues.apache.org/jira/browse/VELTOOLS-134
Project: Velocity Tools
Issue Type: Bug
Components: GenericTools
Affects Versions: 2.0
Environment: windows xp sp3(Chinese simplified), ibm jdk 1.6, eclipse 3.6.0
Reporter: Lee Gang
when i use the ResourceTool in a standalone situation, i found that when i configured the toolbox.xml as below(my resource files is study.velocity.resources.resource(_XXX).properties)
<tools>
<toolbox scope="request">
<tool class="org.apache.velocity.tools.generic.ResourceTool"
bundles="study.velocity.resources.resource"
locale="en_US" />
</toolbox>
</tools>
it will not work properly, and throw an exception as below:
java.util.MissingResourceException: Can't find resource for bundle resources, key zh_CN
my template is as below:
Hi! My name is $text.test.user.name.
Oh! How are you $text.test.user.name? Where are you from?
I'm from $text.test.user.addr.
ok, $text.test.user.name. If I want to have a message with you, how do I contact you?
You can send me an email. My email address is $text.test.user.email.
but when i changed the toolbox.xml as below:
<tools>
<toolbox scope="request">
<tool key="res"
class="org.apache.velocity.tools.generic.ResourceTool"
bundles="study.velocity.resources.resource"
locale="en_US"/>
</toolbox>
</tools>
and changed the template as below:
Hi! My name is $res.test.user.name.
Oh! How are you $res.test.user.name? Where are you from?
I'm from $res.test.user.addr.
ok, $res.test.user.name. If I want to have a message with you, how do I contact you?
You can send me an email. My email address is $res.test.user.email.
It worked correctly.
so i don't know if it is a bug or some configuration error in my enviroment?
--
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] Updated: (VELTOOLS-134) ResourceTool work not propertly when
change the bundle property
Posted by "Lee Gang (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELTOOLS-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lee Gang updated VELTOOLS-134:
------------------------------
Description:
when i use the ResourceTool in a standalone situation, i found that when i configured the toolbox.xml as below(my resource files is study/velocity/resources/resource(_XXX).properties in my classpath)
<tools>
<toolbox scope="request">
<tool class="org.apache.velocity.tools.generic.ResourceTool"
bundles="study.velocity.resources.resource"
locale="en_US" />
</toolbox>
</tools>
it will not work properly, and throw an exception as below:
java.util.MissingResourceException: Can't find resource for bundle resources, key zh_CN
my template is as below:
Hi! My name is $text.test.user.name.
Oh! How are you $text.test.user.name? Where are you from?
I'm from $text.test.user.addr.
ok, $text.test.user.name. If I want to have a message with you, how do I contact you?
You can send me an email. My email address is $text.test.user.email.
but when i changed the toolbox.xml as below:
<tools>
<toolbox scope="request">
<tool key="res"
class="org.apache.velocity.tools.generic.ResourceTool"
bundles="study.velocity.resources.resource"
locale="en_US"/>
</toolbox>
</tools>
and changed the template as below:
Hi! My name is $res.test.user.name.
Oh! How are you $res.test.user.name? Where are you from?
I'm from $res.test.user.addr.
ok, $res.test.user.name. If I want to have a message with you, how do I contact you?
You can send me an email. My email address is $res.test.user.email.
It worked correctly.
so i don't know if it is a bug or some configuration error in my enviroment?
was:
when i use the ResourceTool in a standalone situation, i found that when i configured the toolbox.xml as below(my resource files is study.velocity.resources.resource(_XXX).properties)
<tools>
<toolbox scope="request">
<tool class="org.apache.velocity.tools.generic.ResourceTool"
bundles="study.velocity.resources.resource"
locale="en_US" />
</toolbox>
</tools>
it will not work properly, and throw an exception as below:
java.util.MissingResourceException: Can't find resource for bundle resources, key zh_CN
my template is as below:
Hi! My name is $text.test.user.name.
Oh! How are you $text.test.user.name? Where are you from?
I'm from $text.test.user.addr.
ok, $text.test.user.name. If I want to have a message with you, how do I contact you?
You can send me an email. My email address is $text.test.user.email.
but when i changed the toolbox.xml as below:
<tools>
<toolbox scope="request">
<tool key="res"
class="org.apache.velocity.tools.generic.ResourceTool"
bundles="study.velocity.resources.resource"
locale="en_US"/>
</toolbox>
</tools>
and changed the template as below:
Hi! My name is $res.test.user.name.
Oh! How are you $res.test.user.name? Where are you from?
I'm from $res.test.user.addr.
ok, $res.test.user.name. If I want to have a message with you, how do I contact you?
You can send me an email. My email address is $res.test.user.email.
It worked correctly.
so i don't know if it is a bug or some configuration error in my enviroment?
> ResourceTool work not propertly when change the bundle property
> ---------------------------------------------------------------
>
> Key: VELTOOLS-134
> URL: https://issues.apache.org/jira/browse/VELTOOLS-134
> Project: Velocity Tools
> Issue Type: Bug
> Components: GenericTools
> Affects Versions: 2.0
> Environment: windows xp sp3(Chinese simplified), ibm jdk 1.6, eclipse 3.6.0
> Reporter: Lee Gang
>
> when i use the ResourceTool in a standalone situation, i found that when i configured the toolbox.xml as below(my resource files is study/velocity/resources/resource(_XXX).properties in my classpath)
> <tools>
> <toolbox scope="request">
> <tool class="org.apache.velocity.tools.generic.ResourceTool"
> bundles="study.velocity.resources.resource"
> locale="en_US" />
> </toolbox>
> </tools>
> it will not work properly, and throw an exception as below:
> java.util.MissingResourceException: Can't find resource for bundle resources, key zh_CN
> my template is as below:
> Hi! My name is $text.test.user.name.
> Oh! How are you $text.test.user.name? Where are you from?
> I'm from $text.test.user.addr.
> ok, $text.test.user.name. If I want to have a message with you, how do I contact you?
> You can send me an email. My email address is $text.test.user.email.
> but when i changed the toolbox.xml as below:
> <tools>
> <toolbox scope="request">
> <tool key="res"
> class="org.apache.velocity.tools.generic.ResourceTool"
> bundles="study.velocity.resources.resource"
> locale="en_US"/>
> </toolbox>
> </tools>
> and changed the template as below:
> Hi! My name is $res.test.user.name.
> Oh! How are you $res.test.user.name? Where are you from?
> I'm from $res.test.user.addr.
> ok, $res.test.user.name. If I want to have a message with you, how do I contact you?
> You can send me an email. My email address is $res.test.user.email.
> It worked correctly.
> so i don't know if it is a bug or some configuration error in my enviroment?
--
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] Commented: (VELTOOLS-134) ResourceTool work not propertly
when change the bundle property
Posted by "Antonio Petrelli (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELTOOLS-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980162#action_12980162 ]
Antonio Petrelli commented on VELTOOLS-134:
-------------------------------------------
Please provide a test case, preferably in the form of a Maven project.
> ResourceTool work not propertly when change the bundle property
> ---------------------------------------------------------------
>
> Key: VELTOOLS-134
> URL: https://issues.apache.org/jira/browse/VELTOOLS-134
> Project: Velocity Tools
> Issue Type: Bug
> Components: GenericTools
> Affects Versions: 2.0
> Environment: windows xp sp3(Chinese simplified), ibm jdk 1.6, eclipse 3.6.0
> Reporter: Lee Gang
>
> when i use the ResourceTool in a standalone situation, i found that when i configured the toolbox.xml as below(my resource files is study/velocity/resources/resource(_XXX).properties in my classpath)
> <tools>
> <toolbox scope="request">
> <tool class="org.apache.velocity.tools.generic.ResourceTool"
> bundles="study.velocity.resources.resource"
> locale="en_US" />
> </toolbox>
> </tools>
> it will not work properly, and throw an exception as below:
> java.util.MissingResourceException: Can't find resource for bundle resources, key zh_CN
> my template is as below:
> Hi! My name is $text.test.user.name.
> Oh! How are you $text.test.user.name? Where are you from?
> I'm from $text.test.user.addr.
> ok, $text.test.user.name. If I want to have a message with you, how do I contact you?
> You can send me an email. My email address is $text.test.user.email.
> but when i changed the toolbox.xml as below:
> <tools>
> <toolbox scope="request">
> <tool key="res"
> class="org.apache.velocity.tools.generic.ResourceTool"
> bundles="study.velocity.resources.resource"
> locale="en_US"/>
> </toolbox>
> </tools>
> and changed the template as below:
> Hi! My name is $res.test.user.name.
> Oh! How are you $res.test.user.name? Where are you from?
> I'm from $res.test.user.addr.
> ok, $res.test.user.name. If I want to have a message with you, how do I contact you?
> You can send me an email. My email address is $res.test.user.email.
> It worked correctly.
> so i don't know if it is a bug or some configuration error in my enviroment?
--
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] Updated: (VELTOOLS-134) ResourceTool work not propertly when
change the bundle property
Posted by "Lee Gang (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELTOOLS-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lee Gang updated VELTOOLS-134:
------------------------------
Attachment: restool.zip
Hi, This zip file is a project with two scenarios which i mentioned in description. ResourceToolChangedTest is the changed tool setting with key="res", and could work correctly. ResourceToolDefaultTest.java is the default tool setting with key="text", and could not work correctly with "java.util.MissingResourceException: Can't find resource for bundle resources, key zh_CN".
> ResourceTool work not propertly when change the bundle property
> ---------------------------------------------------------------
>
> Key: VELTOOLS-134
> URL: https://issues.apache.org/jira/browse/VELTOOLS-134
> Project: Velocity Tools
> Issue Type: Bug
> Components: GenericTools
> Affects Versions: 2.0
> Environment: windows xp sp3(Chinese simplified), ibm jdk 1.6, eclipse 3.6.0
> Reporter: Lee Gang
> Attachments: restool.zip
>
>
> when i use the ResourceTool in a standalone situation, i found that when i configured the toolbox.xml as below(my resource files is study/velocity/resources/resource(_XXX).properties in my classpath)
> <tools>
> <toolbox scope="request">
> <tool class="org.apache.velocity.tools.generic.ResourceTool"
> bundles="study.velocity.resources.resource"
> locale="en_US" />
> </toolbox>
> </tools>
> it will not work properly, and throw an exception as below:
> java.util.MissingResourceException: Can't find resource for bundle resources, key zh_CN
> my template is as below:
> Hi! My name is $text.test.user.name.
> Oh! How are you $text.test.user.name? Where are you from?
> I'm from $text.test.user.addr.
> ok, $text.test.user.name. If I want to have a message with you, how do I contact you?
> You can send me an email. My email address is $text.test.user.email.
> but when i changed the toolbox.xml as below:
> <tools>
> <toolbox scope="request">
> <tool key="res"
> class="org.apache.velocity.tools.generic.ResourceTool"
> bundles="study.velocity.resources.resource"
> locale="en_US"/>
> </toolbox>
> </tools>
> and changed the template as below:
> Hi! My name is $res.test.user.name.
> Oh! How are you $res.test.user.name? Where are you from?
> I'm from $res.test.user.addr.
> ok, $res.test.user.name. If I want to have a message with you, how do I contact you?
> You can send me an email. My email address is $res.test.user.email.
> It worked correctly.
> so i don't know if it is a bug or some configuration error in my enviroment?
--
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] Issue Comment Edited: (VELTOOLS-134) ResourceTool work not
propertly when change the bundle property
Posted by "Lee Gang (JIRA)" <de...@velocity.apache.org>.
[ https://issues.apache.org/jira/browse/VELTOOLS-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982513#action_12982513 ]
Lee Gang edited comment on VELTOOLS-134 at 1/17/11 3:07 AM:
------------------------------------------------------------
Hi, the zip file upper is a project with two scenarios which i mentioned in description. ResourceToolChangedTest is the changed tool setting with key="res", and could work correctly. ResourceToolDefaultTest.java is the default tool setting with key="text", and could not work correctly with "java.util.MissingResourceException: Can't find resource for bundle resources, key zh_CN".
was (Author: ligangty@gmail.com):
Hi, This zip file is a project with two scenarios which i mentioned in description. ResourceToolChangedTest is the changed tool setting with key="res", and could work correctly. ResourceToolDefaultTest.java is the default tool setting with key="text", and could not work correctly with "java.util.MissingResourceException: Can't find resource for bundle resources, key zh_CN".
> ResourceTool work not propertly when change the bundle property
> ---------------------------------------------------------------
>
> Key: VELTOOLS-134
> URL: https://issues.apache.org/jira/browse/VELTOOLS-134
> Project: Velocity Tools
> Issue Type: Bug
> Components: GenericTools
> Affects Versions: 2.0
> Environment: windows xp sp3(Chinese simplified), ibm jdk 1.6, eclipse 3.6.0
> Reporter: Lee Gang
> Attachments: restool.zip
>
>
> when i use the ResourceTool in a standalone situation, i found that when i configured the toolbox.xml as below(my resource files is study/velocity/resources/resource(_XXX).properties in my classpath)
> <tools>
> <toolbox scope="request">
> <tool class="org.apache.velocity.tools.generic.ResourceTool"
> bundles="study.velocity.resources.resource"
> locale="en_US" />
> </toolbox>
> </tools>
> it will not work properly, and throw an exception as below:
> java.util.MissingResourceException: Can't find resource for bundle resources, key zh_CN
> my template is as below:
> Hi! My name is $text.test.user.name.
> Oh! How are you $text.test.user.name? Where are you from?
> I'm from $text.test.user.addr.
> ok, $text.test.user.name. If I want to have a message with you, how do I contact you?
> You can send me an email. My email address is $text.test.user.email.
> but when i changed the toolbox.xml as below:
> <tools>
> <toolbox scope="request">
> <tool key="res"
> class="org.apache.velocity.tools.generic.ResourceTool"
> bundles="study.velocity.resources.resource"
> locale="en_US"/>
> </toolbox>
> </tools>
> and changed the template as below:
> Hi! My name is $res.test.user.name.
> Oh! How are you $res.test.user.name? Where are you from?
> I'm from $res.test.user.addr.
> ok, $res.test.user.name. If I want to have a message with you, how do I contact you?
> You can send me an email. My email address is $res.test.user.email.
> It worked correctly.
> so i don't know if it is a bug or some configuration error in my enviroment?
--
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