Clojure java.lang.RuntimeException when using http://www.tryclj.com/ - clojure

I am learning clojure on tryclj. Why is this not working? It should work based on this.
> (Character/toLowerCase \F)
java.lang.RuntimeException: Unable to resolve symbol: toLowerCase in this context
> (.toLowerCase "FRED")
java.lang.RuntimeException: Unable to resolve symbol: toLowerCase in this context
Update
The problem was the browser. I was using chrome originally. I tried it in IE and firefox and java.lang.RuntimeException: does not appear. I didn't realise the browser would make a difference.

As mentioned in a comment the argument from the first expression should be a Character literal since the function Character/toLowerCase expects a char.
The other expression should work just fine in TryClj, at least it does for me, please see the following screenshot.

Related

"An error was encountered with the requested page" in jmeter even capture variables by using regular expression extractor

I have used jmeter to record login flow of application , when i re run it there are some requests failing so i fetch dynamic values from earlier responses and supplies those values to subsequent requests
I am facing some issues there is State token in requests but format of this is changing dynamically so because of that when i rerun some time requests are passing some time failing
Here those are
Fail case
{"stateToken":"00UaBoY\x2D81AIL32Nz9qmUJrIarSv3OgfUdd8FHGSkb"}
{"stateToken":"00C8O4pt\x2DcSPEzHrt69zqmEGta9KbjdwywEVdkICku"}
{"stateToken":"00JgMsy7\x2DzXDP0gxaeWv4dj8EguFTWtnLxV\x2DBKTkIq"}
Working case
{"stateToken":"00fswJVHKpW7dNhNVK0bRclBBrsuMLHBBevJ8IS1Wz"}
{"stateToken":"00ZVZXpSJn7v3lxNTrEqy1mAGydgroO5apvoTlWH2u"}
My regular expression for capture state token is stateToken":"(.+?)"
what is issue here ?
the second issue is saml,relay state are not working even regax working fine in regax tester , i am getting "An error was encountered with the requested page". in debug sampler those 2 variables are getting and passed ( screenshot is attached )
Anyone have ideas related above 2 issues please give some ideas to sort out this
Your failing requeststokens have\x`.
You will have to encode the value and send the request.
In HTTP Request
Check the filed URL encode?
Encoding the value with function
It sounds like a bug in your application, I don't think it's JMeter issue, presumably it's due to presence of these \x2D characters (may be incorrect work of unicode escape)
I don't know what does your application expect instead of this \x2D try to inspect the JavaScript code of the application to see what it does do the tokens, when you figure this out you can replicate this token conversion logic in JSR223 PreProcessor and Groovy language

Wagtail Page Reverse Error when trying to edit a page

I'm getting the following error:
Reverse for 'wagtail_serve' not found. 'wagtail_serve' is not a valid view function or pattern name.
This is a new install and I'm trying to edit the default landing page. I've never had this error before.
Django==2.2.1
wagtail==2.5
wagtail-condensedinlinepanel==0.5.2
wagtailmenus==2.13
Any ideas on what could be causing this? Did I miss a setting somewhere? Any suggestions?

Problems with Google Api query in Clojure

When I am executing the following query
(require '[clj-http.client :as http])
(http/post "https://www.googleapis.com/oauth2/v1/userinfo"
{:query-params {:access_token "token"}})
SunCertPathBuilderException unable to find valid certification path to requested target
sun.security.provider.certpath.SunCertPathBuilder.build
(SunCertPathBuilder.java:141)
This error also sometimes appears when executing the code
ExceptionInfo clj-http: status 404 slingshot.support/stack-trace (support.clj:201)
If someone could help me, I would appreciate it ...
You'll need to review these two sections:
Enable logging at the debug level, so you can get a better idea of why it's failing: https://github.com/dakrone/clj-http#logging
I think the issue is related to missing configuration for calls to an HTTPS address. Try changing the call as shown here: https://github.com/dakrone/clj-http#keystores-trust-stores . Here is an example answer that shows how to set SSL certs in more detail: https://stackoverflow.com/a/1710543/483566
Thank you Denis for the prompt response! I have reviewed the links, however what I found is to change the JDK 8 to JDK 7. But I would like to know why this situation occurs.

Regex in RedirectRoute not working correctly

I have looked into how to use a regex within a RedirectRoute using webapp2. I have tried formatting it the way it says to do so here: http://webapp-improved.appspot.com/guide/routing.html#the-url-template and I still cannot get my regex to work. Here is what I have:
RedirectRoute('/book/<bookId:([0-9]+)><title:(.*)>',handlers.book,name='book')
the call for this is:
self.redirect_to('book/%s_%s' %(bookId,title))
and an example of the url I am expecting is:
book/5907332378656768_The-Wizzard-of-Oz
When I run my app I get the following error:
Error: "Route named u'book/5907332378656768_The-Wizzard-of-Oz' is not defined.
Any help would be greatly appreciated.
EDIT:
Hey everyone! Thanks to Brent's response I was able to fix the problem.
I had to change self.redirect_to('book/%s_%s' %(bookId,title))
to the following: self.redirect('book/%s_%s' %(bookId,title))
Thank you everyone for your help!
A Google search for webapp2 error route "is not defined" finds the Webapp2 source code. That error message is in the method default_builder() which is called from redirect_to(). That method looks for the name field ('book' in this case). Maybe you meant to call redirect() instead?
I think you can leave the parentheses off the patterns:
RedirectRoute('/book/<bookId:[0-9]+><title:.*>',handlers.book,name='book')

Apache wink REST - IllegalArgumentException for a particular header

My rest service works fine if I give the authentication header. But the same is throwing 500 internal Service error when I add log-level=debug|info along with the authentication header. I don't know where it is failing. I'm getting only the below errors.
org.apache.wink.server.internal.RequestProcessor logException
IllegalArgumentException occurred during the handlers chain invocation
I could not able to get more information about the error. Please help me. Thanks.
Update:
i'm using wink incubator 1.1.1
Atlast found the solution to this. Instead of debug, when i try with Debug this is working fine. The exception was thrown from a .jar. when I got the source of it, i debugged and found the value for loglevel was in a enum and its in camelcase. The issue is fixed now. Thanks for your responses.