You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Florian Parain <fl...@me.com> on 2011/06/17 11:09:51 UTC

T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

Hi,


Here is an exception caught by my Exception Report Handler.

However, I cannot remember seeing the actual exception happened.

(And of course, I'm not able to make it happen.)


Is there someone able to give me some explanations and solutions to avoid
it?


java.lang.IllegalArgumentException:
Input string '${context:css' is not valid; the '$' character at position 1
should be followed by another '$' or a four digit hex number (a unicode
value).



at
org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:138)
at $URLEncoder_1308f64e7ca.decode($URLEncoder_1308f64e7ca.java)
at
org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:92)
at
$ContextPathEncoder_1308f64e7be.decodePath($ContextPathEncoder_1308f64e7be.java)
at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.checkIfPage(ComponentEventLinkEncoderImpl.java:328)
at
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodePageRenderRequest(ComponentEventLinkEncoderImpl.java:320)
at
org.apache.tapestry5.internal.services.linktransform.LinkTransformerInterceptor.decodePageRenderRequest(LinkTransformerInterceptor.java:68)
at
$ComponentEventLinkEncoder_1308f64e7b2.decodePageRenderRequest($ComponentEventLinkEncoder_1308f64e7b2.java)
at
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:41)
at $Dispatcher_1308f64e7b3.dispatch($Dispatcher_1308f64e7b3.java)
at $Dispatcher_1308f64e7ae.dispatch($Dispatcher_1308f64e7ae.java)
at
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:321)
...



Obviously, '${context:css' is in some of my .TML files, most of the time to
call images.


--
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-2-4-Unexpected-illegal-argument-exception-Input-string-context-css-is-not-valid-tp4498202p4498202.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Re: T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

Posted by LLTYK <LL...@mailinator.com>.
I see it too. Haven't tracked it down though. I'd think the only clientside
indicator of the problem would be a missing image.

--
View this message in context: http://tapestry-users.832.n2.nabble.com/T5-2-4-Unexpected-illegal-argument-exception-Input-string-context-css-is-not-valid-tp6486339p6486531.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

Posted by LLTYK <LL...@mailinator.com>.
That's what I changed mine to, I found something commented with .

There definitely aren't bots on my staging server though. Just IE
browsers...

--
View this message in context: http://tapestry-users.832.n2.nabble.com/T5-2-4-Unexpected-illegal-argument-exception-Input-string-context-css-is-not-valid-tp6486339p6551007.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

Posted by Howard Lewis Ship <hl...@gmail.com>.
Better yet, use the <t:remove> directive, rather than a HTML comment,
to (temporarily) remove a stretch of template content.


On Tue, Jul 5, 2011 at 2:45 AM, 9902468 <vi...@greenstreet.fi> wrote:
> Hi,
>
> we have seen this also and more than likely it's not the browsers to blame,
> but the search bots. (At least on open networks.)
>
> I once took a look at our apache logs and discovered that there are many
> bots out there that do not respect any comments on pages at all, but rather
> seem to get everything that has src, href or anything that vaguely resembles
> a url. (Even those that are not in a src or href context.)
>
> The bot probably sees only text that it parses with regexps etc. The
> templates should not contain any comments - those take unneccessary space
> and bloats page in addition to this. ;)
>
> Can we instruct T5 to strip comments before sending content out?
>
>  - Ville
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/T5-2-4-Unexpected-illegal-argument-exception-Input-string-context-css-is-not-valid-tp4498202p4552702.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

Posted by 9902468 <vi...@greenstreet.fi>.
Hi,

we have seen this also and more than likely it's not the browsers to blame,
but the search bots. (At least on open networks.)

I once took a look at our apache logs and discovered that there are many
bots out there that do not respect any comments on pages at all, but rather
seem to get everything that has src, href or anything that vaguely resembles
a url. (Even those that are not in a src or href context.)

The bot probably sees only text that it parses with regexps etc. The
templates should not contain any comments - those take unneccessary space
and bloats page in addition to this. ;) 

Can we instruct T5 to strip comments before sending content out?

 - Ville

--
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-2-4-Unexpected-illegal-argument-exception-Input-string-context-css-is-not-valid-tp4498202p4552702.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

Posted by Florian Parain <fl...@me.com>.
I've got it!

In one of my .TML files I put this comment:
*&lt;!-- &lt;img src=${context:css/img/blabla.png} /&gt; --&gt;*

My guess is some web browsers try to access the image, even if it is a
comment.
And, there is the exception.

I removed this comment from my .TML file.

I keep you informed if it happens again.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-2-4-Unexpected-illegal-argument-exception-Input-string-context-css-is-not-valid-tp4498202p4552500.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

Posted by LLTYK <LL...@mailinator.com>.
This happens randomly for me. Exact same page/template, suddenly decide to
error 1 time out of 100. My guess is it sometimes doesn't process the
expansions.

--
View this message in context: http://tapestry-users.832.n2.nabble.com/T5-2-4-Unexpected-illegal-argument-exception-Input-string-context-css-is-not-valid-tp6486339p6487352.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5.2.4 - Unexpected illegal argument exception: Input string '${context:css' is not valid

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 17 Jun 2011 06:09:51 -0300, Florian Parain  
<fl...@me.com> wrote:

> Hi,

Hi!

> java.lang.IllegalArgumentException:
> Input string '${context:css' is not valid; the '$' character at position  
> 1 should be followed by another '$' or a four digit hex number (a unicode
> value).

Somehow a request to a page had "${context:css" in the URL. By any chance  
are your passing this string from a page or component class to the  
template? Using ${} expansions in templates wouldn't cause this kind of  
error.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org