have you tried with 1.5.3?

-gior

On Sat, Nov 12, 2011 at 10:27 AM, Phill <[email protected]> wrote:
> Thanks, I had put setRootRequestMapper(..) first after reading 
> https://issues.apache.org/jira/browse/WICKET-4139
> However putting it last does not seem to solve the problem, I can replicate 
> the error with a pristine 1.5.2 quickstart and just changing the init() to:
>
> public void init() {
>    super.init();
>    getSecuritySettings().setCryptFactory(new 
> KeyInSessionSunJceCryptFactory());
>    setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
> }
>
> The links in the standard quickstart HomePage.html markup cause the 
> exceptions.
> Phill
>
> On 12/nov/2011, at 18:39, Igor Vaynberg wrote:
>
>> this:
>>
>> setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
>>
>> should be the last thing you do in your application#init()
>>
>> -igor
>>
>> On Sat, Nov 12, 2011 at 6:45 AM, Phill <[email protected]> wrote:
>>> Hi,
>>> I'm migrating a Wicket 1.4 app that uses CryptedUrlWebRequestCodingStrategy 
>>> to 1.5.2 and I'm having some issues:
>>>
>>> In my Application init() before I mount any pages I've got:
>>> getSecuritySettings().setCryptFactory(new KeyInSessionSunJceCryptFactory());
>>> setRootRequestMapper(new CryptoMapper(getRootRequestMapper(), this));
>>>
>>> Any non-wicket URLs in my markup, for example image tags <img 
>>> src="/images/myimg.jpg" …./> and also any references added in 
>>> WebPage.renderHead() produce the exception below. The page displays fine 
>>> including correctly linked images and stylesheets, but the exception is 
>>> thrown.
>>>
>>> @Override
>>> public void renderHead(IHeaderResponse response) {
>>>    super.renderHead(response);
>>>    response.renderCSSReference("css/style.css");
>>> }
>>>
>>>
>>> ERROR - AbstractCrypt              - Error decoding text: css
>>> java.lang.RuntimeException: Unable to decrypt the text 'r?'
>>>        at 
>>> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:150)
>>>        at 
>>> org.apache.wicket.util.crypt.AbstractCrypt.decryptUrlSafe(AbstractCrypt.java:66)
>>>        at 
>>> org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:159)
>>>        at 
>>> org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
>>>        at 
>>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
>>>        at 
>>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
>>>        at 
>>> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1326)
>>> ..snip
>>> Caused by: javax.crypto.IllegalBlockSizeException: Input length must be 
>>> multiple of 8 when decrypting with padded cipher
>>>        at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
>>>        at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)
>>>        at com.sun.crypto.provider.SunJCE_ab.b(DashoA13*..)
>>>        at 
>>> com.sun.crypto.provider.PBEWithMD5AndDESCipher.engineDoFinal(DashoA13*..)
>>>        at javax.crypto.Cipher.doFinal(DashoA13*..)
>>>        at 
>>> org.apache.wicket.util.crypt.SunJceCrypt.crypt(SunJceCrypt.java:94)
>>>        at 
>>> org.apache.wicket.util.crypt.AbstractCrypt.decryptByteArray(AbstractCrypt.java:146)
>>>        ... 32 more
>>> ERROR - CryptoMapper               - Error decrypting URL
>>> java.lang.IllegalArgumentException: Argument 'url' may not be null.
>>>        at org.apache.wicket.util.lang.Args.notNull(Args.java:41)
>>>        at org.apache.wicket.request.Url.parse(Url.java:127)
>>>        at 
>>> org.apache.wicket.request.mapper.CryptoMapper.decryptUrl(CryptoMapper.java:160)
>>>        at 
>>> org.apache.wicket.request.mapper.CryptoMapper.mapRequest(CryptoMapper.java:102)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:181)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:206)
>>>        at 
>>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:280)
>>>        at 
>>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
>>>        at 
>>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
>>> ..snip
>>>
>>> How can I avoid these errors?
>>>
>>> Thanks
>>> Phill
>>>
>>>
>>> ---
>>> Lead Seeker - Lead Generation Done Right
>>> http://www.leadseeker.co.uk
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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]
>>
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to