• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.UnsupportedOperationException

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i need help to fix this problem. I am using janrain social login widget and i get this when it acts like it is login in but it does not www.jbakajiblet.webstarts.com and press the login button.


TTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.UnsupportedOperationException: Parsing the uri '/api/v2/auth_info ' failed.
rl.FailedUri.noop(Uri.scala:73)
rl.FailedUri.segments(Uri.scala:80)
rl.FailedUri.segments(Uri.scala:69)
janrain.utils.LogFilter.normalize(LogFilter.scala:78)
janrain.utils.LogFilter.doFilter(LogFilter.scala:97)

root cause

java.lang.IllegalArgumentException: Illegal character in path at index 17: /api/v2/auth_info
java.net.URI.create(URI.java:859)
rl.Uri$.apply(Uri.scala:103)
janrain.utils.LogFilter.normalize(LogFilter.scala:78)
janrain.utils.LogFilter.doFilter(LogFilter.scala:97)

root cause

java.net.URISyntaxException: Illegal character in path at index 17: /api/v2/auth_info
java.net.URI$Parser.fail(URI.java:2829)
java.net.URI$Parser.checkChars(URI.java:3002)
java.net.URI$Parser.parseHierarchical(URI.java:3086)
java.net.URI$Parser.parse(URI.java:3044)
java.net.URI.<init>(URI.java:595)
java.net.URI.create(URI.java:857)
rl.Uri$.apply(Uri.scala:103)
janrain.utils.LogFilter.normalize(LogFilter.scala:78)
janrain.utils.LogFilter.doFilter(LogFilter.scala:97)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.21 logs.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The line with the "UnsupportedOperationException" actually shows what I think the problem is: what is character 17 of the URI? Keep in mind that the first index is 0.
 
jb walters
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<script type="text/javascript">
(function() {
if (typeof window.janrain !== 'object') window.janrain = {};
if (typeof window.janrain.settings !== 'object') window.janrain.settings = {};

janrain.settings.tokenUrl = 'https://rpxnow.com/api/v2/auth_info ';

function isReady() { janrain.ready = true; };
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", isReady, false);
} else {
window.attachEvent('onload', isReady);
}

var e = document.createElement('script');
e.type = 'text/javascript';
e.id = 'janrainAuthWidget';

if (document.location.protocol === 'https:') {
e.src = 'https://rpxnow.com/js/lib/jbwalters/engage.js';
} else {
e.src = 'http://widget-cdn.rpxnow.com/js/lib/jbwalters/engage.js';
}

var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(e, s);
})();
</script>
Sign-In

this is the scrpit to make it work, can you tell what the index is?
 
jb walters
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Point the widget at your token URL:

Set the janrain.settings.tokenUrl parameter in the Javascript widget code.

Add your token URL domain to the whitelist:

To increase security, Janrain will only accept token URLs under the domains in this list.
jbakajiblet.webstarts.com localhost myopenid.com
Enter domains comma-separated or one per line. Example: example.com or *.example.com
Save

Set up your token URL to do the following:

1. Extract the token parameter from the POST data.
2. Use the token to make the auth_info API call:
URL: https://rpxnow.com/api/v2/auth_info
Parameters:

apiKey
took it out of message
token
The token value you extracted above

3. Parse the response and extract the identifier.
Here's a sample JSON response:

{
'stat': 'ok',
'profile': {
'identifier': 'http://user.myopenid.com/',
'email': 'user@example.com',
'preferredUsername': 'Joe User'
}
}

4. Use the identifier as the unique key to sign the user in to your website, and then redirect the user to the appropriate location.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm fairly certain that none of that has anything to with it. Your first post has all the info you need - check the line with the "UnsupportedOperationException" very carefully, and reread my previous post.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I stand somewhat corrected - your second post actually contains the cause of the problem, as it contains the problematic URL.
 
jb walters
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am not good at programming i am using a already built website maker where you just import the code. i made the app on janrain but i do not understand what it is. I can only edit the things i show you. i can not edit the first thing. i have no idea what to do i took out the underscore then it came up with file path at index 16 character so i do not know what to do. could you just please help me with this and explain how i could fix it.
 
jb walters
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
so how could i fix the problmatic url? do i need to adjust it some way
 
jb walters
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how is the url problematic?
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why did you take out the underscore? It's only at position 12 of the bad URL. The offending character is the one after the "o".
 
jb walters
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can you underline the bad character in the url and post it so i could correct it. I do know which o you are talking about. IS it this url

janrain.settings.tokenUrl = 'https://rpxnow.com/api/v2/auth_info ';
 
Paul Clapham
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here you are: illegal character underlined. 'https://rpxnow.com/api/v2/auth_info '
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic