URLDecoder error

577 views
Skip to first unread message

pelagic

unread,
Jan 2, 2013, 12:50:37 PM1/2/13
to lif...@googlegroups.com
Hey Lifters,

I'm getting this stacktrace sometimes and can't figure out why. It's comming form somewhere inside lift because I don't see any of my own code in the trace. Any ideas on what is happneing?

fyi - I'm using a Menu.param for this url

INFO  LiftServlet - Request for /partner/clients/Mzk3Nzkw/sites failed URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "uF"
java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "uF"
        at java.net.URLDecoder.decode(URLDecoder.java:173)
        at net.liftweb.util.HttpHelpers$class.urlDecode(HttpHelpers.scala:73)
        at net.liftweb.util.Helpers$.urlDecode(Helpers.scala:34)
        at net.liftweb.http.Req$$anonfun$5$$anonfun$apply$11.apply(Req.scala:435)
        at net.liftweb.http.Req$$anonfun$5$$anonfun$apply$11.apply(Req.scala:432)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
        at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
        at scala.collection.immutable.List.foreach(List.scala:45)
        at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)
        at scala.collection.immutable.List.flatMap(List.scala:45)
        at net.liftweb.http.Req$$anonfun$5.apply(Req.scala:432)
        at net.liftweb.http.Req$$anonfun$5.apply(Req.scala:431)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
        at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
        at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
        at scala.collection.immutable.List.foreach(List.scala:45)
        at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)
        at scala.collection.immutable.List.flatMap(List.scala:45)
        at net.liftweb.http.Req$.queryStringParam$1(Req.scala:431)
        at net.liftweb.http.Req$$anonfun$9.apply(Req.scala:485)
        at net.liftweb.http.Req$$anonfun$9.apply(Req.scala:448)
        at net.liftweb.http.AvoidGAL.thunk(Req.scala:351)
        at net.liftweb.http.Req$$anonfun$16.apply(Req.scala:502)
        at net.liftweb.http.Req$$anonfun$16.apply(Req.scala:501)


Thanks,
Greg

Chenguang He

unread,
Jan 2, 2013, 12:54:31 PM1/2/13
to lif...@googlegroups.com
Can you give a URL which have this issues ?

Chenguang He




--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
 
 

pelagic

unread,
Jan 2, 2013, 12:57:09 PM1/2/13
to lif...@googlegroups.com
yeah it's in the line starting with INFO but here it is: /partner/clients/Mzk3Nzkw/sites

Chenguang He

unread,
Jan 2, 2013, 1:00:51 PM1/2/13
to lif...@googlegroups.com
I think, it is not a Lift problem.
Maybe this link will be helpful?


Chenguang He



pelagic

unread,
Jan 2, 2013, 1:11:46 PM1/2/13
to lif...@googlegroups.com
hmm interesting, I don't see any special characters in my url though. Just a bunch of alpha numberics. Any thoughts?

Tobias Pfeiffer

unread,
Jan 2, 2013, 1:14:48 PM1/2/13
to lif...@googlegroups.com
Hi,

Am Mittwoch, 2. Januar 2013, 19:11 schrieb pelagic:
> hmm interesting, I don't see any special characters in my url though.
> Just a bunch of alpha numberics. Any thoughts?

...non-printable characters like, e.g., soft hyphen? Copy the URL into a
python shell and see whether anything looks weird in the output.

Tobias
signature.asc

Chenguang He

unread,
Jan 2, 2013, 1:22:31 PM1/2/13
to lif...@googlegroups.com
Can your URL pass the following code?

public class test {
    public static void main(String[] args) {
        String a = ""; // put your URL here
        String b;
        try {
            b = URLDecoder.decode(a, "UTF-8");
            System.out.println(b);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
    }
}

Chenguang He




On Jan 2, 2013, at 11:50 AM, pelagic wrote:

pelagic

unread,
Jan 2, 2013, 2:50:27 PM1/2/13
to lif...@googlegroups.com
Chenguang He - the url passed the test.

Tobias - copied the url, nothing looks funny.

I'm at a loss. This is only getting outputed at the INFO level and the page is still accessible and everything seems to work fine, I'm just getting this stacktrace and can't figure out why.

very weird.

Gret

Diego Medina

unread,
Jan 2, 2013, 3:13:57 PM1/2/13
to Lift
in that case, see if you can put together a sample app
https://www.assembla.com/wiki/show/liftweb/Posting_example_code
and we can better help you.

Diego

On Wed, Jan 2, 2013 at 2:50 PM, pelagic <vent...@gmail.com> wrote:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code



--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://www.fmpwizard.com

Jeppe Nejsum Madsen

unread,
Jan 2, 2013, 5:04:37 PM1/2/13
to lif...@googlegroups.com
On Wed, Jan 2, 2013 at 7:11 PM, pelagic <vent...@gmail.com> wrote:
hmm interesting, I don't see any special characters in my url though. Just a bunch of alpha numberics. Any thoughts?


The request may have contained parameters which are not logged...

/Jeppe

pelagic

unread,
Jan 2, 2013, 6:04:29 PM1/2/13
to lif...@googlegroups.com
Jeppe,

that's an interesting thought. I just noticed that it's happening sparatically. sometime the url will go through fine, and other time not. Either way  the page is still rendered correctly. I am adding params for these urls. I use this function to add the params.

  def buildFuncCallbackURL(baseURL: String, func: () => Any): String =
     S.fmapFunc(S.NFuncHolder(func))(key => Helpers.appendFuncToURL(baseURL, key +"=_"))

pelagic

unread,
Jan 3, 2013, 11:49:16 AM1/3/13
to lif...@googlegroups.com
Also, this only seems to only be happening on the heartbeat ajax calls. Trying to create a sample app but having a hard time getting the error to occur.

Greg
Reply all
Reply to author
Forward
0 new messages