You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Aleksej <al...@ivs.lt> on 2006/07/13 15:26:35 UTC

Can't run Tapestry after adding my own SymbolSource

I got such exception:
Unable to instantiate component framework:Exception: Can't find resource 
for bundle java.util.PropertyResourceBundle, key 
org.apache.tapestry.template-encoding
    
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:60)
    
$ServletRequestServicer_10c6807c53f.service($ServletRequestServicer_10c6807c53f.java)
    
$ServletRequestServicer_10c6807c53e.service($ServletRequestServicer_10c6807c53e.java)
    
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
    
$ServletRequestServicerFilter_10c6807c53b.service($ServletRequestServicerFilter_10c6807c53b.java)
    
$ServletRequestServicerFilter_10c6807c53a.service($ServletRequestServicerFilter_10c6807c53a.java)
    
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
    
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
    
$ServletRequestServicerFilter_10c6807c539.service($ServletRequestServicerFilter_10c6807c539.java)
    
$ServletRequestServicerFilter_10c6807c538.service($ServletRequestServicerFilter_10c6807c538.java)
    
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
    
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
    
$ServletRequestServicerFilter_10c6807c53d.service($ServletRequestServicerFilter_10c6807c53d.java)
    
$ServletRequestServicerFilter_10c6807c53c.service($ServletRequestServicerFilter_10c6807c53c.java)
    
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
    
$ServletRequestServicer_10c6807c533.service($ServletRequestServicer_10c6807c533.java)
    
$ServletRequestServicer_10c6807c532.service($ServletRequestServicer_10c6807c532.java)
    
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
    org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
--------------
Interesting that when I first made everything it drop me such or like 
this exception but
when I changed before="*" on after="*" in SymbolSource contribution 
everything start working OK
( and I was very happy at this moment ). But later, after some 
modifications in other part of applications
I got that exception again but now playing with before or after doesn't 
help. Anyway I want to  understand
how does it work, not just make it working. The only difference between 
first  and last code editions
is that when it worked i used symbol from configuration.properties in 
one service, and later decided to
insert it into another service too, and thats it. Here are some parts of 
my code:

Thats how my contribution looks like:
<contribution configuration-id="hivemind.SymbolSources">
   <source name="ivs.cross.configuration" after="*" 
class="ivs.cross.ConfigurationSymbolSource" />
</contribution>
and here is implementation of symbol source ( everything is as in Shing 
tutorial ):
public class ConfigurationSymbolSource implements SymbolSource
{
    private ResourceBundle messages;
    public ConfigurationSymbolSource() throws Exception
    {
        Locale currentLocale= Locale.getDefault();
        messages= ResourceBundle.getBundle( "configuration", 
currentLocale );
    }
    public String valueForSymbol( String name )
    {
        return messages.getString( name );
    }
}


Re: Can't run Tapestry after adding my own SymbolSource

Posted by Aleksej <al...@ivs.lt>.
Without my symbolsource contribution everything works fine.
Adding my symbol source I need to add 
"org.apache.tapestry.template-encoding" contribution.
Without it I got exception.

