[shale] LoadBundle basename not set

2006-03-12 Thread Richard Wallace
I'm trying to update from the 20060130 nightly to the 20060312 nightly 
and I'm getting an IllegalStateException from the LoadBundle component 
that I wasn't getting before.  It looks like the basename attribute 
isn't being set for some reason, and I'm a bit lost as to why.  I 
haven't changed anything in my code other than the version of 
shale-core.jar and shale-clay.jar.  I've looked through the code and 
everything looks fine to me.


Here's the exception that I'm getting and the configuration of the 
LoadBundle in my faces-config.xml:


Caused by: java.lang.IllegalStateException: The 'basename' property 
cannot be null

   at org.apache.shale.util.LoadBundle.getMap(LoadBundle.java:152)
   at 
org.apache.shale.faces.ShalePropertyResolver.getType(ShalePropertyResolver.java:263)
   at 
org.apache.myfaces.config.ManagedBeanBuilder.initializeProperties(ManagedBeanBuilder.java:164)
   at 
org.apache.myfaces.config.ManagedBeanBuilder.buildManagedBean(ManagedBeanBuilder.java:55)
   at 
org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:311)
   at 
org.apache.shale.faces.ShaleVariableResolver.resolveVariable(ShaleVariableResolver.java:152)
   at 
org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:110)
   at 
org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:569)

   at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
   at 
org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
   at 
org.apache.commons.el.ExpressionString.evaluate(ExpressionString.java:114)
   at 
org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378)

   ... 66 more


 managed-bean
   managed-bean-namelabels/managed-bean-name
   managed-bean-class
 org.apache.shale.util.LoadBundle
   /managed-bean-class
   managed-bean-scoperequest/managed-bean-scope
   managed-property
 property-namebasename/property-name
 valuecom.contentconnections.mpl.publicschools.labels/value
   /managed-property
 /managed-bean

I have no idea why all of a sudden the basename wouldn't be getting 
set.  It doesn't look there is anything wrong with the LoadBundle 
component itself.  Did something change in other parts of shale-core 
that could be causing this?


Thanks,
Rich

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



Re: [shale] LoadBundle basename not set

2006-03-12 Thread Gary VanMatre
From: Richard Wallace [EMAIL PROTECTED] 

 I'm trying to update from the 20060130 nightly to the 20060312 nightly 
 and I'm getting an IllegalStateException from the LoadBundle component 
 that I wasn't getting before. It looks like the basename attribute 
 isn't being set for some reason, and I'm a bit lost as to why. I 
 haven't changed anything in my code other than the version of 
 shale-core.jar and shale-clay.jar. I've looked through the code and 
 everything looks fine to me. 
 
 Here's the exception that I'm getting and the configuration of the 
 LoadBundle in my faces-config.xml: 
 

[snippet]

 I have no idea why all of a sudden the basename wouldn't be getting 
 set. It doesn't look there is anything wrong with the LoadBundle 
 component itself. Did something change in other parts of shale-core 
 that could be causing this? 


