Reply To: SEO URL supporting l10n/i18n with //Rewrite

Splash Forums Rewrite Users SEO URL supporting l10n/i18n with //Rewrite Reply To: SEO URL supporting l10n/i18n with //Rewrite

#23598

Stephan Rudolph
Participant

After implementing the change the application comes up and running, but no navigation is possible. As soon as I try to navigate exceptions are thrown as follows:

[#|2013-04-18T22:32:20.569+0200|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=109;_ThreadName=Thread-2;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
org.ocpsoft.rewrite.exception.RewriteException: El provider [org.ocpsoft.rewrite.faces.FacesExpressionLanguageProvider] could not inject property [localeHandler.languageSelected} with value [[Ljava.lang.String;@64fea8f0]
    ...
Caused by: java.lang.IllegalArgumentException: FacesContext.getCurrentInstance() returned null. EL expressions can only be evaluated in the JSF lifecycle. You should use PhaseAction and PhaseBinding to perform an deferred operation instead.
	at org.ocpsoft.rewrite.faces.FacesExpressionLanguageProvider.getFacesContext(FacesExpressionLanguageProvider.java:132)
	at org.ocpsoft.rewrite.faces.FacesExpressionLanguageProvider.submitValue(FacesExpressionLanguageProvider.java:47)
	at org.ocpsoft.rewrite.el.El$ElProperty.submit(El.java:345)
	... 30 more
|#]

[#|2013-04-18T22:32:20.648+0200|WARNING|glassfish3.1.2|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=108;_ThreadName=Thread-2;|StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
org.ocpsoft.rewrite.exception.RewriteException: El provider [org.ocpsoft.rewrite.cdi.CdiExpressionLanguageProvider] could not inject property [localeHandler.languageSelected} with value [[Ljava.lang.String;@5a4a0750]
    ...
Caused by: javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier 'localeHandler'
	at com.sun.el.lang.ELSupport.throwUnhandled(ELSupport.java:66)
	at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:105)
	at com.sun.el.parser.AstValue.getTarget(AstValue.java:149)
	at com.sun.el.parser.AstValue.getType(AstValue.java:84)
	at com.sun.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:200)
	at org.jboss.weld.el.WeldValueExpression.getType(WeldValueExpression.java:93)
	at org.ocpsoft.rewrite.cdi.CdiExpressionLanguageProvider.getExpectedType(CdiExpressionLanguageProvider.java:107)
	at org.ocpsoft.rewrite.cdi.CdiExpressionLanguageProvider.submitValue(CdiExpressionLanguageProvider.java:46)
	at org.ocpsoft.rewrite.el.El$ElProperty.submit(El.java:345)
	... 30 more
|#]