Shing Hing Man wrote:
> I am afraid I can  not determine the cause of the
> problem.
> Not sure if it is a bug or the way I setup symbol
> source is wrong.
>
>
> My question : How come  if you do not put in
> <contribution
> configuration-id="hivemind.SymbolSources">
>
> it does not complain about the missing value  
> for  org.apache.tapestry.template-encoding ?
>
>
> I have looked at the Tapestry framework module
> descriptor tapestry.props.xml, where 
> all the property source (symbol source) are set up. 
> But I am still lost.
>
> Shing 
>
> --- Aleksej <al...@ivs.lt> wrote:
>
>   
>> Thanks Shing, that help!
>> But I don't understand, is it some sort of BUG or
>> just incorrect usage 
>> of symbols?
>> If second, then what was wrong?
>>
>> Shing Hing Man wrote:
>>     
>>> Instead of setting 
>>> org.apache.tapestry.template-encoding
>>>
>>> in .application, you can try to set it 
>>> in hivemodule.xml :
>>>
>>> 	<contribution
>>> configuration-id="hivemind.FactoryDefaults">
>>>      <default
>>> symbol="org.apache.tapestry.template-encoding"
>>> 		       value="ISO-8859-1"/>
>>>       </contribution>
>>>
>>> Shing
>>>
>>> --- Shing Hing Man <ma...@yahoo.com> wrote:
>>>
>>>   
>>>       
>>>> After some debugging in Eclipse,
>>>>  the  after="*"  in 
>>>>
>>>>   <source name="ivs.cross.configuration"
>>>>         
>> after="*" 
>>     
>>>> class="ivs.cross.ConfigurationSymbolSource" />
>>>> </contribution>
>>>>
>>>> has the right affect. 
>>>> The above symbolsource is appended at the end. 
>>>> Somehow, when HiveMind tries to look up the value
>>>> for
>>>> the 
>>>> key= org.apache.tapestry.template-encoding, it
>>>> can not find it in all the property  sources
>>>>         
>> (symbol
>>     
>>>> sources).
>>>>
>>>> But the error disappear if I explicitly specify 
>>>>  org.apache.tapestry.template-encoding, in
>>>> .application :
>>>>
>>>>  <meta
>>>>         
>> key="org.apache.tapestry.template-encoding">
>>     
>>>> 		 ISO-8859-1		 
>>>> 	 </meta>
>>>>
>>>>
>>>>
>>>>  I do not whether the above fix would have side
>>>> effects.
>>>>
>>>> Shing 
>>>> --- Shing Hing Man <ma...@yahoo.com> wrote:
>>>>
>>>>     
>>>>         
>>>>>  I have replicated the exception you have. The
>>>>>       
>>>>>           
>>>> cause
>>>>     
>>>>         
>>>>> seems to be 
>>>>> HiveMind tries to use your custom  SymbolSource 
>>>>> ConfigurationSymbolSource  to
>>>>> get the value for
>>>>> key=org.apache.tapestry.template-encoding.
>>>>>
>>>>> I would have thought by specifing after=* in
>>>>>
>>>>>  <source name="ivs.cross.configuration"
>>>>>           
>> after="*" 
>>     
>>>>> class="ivs.cross.ConfigurationSymbolSource" />
>>>>> </contribution>
>>>>>
>>>>> Hivemind would try to search in  other symbol
>>>>> sources 
>>>>> first.
>>>>> I will look into in, but no promises that I can
>>>>>       
>>>>>           
>>>> come
>>>>     
>>>>         
>>>>> up with a solution.
>>>>>
>>>>> If you press for time, you can  use James'
>>>>> suggestion.
>>>>>
>>>>> Shing
>>>>>
>>>>>
>>>>> --- Aleksej <al...@ivs.lt> wrote:
>>>>>
>>>>>       
>>>>>           
>>>>>> I got such exception:
>>>>>> Unable to instantiate component
>>>>>>         
>>>>>>             
>>>>> framework:Exception:
>>>>>       
>>>>>           
>>>>>> Can't find resource 
>>>>>> for bundle java.util.PropertyResourceBundle,
>>>>>>             
>> key
>>     
>>>>>>         
>>>>>> org.apache.tapestry.template-encoding
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:60)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicer_10c6807c53f.service($ServletRequestServicer_10c6807c53f.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicer_10c6807c53e.service($ServletRequestServicer_10c6807c53e.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicerFilter_10c6807c53b.service($ServletRequestServicerFilter_10c6807c53b.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicerFilter_10c6807c53a.service($ServletRequestServicerFilter_10c6807c53a.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicerFilter_10c6807c539.service($ServletRequestServicerFilter_10c6807c539.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicerFilter_10c6807c538.service($ServletRequestServicerFilter_10c6807c538.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicerFilter_10c6807c53d.service($ServletRequestServicerFilter_10c6807c53d.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicerFilter_10c6807c53c.service($ServletRequestServicerFilter_10c6807c53c.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
>   
>>>   
>>>       
>>>>>>     
>>>>>>
>>>>>>         
>>>>>>             
> $ServletRequestServicer_10c6807c533.service($ServletRequestServicer_10c6807c533.java)
>   
> === message truncated ===
>
>
> Home page :
>   http://uk.geocities.com/matmsh/index.html
>
>
> 		
> ___________________________________________________________ 
> Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
>
>
>   


Re: Can't run Tapestry after adding my own SymbolSource

Posted by Shing Hing Man <ma...@yahoo.com>.
I am afraid I can  not determine the cause of the
problem.
Not sure if it is a bug or the way I setup symbol
source is wrong.


My question : How come  if you do not put in
<contribution
configuration-id="hivemind.SymbolSources">

it does not complain about the missing value  
for  org.apache.tapestry.template-encoding ?


I have looked at the Tapestry framework module
descriptor tapestry.props.xml, where 
all the property source (symbol source) are set up. 
But I am still lost.

Shing 

--- Aleksej <al...@ivs.lt> wrote:

> Thanks Shing, that help!
> But I don't understand, is it some sort of BUG or
> just incorrect usage 
> of symbols?
> If second, then what was wrong?
> 
> Shing Hing Man wrote:
> > Instead of setting 
> > org.apache.tapestry.template-encoding
> >
> > in .application, you can try to set it 
> > in hivemodule.xml :
> >
> > 	<contribution
> > configuration-id="hivemind.FactoryDefaults">
> >      <default
> > symbol="org.apache.tapestry.template-encoding"
> > 		       value="ISO-8859-1"/>
> >       </contribution>
> >
> > Shing
> >
> > --- Shing Hing Man <ma...@yahoo.com> wrote:
> >
> >   
> >> After some debugging in Eclipse,
> >>  the  after="*"  in 
> >>
> >>   <source name="ivs.cross.configuration"
> after="*" 
> >> class="ivs.cross.ConfigurationSymbolSource" />
> >> </contribution>
> >>
> >> has the right affect. 
> >> The above symbolsource is appended at the end. 
> >> Somehow, when HiveMind tries to look up the value
> >> for
> >> the 
> >> key= org.apache.tapestry.template-encoding, it
> >> can not find it in all the property  sources
> (symbol
> >> sources).
> >>
> >> But the error disappear if I explicitly specify 
> >>  org.apache.tapestry.template-encoding, in
> >> .application :
> >>
> >>  <meta
> key="org.apache.tapestry.template-encoding">
> >> 		 ISO-8859-1		 
> >> 	 </meta>
> >>
> >>
> >>
> >>  I do not whether the above fix would have side
> >> effects.
> >>
> >> Shing 
> >> --- Shing Hing Man <ma...@yahoo.com> wrote:
> >>
> >>     
> >>>  I have replicated the exception you have. The
> >>>       
> >> cause
> >>     
> >>> seems to be 
> >>> HiveMind tries to use your custom  SymbolSource 
> >>> ConfigurationSymbolSource  to
> >>> get the value for
> >>> key=org.apache.tapestry.template-encoding.
> >>>
> >>> I would have thought by specifing after=* in
> >>>
> >>>  <source name="ivs.cross.configuration"
> after="*" 
> >>> class="ivs.cross.ConfigurationSymbolSource" />
> >>> </contribution>
> >>>
> >>> Hivemind would try to search in  other symbol
> >>> sources 
> >>> first.
> >>> I will look into in, but no promises that I can
> >>>       
> >> come
> >>     
> >>> up with a solution.
> >>>
> >>> If you press for time, you can  use James'
> >>> suggestion.
> >>>
> >>> Shing
> >>>
> >>>
> >>> --- Aleksej <al...@ivs.lt> wrote:
> >>>
> >>>       
> >>>> I got such exception:
> >>>> Unable to instantiate component
> >>>>         
> >>> framework:Exception:
> >>>       
> >>>> Can't find resource 
> >>>> for bundle java.util.PropertyResourceBundle,
> key
> >>>>         
> >>>> org.apache.tapestry.template-encoding
> >>>>     
> >>>>
> >>>>         
> >
>
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:60)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicer_10c6807c53f.service($ServletRequestServicer_10c6807c53f.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicer_10c6807c53e.service($ServletRequestServicer_10c6807c53e.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicerFilter_10c6807c53b.service($ServletRequestServicerFilter_10c6807c53b.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicerFilter_10c6807c53a.service($ServletRequestServicerFilter_10c6807c53a.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicerFilter_10c6807c539.service($ServletRequestServicerFilter_10c6807c539.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicerFilter_10c6807c538.service($ServletRequestServicerFilter_10c6807c538.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicerFilter_10c6807c53d.service($ServletRequestServicerFilter_10c6807c53d.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicerFilter_10c6807c53c.service($ServletRequestServicerFilter_10c6807c53c.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
> >   
> >>>>     
> >>>>
> >>>>         
> >
>
$ServletRequestServicer_10c6807c533.service($ServletRequestServicer_10c6807c533.java)
> 
=== message truncated ===


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html

Re: Can't run Tapestry after adding my own SymbolSource

Posted by Aleksej <al...@ivs.lt>.
Thanks Shing, that help!
But I don't understand, is it some sort of BUG or just incorrect usage 
of symbols?
If second, then what was wrong?

Shing Hing Man wrote:
> Instead of setting 
> org.apache.tapestry.template-encoding
>
> in .application, you can try to set it 
> in hivemodule.xml :
>
> 	<contribution
> configuration-id="hivemind.FactoryDefaults">
>      <default
> symbol="org.apache.tapestry.template-encoding"
> 		       value="ISO-8859-1"/>
>       </contribution>
>
> Shing
>
> --- Shing Hing Man <ma...@yahoo.com> wrote:
>
>   
>> After some debugging in Eclipse,
>>  the  after="*"  in 
>>
>>   <source name="ivs.cross.configuration" after="*" 
>> class="ivs.cross.ConfigurationSymbolSource" />
>> </contribution>
>>
>> has the right affect. 
>> The above symbolsource is appended at the end. 
>> Somehow, when HiveMind tries to look up the value
>> for
>> the 
>> key= org.apache.tapestry.template-encoding, it
>> can not find it in all the property  sources (symbol
>> sources).
>>
>> But the error disappear if I explicitly specify 
>>  org.apache.tapestry.template-encoding, in
>> .application :
>>
>>  <meta key="org.apache.tapestry.template-encoding">
>> 		 ISO-8859-1		 
>> 	 </meta>
>>
>>
>>
>>  I do not whether the above fix would have side
>> effects.
>>
>> Shing 
>> --- Shing Hing Man <ma...@yahoo.com> wrote:
>>
>>     
>>>  I have replicated the exception you have. The
>>>       
>> cause
>>     
>>> seems to be 
>>> HiveMind tries to use your custom  SymbolSource 
>>> ConfigurationSymbolSource  to
>>> get the value for
>>> key=org.apache.tapestry.template-encoding.
>>>
>>> I would have thought by specifing after=* in
>>>
>>>  <source name="ivs.cross.configuration" after="*" 
>>> class="ivs.cross.ConfigurationSymbolSource" />
>>> </contribution>
>>>
>>> Hivemind would try to search in  other symbol
>>> sources 
>>> first.
>>> I will look into in, but no promises that I can
>>>       
>> come
>>     
>>> up with a solution.
>>>
>>> If you press for time, you can  use James'
>>> suggestion.
>>>
>>> Shing
>>>
>>>
>>> --- Aleksej <al...@ivs.lt> wrote:
>>>
>>>       
>>>> I got such exception:
>>>> Unable to instantiate component
>>>>         
>>> framework:Exception:
>>>       
>>>> Can't find resource 
>>>> for bundle java.util.PropertyResourceBundle, key
>>>>         
>>>> org.apache.tapestry.template-encoding
>>>>     
>>>>
>>>>         
> org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:60)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicer_10c6807c53f.service($ServletRequestServicer_10c6807c53f.java)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicer_10c6807c53e.service($ServletRequestServicer_10c6807c53e.java)
>   
>>>>     
>>>>
>>>>         
> org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicerFilter_10c6807c53b.service($ServletRequestServicerFilter_10c6807c53b.java)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicerFilter_10c6807c53a.service($ServletRequestServicerFilter_10c6807c53a.java)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
>   
>>>>     
>>>>
>>>>         
> org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicerFilter_10c6807c539.service($ServletRequestServicerFilter_10c6807c539.java)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicerFilter_10c6807c538.service($ServletRequestServicerFilter_10c6807c538.java)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
>   
>>>>     
>>>>
>>>>         
> org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicerFilter_10c6807c53d.service($ServletRequestServicerFilter_10c6807c53d.java)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicerFilter_10c6807c53c.service($ServletRequestServicerFilter_10c6807c53c.java)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicer_10c6807c533.service($ServletRequestServicer_10c6807c533.java)
>   
>>>>     
>>>>
>>>>         
> $ServletRequestServicer_10c6807c532.service($ServletRequestServicer_10c6807c532.java)
>   
>>>>     
>>>>
>>>>         
> org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
>   
>>>>    
>>>>
>>>>         
> org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
>   
>>>>    
>>>>
>>>>         
> javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>   
>>>>    
>>>>
>>>>         
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>   
>>>> --------------
>>>> Interesting that when I first made everything it
>>>> drop me such or like 
>>>> this exception but
>>>> when I changed before="*" on after="*" in
>>>> SymbolSource contribution 
>>>> everything start working OK
>>>> ( and I was very happy at this moment ). But
>>>>         
>>> later,
>>>       
>>>> after some 
>>>> modifications in other part of applications
>>>> I got that exception again but now playing with
>>>> before or after doesn't 
>>>> help. Anyway I want to  understand
>>>> how does it work, not just make it working. The
>>>>         
>>> only
>>>       
>>>> difference between 
>>>> first  and last code editions
>>>> is that when it worked i used symbol from
>>>> configuration.properties in 
>>>> one service, and later decided to
>>>> insert it into another service too, and thats
>>>>         
>> it.
>>     
>>>> Here are some parts of 
>>>> my code:
>>>>
>>>> Thats how my contribution looks like:
>>>> <contribution
>>>> configuration-id="hivemind.SymbolSources">
>>>>    <source name="ivs.cross.configuration"
>>>>         
>>> after="*" 
>>>       
>>>> class="ivs.cross.ConfigurationSymbolSource" />
>>>> </contribution>
>>>> and here is implementation of symbol source (
>>>> everything is as in Shing 
>>>> tutorial ):
>>>> public class ConfigurationSymbolSource
>>>>         
>> implements
>>     
>>>> SymbolSource
>>>> {
>>>>     private ResourceBundle messages;
>>>>     public ConfigurationSymbolSource() throws
>>>> Exception
>>>>     {
>>>>         Locale currentLocale=
>>>>         
>> Locale.getDefault();
>>     
>>>>         messages= ResourceBundle.getBundle(
>>>> "configuration", 
>>>> currentLocale );
>>>>         
> === message truncated ===
>
>
> Home page :
>   http://uk.geocities.com/matmsh/index.html
>
>
> 		
> ___________________________________________________________ 
> All New Yahoo! Mail – Tired of Vi@gr@! come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html
>
>
>   


Re: Can't run Tapestry after adding my own SymbolSource

Posted by Shing Hing Man <ma...@yahoo.com>.
Instead of setting 
org.apache.tapestry.template-encoding

in .application, you can try to set it 
in hivemodule.xml :

	<contribution
configuration-id="hivemind.FactoryDefaults">
     <default
symbol="org.apache.tapestry.template-encoding"
		       value="ISO-8859-1"/>
      </contribution>

Shing

--- Shing Hing Man <ma...@yahoo.com> wrote:

> After some debugging in Eclipse,
>  the  after="*"  in 
> 
>   <source name="ivs.cross.configuration" after="*" 
> class="ivs.cross.ConfigurationSymbolSource" />
> </contribution>
> 
> has the right affect. 
> The above symbolsource is appended at the end. 
> Somehow, when HiveMind tries to look up the value
> for
> the 
> key= org.apache.tapestry.template-encoding, it
> can not find it in all the property  sources (symbol
> sources).
> 
> But the error disappear if I explicitly specify 
>  org.apache.tapestry.template-encoding, in
> .application :
> 
>  <meta key="org.apache.tapestry.template-encoding">
> 		 ISO-8859-1		 
> 	 </meta>
> 
> 
> 
>  I do not whether the above fix would have side
> effects.
> 
> Shing 
> --- Shing Hing Man <ma...@yahoo.com> wrote:
> 
> >  I have replicated the exception you have. The
> cause
> > seems to be 
> > HiveMind tries to use your custom  SymbolSource 
> > ConfigurationSymbolSource  to
> > get the value for
> > key=org.apache.tapestry.template-encoding.
> > 
> > I would have thought by specifing after=* in
> > 
> >  <source name="ivs.cross.configuration" after="*" 
> > class="ivs.cross.ConfigurationSymbolSource" />
> > </contribution>
> > 
> > Hivemind would try to search in  other symbol
> > sources 
> > first.
> > I will look into in, but no promises that I can
> come
> > up with a solution.
> > 
> > If you press for time, you can  use James'
> > suggestion.
> > 
> > Shing
> > 
> > 
> > --- Aleksej <al...@ivs.lt> wrote:
> > 
> > > I got such exception:
> > > Unable to instantiate component
> > framework:Exception:
> > > Can't find resource 
> > > for bundle java.util.PropertyResourceBundle, key
> 
> > > org.apache.tapestry.template-encoding
> > >     
> > >
> >
>
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:60)
> > >     
> > >
> >
>
$ServletRequestServicer_10c6807c53f.service($ServletRequestServicer_10c6807c53f.java)
> > >     
> > >
> >
>
$ServletRequestServicer_10c6807c53e.service($ServletRequestServicer_10c6807c53e.java)
> > >     
> > >
> >
>
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
> > >     
> > >
> >
>
$ServletRequestServicerFilter_10c6807c53b.service($ServletRequestServicerFilter_10c6807c53b.java)
> > >     
> > >
> >
>
$ServletRequestServicerFilter_10c6807c53a.service($ServletRequestServicerFilter_10c6807c53a.java)
> > >     
> > >
> >
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
> > >     
> > >
> >
>
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
> > >     
> > >
> >
>
$ServletRequestServicerFilter_10c6807c539.service($ServletRequestServicerFilter_10c6807c539.java)
> > >     
> > >
> >
>
$ServletRequestServicerFilter_10c6807c538.service($ServletRequestServicerFilter_10c6807c538.java)
> > >     
> > >
> >
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
> > >     
> > >
> >
>
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
> > >     
> > >
> >
>
$ServletRequestServicerFilter_10c6807c53d.service($ServletRequestServicerFilter_10c6807c53d.java)
> > >     
> > >
> >
>
$ServletRequestServicerFilter_10c6807c53c.service($ServletRequestServicerFilter_10c6807c53c.java)
> > >     
> > >
> >
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
> > >     
> > >
> >
>
$ServletRequestServicer_10c6807c533.service($ServletRequestServicer_10c6807c533.java)
> > >     
> > >
> >
>
$ServletRequestServicer_10c6807c532.service($ServletRequestServicer_10c6807c532.java)
> > >     
> > >
> >
>
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
> > >    
> > >
> >
>
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
> > >    
> > >
> >
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> > >    
> > >
> >
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > > --------------
> > > Interesting that when I first made everything it
> > > drop me such or like 
> > > this exception but
> > > when I changed before="*" on after="*" in
> > > SymbolSource contribution 
> > > everything start working OK
> > > ( and I was very happy at this moment ). But
> > later,
> > > after some 
> > > modifications in other part of applications
> > > I got that exception again but now playing with
> > > before or after doesn't 
> > > help. Anyway I want to  understand
> > > how does it work, not just make it working. The
> > only
> > > difference between 
> > > first  and last code editions
> > > is that when it worked i used symbol from
> > > configuration.properties in 
> > > one service, and later decided to
> > > insert it into another service too, and thats
> it.
> > > Here are some parts of 
> > > my code:
> > > 
> > > Thats how my contribution looks like:
> > > <contribution
> > > configuration-id="hivemind.SymbolSources">
> > >    <source name="ivs.cross.configuration"
> > after="*" 
> > > class="ivs.cross.ConfigurationSymbolSource" />
> > > </contribution>
> > > and here is implementation of symbol source (
> > > everything is as in Shing 
> > > tutorial ):
> > > public class ConfigurationSymbolSource
> implements
> > > SymbolSource
> > > {
> > >     private ResourceBundle messages;
> > >     public ConfigurationSymbolSource() throws
> > > Exception
> > >     {
> > >         Locale currentLocale=
> Locale.getDefault();
> > >         messages= ResourceBundle.getBundle(
> > > "configuration", 
> > > currentLocale );
> 
=== message truncated ===


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
All New Yahoo! Mail – Tired of Vi@gr@! come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html

Re: Can't run Tapestry after adding my own SymbolSource

Posted by Shing Hing Man <ma...@yahoo.com>.
After some debugging in Eclipse,
 the  after="*"  in 

  <source name="ivs.cross.configuration" after="*" 
class="ivs.cross.ConfigurationSymbolSource" />
</contribution>

has the right affect. 
The above symbolsource is appended at the end. 
Somehow, when HiveMind tries to look up the value for
the 
key= org.apache.tapestry.template-encoding, it
can not find it in all the property  sources (symbol
sources).

But the error disappear if I explicitly specify 
 org.apache.tapestry.template-encoding, in
.application :

 <meta key="org.apache.tapestry.template-encoding">
		 ISO-8859-1		 
	 </meta>



 I do not whether the above fix would have side
effects.

Shing 
--- Shing Hing Man <ma...@yahoo.com> wrote:

>  I have replicated the exception you have. The cause
> seems to be 
> HiveMind tries to use your custom  SymbolSource 
> ConfigurationSymbolSource  to
> get the value for
> key=org.apache.tapestry.template-encoding.
> 
> I would have thought by specifing after=* in
> 
>  <source name="ivs.cross.configuration" after="*" 
> class="ivs.cross.ConfigurationSymbolSource" />
> </contribution>
> 
> Hivemind would try to search in  other symbol
> sources 
> first.
> I will look into in, but no promises that I can come
> up with a solution.
> 
> If you press for time, you can  use James'
> suggestion.
> 
> Shing
> 
> 
> --- Aleksej <al...@ivs.lt> wrote:
> 
> > I got such exception:
> > Unable to instantiate component
> framework:Exception:
> > Can't find resource 
> > for bundle java.util.PropertyResourceBundle, key 
> > org.apache.tapestry.template-encoding
> >     
> >
>
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:60)
> >     
> >
>
$ServletRequestServicer_10c6807c53f.service($ServletRequestServicer_10c6807c53f.java)
> >     
> >
>
$ServletRequestServicer_10c6807c53e.service($ServletRequestServicer_10c6807c53e.java)
> >     
> >
>
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
> >     
> >
>
$ServletRequestServicerFilter_10c6807c53b.service($ServletRequestServicerFilter_10c6807c53b.java)
> >     
> >
>
$ServletRequestServicerFilter_10c6807c53a.service($ServletRequestServicerFilter_10c6807c53a.java)
> >     
> >
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
> >     
> >
>
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
> >     
> >
>
$ServletRequestServicerFilter_10c6807c539.service($ServletRequestServicerFilter_10c6807c539.java)
> >     
> >
>
$ServletRequestServicerFilter_10c6807c538.service($ServletRequestServicerFilter_10c6807c538.java)
> >     
> >
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
> >     
> >
>
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
> >     
> >
>
$ServletRequestServicerFilter_10c6807c53d.service($ServletRequestServicerFilter_10c6807c53d.java)
> >     
> >
>
$ServletRequestServicerFilter_10c6807c53c.service($ServletRequestServicerFilter_10c6807c53c.java)
> >     
> >
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
> >     
> >
>
$ServletRequestServicer_10c6807c533.service($ServletRequestServicer_10c6807c533.java)
> >     
> >
>
$ServletRequestServicer_10c6807c532.service($ServletRequestServicer_10c6807c532.java)
> >     
> >
>
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
> >    
> >
>
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
> >    
> >
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >    
> >
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > --------------
> > Interesting that when I first made everything it
> > drop me such or like 
> > this exception but
> > when I changed before="*" on after="*" in
> > SymbolSource contribution 
> > everything start working OK
> > ( and I was very happy at this moment ). But
> later,
> > after some 
> > modifications in other part of applications
> > I got that exception again but now playing with
> > before or after doesn't 
> > help. Anyway I want to  understand
> > how does it work, not just make it working. The
> only
> > difference between 
> > first  and last code editions
> > is that when it worked i used symbol from
> > configuration.properties in 
> > one service, and later decided to
> > insert it into another service too, and thats it.
> > Here are some parts of 
> > my code:
> > 
> > Thats how my contribution looks like:
> > <contribution
> > configuration-id="hivemind.SymbolSources">
> >    <source name="ivs.cross.configuration"
> after="*" 
> > class="ivs.cross.ConfigurationSymbolSource" />
> > </contribution>
> > and here is implementation of symbol source (
> > everything is as in Shing 
> > tutorial ):
> > public class ConfigurationSymbolSource implements
> > SymbolSource
> > {
> >     private ResourceBundle messages;
> >     public ConfigurationSymbolSource() throws
> > Exception
> >     {
> >         Locale currentLocale= Locale.getDefault();
> >         messages= ResourceBundle.getBundle(
> > "configuration", 
> > currentLocale );
> >     }
> >     public String valueForSymbol( String name )
> >     {
> >         return messages.getString( name );
> >     }
> > }
> > 
> > 
> 
> 
> Home page :
>   http://uk.geocities.com/matmsh/index.html
> 
> 
> 		
>
___________________________________________________________
> 
> Now you can scan emails quickly with a reading pane.
> Get the new Yahoo! Mail.
> http://uk.docs.yahoo.com/nowyoucan.html
> 

Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
All New Yahoo! Mail – Tired of Vi@gr@! come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html

Re: Can't run Tapestry after adding my own SymbolSource

Posted by Shing Hing Man <ma...@yahoo.com>.
 I have replicated the exception you have. The cause
seems to be 
HiveMind tries to use your custom  SymbolSource 
ConfigurationSymbolSource  to
get the value for
key=org.apache.tapestry.template-encoding.

I would have thought by specifing after=* in

 <source name="ivs.cross.configuration" after="*" 
class="ivs.cross.ConfigurationSymbolSource" />
</contribution>

Hivemind would try to search in  other symbol sources 
first.
I will look into in, but no promises that I can come
up with a solution.

If you press for time, you can  use James' suggestion.

Shing


--- Aleksej <al...@ivs.lt> wrote:

> I got such exception:
> Unable to instantiate component framework:Exception:
> Can't find resource 
> for bundle java.util.PropertyResourceBundle, key 
> org.apache.tapestry.template-encoding
>     
>
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:60)
>     
>
$ServletRequestServicer_10c6807c53f.service($ServletRequestServicer_10c6807c53f.java)
>     
>
$ServletRequestServicer_10c6807c53e.service($ServletRequestServicer_10c6807c53e.java)
>     
>
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
>     
>
$ServletRequestServicerFilter_10c6807c53b.service($ServletRequestServicerFilter_10c6807c53b.java)
>     
>
$ServletRequestServicerFilter_10c6807c53a.service($ServletRequestServicerFilter_10c6807c53a.java)
>     
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
>     
>
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
>     
>
$ServletRequestServicerFilter_10c6807c539.service($ServletRequestServicerFilter_10c6807c539.java)
>     
>
$ServletRequestServicerFilter_10c6807c538.service($ServletRequestServicerFilter_10c6807c538.java)
>     
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
>     
>
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
>     
>
$ServletRequestServicerFilter_10c6807c53d.service($ServletRequestServicerFilter_10c6807c53d.java)
>     
>
$ServletRequestServicerFilter_10c6807c53c.service($ServletRequestServicerFilter_10c6807c53c.java)
>     
>
$ServletRequestServicer_10c6807c540.service($ServletRequestServicer_10c6807c540.java)
>     
>
$ServletRequestServicer_10c6807c533.service($ServletRequestServicer_10c6807c533.java)
>     
>
$ServletRequestServicer_10c6807c532.service($ServletRequestServicer_10c6807c532.java)
>     
>
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
>    
>
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
>    
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>    
>
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> --------------
> Interesting that when I first made everything it
> drop me such or like 
> this exception but
> when I changed before="*" on after="*" in
> SymbolSource contribution 
> everything start working OK
> ( and I was very happy at this moment ). But later,
> after some 
> modifications in other part of applications
> I got that exception again but now playing with
> before or after doesn't 
> help. Anyway I want to  understand
> how does it work, not just make it working. The only
> difference between 
> first  and last code editions
> is that when it worked i used symbol from
> configuration.properties in 
> one service, and later decided to
> insert it into another service too, and thats it.
> Here are some parts of 
> my code:
> 
> Thats how my contribution looks like:
> <contribution
> configuration-id="hivemind.SymbolSources">
>    <source name="ivs.cross.configuration" after="*" 
> class="ivs.cross.ConfigurationSymbolSource" />
> </contribution>
> and here is implementation of symbol source (
> everything is as in Shing 
> tutorial ):
> public class ConfigurationSymbolSource implements
> SymbolSource
> {
>     private ResourceBundle messages;
>     public ConfigurationSymbolSource() throws
> Exception
>     {
>         Locale currentLocale= Locale.getDefault();
>         messages= ResourceBundle.getBundle(
> "configuration", 
> currentLocale );
>     }
>     public String valueForSymbol( String name )
>     {
>         return messages.getString( name );
>     }
> }
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html