I can not recreate this one but it has already been reported 
(http://issues.apache.org/bugzilla/show_bug.cgi?id=38784).  There was a recent 
change to the LoadBundle making it implement the Map interface.  This allows 
you to use it directly in an EL #{labels.mylabel} or #{labels.map.mylabel}.

What version of myfaces are you using?  It's working under 1.1.1.

 
 Thanks, 
 Rich 


Gary

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

Re: [shale] LoadBundle basename not set

2006-03-12 Thread Richard Wallace

Gary VanMatre wrote:
From: Richard Wallace [EMAIL PROTECTED] 

I'm trying to update from the 20060130 nightly to the 20060312 nightly 
and I'm getting an IllegalStateException from the LoadBundle component 
that I wasn't getting before. It looks like the basename attribute 
isn't being set for some reason, and I'm a bit lost as to why. I 
haven't changed anything in my code other than the version of 
shale-core.jar and shale-clay.jar. I've looked through the code and 
everything looks fine to me. 

Here's the exception that I'm getting and the configuration of the 
LoadBundle in my faces-config.xml: 




[snippet]

  
I have no idea why all of a sudden the basename wouldn't be getting 
set. It doesn't look there is anything wrong with the LoadBundle 
component itself. Did something change in other parts of shale-core 
that could be causing this? 




I can not recreate this one but it has already been reported 
(http://issues.apache.org/bugzilla/show_bug.cgi?id=38784).  There was a recent 
change to the LoadBundle making it implement the Map interface.  This allows 
you to use it directly in an EL #{labels.mylabel} or #{labels.map.mylabel}.

What version of myfaces are you using?  It's working under 1.1.1.

 
  
I'm using myfaces 1.1.1.  And the above bug is exactly what I'm running 
into.  I've tried with both versions of the usage 
#{labels.map['default.title']} and #{labels['default.title']} and both 
result in the same exception being thrown.


I've created a small example project that is giving me the problem.  
It's 6MB so I've uploaded it rather than attaching it.  You can find it 
at http://www.thewallacepack.net/shale-loadbundle-bug.tar.gz.  I use 
maven 2 to build and deploy it, but it also contains the war file in the 
target directory which you can just deploy directly.  After deploying 
goto http://localhost:8080/shale-loadbundle-bug/test.faces and you 
should get an exception saying it Cannot get value for expression 
'#{labels['default.title']}'.  Upon closer inspection of the tomcat 
logs you should find the same IllegalStateException because the basename 
is null that I've been encountering.


I hope it helps,
Rich
Thanks, 
Rich 




Gary

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





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



Re: [shale] LoadBundle basename not set

2006-03-12 Thread Gary VanMatre
From: Richard Wallace [EMAIL PROTECTED] 

 Gary VanMatre wrote: 
  From: Richard Wallace 
  
  I'm trying to update from the 20060130 nightly to the 20060312 nightly 
  and I'm getting an IllegalStateException from the LoadBundle component 
  that I wasn't getting before. It looks like the basename attribute 
  isn't being set for some reason, and I'm a bit lost as to why. I 
  haven't changed anything in my code other than the version of 
  shale-core.jar and shale-clay.jar. I've looked through the code and 
  everything looks fine to me. 
  
  Here's the exception that I'm getting and the configuration of the 
  LoadBundle in my faces-config.xml: 
  
  
  
  [snippet] 
  
  
  I have no idea why all of a sudden the basename wouldn't be getting 
  set. It doesn't look there is anything wrong with the LoadBundle 
  component itself. Did something change in other parts of shale-core 
  that could be causing this? 
  
  
  
  I can not recreate this one but it has already been reported 
 (http://issues.apache.org/bugzilla/show_bug.cgi?id=38784). There was a recent 
 change to the LoadBundle making it implement the Map interface. This allows 
 you 
 to use it directly in an EL #{labels.mylabel} or #{labels.map.mylabel}. 
  
  What version of myfaces are you using? It's working under 1.1.1. 
  
  
  
 I'm using myfaces 1.1.1. And the above bug is exactly what I'm running 
 into. I've tried with both versions of the usage 
 #{labels.map['default.title']} and #{labels['default.title']} and both 
 result in the same exception being thrown. 
 
 I've created a small example project that is giving me the problem. 
 It's 6MB so I've uploaded it rather than attaching it. You can find it 
 at http://www.thewallacepack.net/shale-loadbundle-bug.tar.gz. I use 
 maven 2 to build and deploy it, but it also contains the war file in the 
 target directory which you can just deploy directly. After deploying 
 goto http://localhost:8080/shale-loadbundle-bug/test.faces and you 
 should get an exception saying it Cannot get value for expression 
 '#{labels['default.title']}'. Upon closer inspection of the tomcat 
 logs you should find the same IllegalStateException because the basename 
 is null that I've been encountering. 
 

Rich, thank you for the example.  I'm not sure what I was missing in my setup 
but your example helped me find the problem.  The basename property was falling 
into the logic in the shale property resolver instead of delegating to the 
original property resolver.  

I closed out this ticket 
http://issues.apache.org/bugzilla/show_bug.cgi?id=38784.  The fix will be in 
the 20060313 nightly build.  Please reopen if needed.  

Thanks for the help,

Gary


 I hope it helps, 
 Rich 
  Thanks, 
  Rich 
  
  
  
  Gary 
  
  
  
  - 
  To unsubscribe, e-mail: [EMAIL PROTECTED] 
  For additional commands, e-mail: [EMAIL PROTECTED] 
  
  
 
 
 - 
 To unsubscribe, e-mail: [EMAIL PROTECTED] 
 For additional commands, e-mail: [EMAIL PROTECTED]