Apache wink REST - IllegalArgumentException for a particular header - web-services

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.

Related

Getting error: "The content-type is not JSON compatible" after a period of time

I'm not really sure exactly how long it takes before I get this error, but after a period of time, I get "The content-type is not JSON compatible" error. I am able the query just fine from graphql playground but not in my app. I am using persisted queries, so not sure if that is the cause.
The only fix is to restart my app.
Here is the
stacktrace
Based on the stacktrace you posted I can see that the server (in particular, probably the resolver for whatever query/mutation you are sending) is returning something unexpected i.e. not "JSON compatible".
Based on what you provided, that's all I can say. Please add more details and I can provide additional help. Just including the stacktrace is not enough to determine the cause of this issue.

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.

Mystery... Faked Referrer Generates 500 Instead of 404 Error

I hope someone can provide some clues.I have begun receiving
regular 500 errors from a page that does not exist. Without providing
the entire error page, here are the essentials:
[Django] ERROR (EXTERNAL IP): Internal Server Error: /sample/
path/calendar.pl
IOError: request data read error
'HTTP_REFERER': 'http://mydomain.org/calendar.pl',
'PATH_INFO': u'/sample/path/calendar.pl',
If I visit the page http://mydomain.org/calendar.pl, I get a 404
error, but the error message referencing the same page generates an
internal server (500) error.
QUESTIONS:
Should I be concerned?
Why do I get a 500 error instead of 404 error?
Any suggestions for troubleshooting?
This has been driving me nuts for a few days. Any help is very
appreciated.
Thanks
Are you trying to change one of the attributes of request, which are read-only (or at least, should be considered to be read-only"). Are you trying to change request.META['HTTP_REFERER']?
This is still an open bug which might be resolved in v. 1.6.
In the meantime, though, you can use this workaround in your settings.py file.

Hash anchor tag causing errors in URL

On very rate occasions, my error log is showing the following error:
"You specified a Fuseaction of registrationaction#close which is not defined in Circuit public."
The full link is:"http://myUrl/index.cfm?do=public.registrationAction#close"
As you can see, the has merely points to an anchor (close) on the page.
This code is working 99% of the time, but on the odd occasion, Coldfusion / Fusebox throws this error out.
Why is this happening?
Could it be related to the device accessing my page somehow? Like a cell phone or Apple product that for some reason does handle hashes the way I am expecting it to?
Could it be javascript / JQuery being disabled?
Any guidance would be appreciated
Thanks
I used to see stuff like that. Older versions of Internet Explorer were not handling the hashtag properly when there were URL parameters. The best solution I could come up with was kludgey at best, but basically it forced the anchor tag to separate from the URL parameter.
http://myUrl/index.cfm?do=public.registrationAction&#close
I'm not sure there is a simple answer to this. We get odd exceptions all the time on our site for all sorts of reasons. Sometimes it's people not using the site the way you expect and sometimes it stuff like you mention such as user-agent edge cases etc.
Basically you need to start to gather evidence and see what comes up that's unusual with these requests.
So to start: do you catch exceptions in you application? If so dumping all scopes (CGI/CLIENT/FORM/URL/SESSION) in an email along with the full exception and emailing them to a custom emails address (such as errors#yourdomain.com) will give you a reference you can square up to your error times and this might give you a hint as to the real issue.
Hope that helps some!

System.UnexpectedException: error ID: 1502628612-2761 (-677061709)

When I try to invoke a Java service from an apex class with the wsdl2 apex class I get this error. Can anyone help me please?
System.UnexpectedException: Got an unexpected error in callout : null. Contact support with error ID: 1502628612-2761 (-677061709)
Any time you see the text to contact support and an error ID, it was actually a bug in Salefsorce's code and there's nothing you can really do to make it work as you are trying to use it.
The best you can do is contact their support team and log a ticket. A lot of times they can find a suitable workaround that'll work in the meantime.