[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
java.lang.StringIndexOutOfBoundsException in Resource Key Lookup  XML
Forum Index -> Development
Author Message
bthalheim

Power User

Joined: 05/04/2012 11:45:24
Messages: 72
Offline

Hi,

I get the following exception when using a Resource Bundle:
Code:
2012:06:13 15:19:17:933 | 18     | INFO     | Problems getting property: #{rr.EditorTexte['vorgangseditor.banknummer']}, java.lang.StringIndexOutOfBoundsException: String index out of range: -1
 .......... Stacktrace Info ..........
 java.lang.StringIndexOutOfBoundsException: String index out of range: -1
 	at java.lang.String.substring(String.java:1937)
 	at org.eclnt.jsfserver.util.StackedValueExpression.getValue(StackedValueExpression.java:213)
 	at javax.faces.component.UIComponentBase$AttributesMap.get(UIComponentBase.java:2230)
 	at org.eclnt.jsfserver.elements.BaseComponent.getAttributesGet(BaseComponent.java:1365)
 	at org.eclnt.jsfserver.elements.BaseComponent.encodeBegin(BaseComponent.java:590)
 	at org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.encodeSubComponent(FIXGRIDComponent.java:1163)
 	at org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.encodeChildren(FIXGRIDComponent.java:782)
 	at org.eclnt.jsfserver.elements.BaseComponent.encodeSubComponent(BaseComponent.java:1055)
 	at org.eclnt.jsfserver.elements.BaseComponent.encodeSubComponent(BaseComponent.java:1060)
 	at org.eclnt.jsfserver.elements.BaseComponent.encodeChildren(BaseComponent.java:820)


What's going on?

Thanks,

Björn
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi,

hmmm, everything is OK what I see in your post... We checked with exact the same naming, no errors...

Could we do some screensharing session?

Regards,
Björn

Björn Müller, CaptainCasa GmbH
bthalheim

Power User

Joined: 05/04/2012 11:45:24
Messages: 72
Offline

Actually, I just replaced the dot in the Property key by an underscore.
Now, I see no Property-Key-Related Errors any more and my field which is binded to the Resource key says: {EditorTexte.vorgangseditor_banknummer}
This might be a deployment issue, so I'll do a complete redeploy and meanwhile find out how to do screensharing ...
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

...screensharing: we can send a Mikogo-Invitation... Just write a mail.
Björn

Björn Müller, CaptainCasa GmbH
bthalheim

Power User

Joined: 05/04/2012 11:45:24
Messages: 72
Offline

It turned out my problem was in the end, that the Property Files I created were not correctly deployed, but the old ones. The lesson learned here is to have a look into the unzipped war file in your tomcat webapps directory and correct things in there if necessary. Or to cleanly build and deploy, to be sure.

Dots in Property Keys should actually work, but I'll not try to find that out. Underscore works for me so I'llk stick to these now.

Thanks Björn for your help.
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

...we did some extended "research" on this because the stack trace that you added should never happen, regardless of deployment issues.

The only situation that we can imagine is, that '-character is somehow coming as "'" and that then we do not recognize that the "." is within quotas. We already check for """ which is the normal "-character...

We now added this to the expression processing...

Regards, Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team