Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception occurs while validating token #21

Closed
jmiranda opened this issue Dec 20, 2013 · 10 comments
Closed

Exception occurs while validating token #21

jmiranda opened this issue Dec 20, 2013 · 10 comments
Assignees
Labels
Milestone

Comments

@jmiranda
Copy link
Contributor

2014-01-04 09:20:06,905 [http-bio-8080-exec-9] ERROR filters.AuthTokenFilters  - No such method error while parsing JSON web token: org.apache.commons.codec.binary.Base64.decodeBase64(Ljava/lang/String;)[B
java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Base64.decodeBase64(Ljava/lang/String;)[B
    at com.nimbusds.jose.util.Base64.decode(Base64.java:60)
    at com.nimbusds.jose.util.Base64.decodeToString(Base64.java:84)
    at com.nimbusds.jose.JWSHeader.parse(JWSHeader.java:268)
    at com.nimbusds.jose.JWSObject.<init>(JWSObject.java:132)
    at com.nimbusds.jose.JWSObject.parse(JWSObject.java:459)
    at AuthTokenFilters$_closure1_closure2_closure3.doCall(AuthTokenFilters.groovy:25)
    at grails.plugins.httplogger.filters.HttpLoggerFilter.doFilter(HttpLoggerFilter.java:47)
    at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53)
    at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:49)
    at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:82)
    at grails.plugins.httplogger.filters.HttpLoggerFilter.doFilter(HttpLoggerFilter.java:44)
    at grails.plugins.httplogger.filters.HttpLoggerFilter.doFilter(HttpLoggerFilter.java:44)
    at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:75)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
@ghost ghost assigned jmiranda Dec 20, 2013
@jmiranda
Copy link
Contributor Author

jmiranda commented Jan 4, 2014

There are two commons-codec JARs included in the catch WAR file.

$ jar -tvf catch.war | grep commons-codec
 46725 Wed Jan 07 23:04:28 EST 2009 WEB-INF/lib/commons-codec-1.3.jar
 73098 Sun Aug 25 14:34:08 EDT 2013 WEB-INF/lib/commons-codec-1.5.jar

@jmiranda
Copy link
Contributor Author

jmiranda commented Jan 5, 2014

Found it!!

$ locate commons-codec-1.3 | grep catch
/home/jmiranda/.grails/2.2.1/projects/catch/plugins/functional-test-1.2.7/lib/commons-codec-1.3.jar

@jmiranda
Copy link
Contributor Author

jmiranda commented Jan 5, 2014

Changed plugin dependency in afPersistence/grails-app/conf/BuildConfig.groovy from

compile ":functional-test:1.2.7" 

to

test ":functional-test:1.2.7"

@paolociccarese
Copy link
Member

There we go. That's something I did not know.
I would have added the exclude for that duplicate library.

On Sat, Jan 4, 2014 at 8:56 PM, Justin Miranda notifications@github.comwrote:

Changed plugin dependency in
afPersistence/grails-app/conf/BuildConfig.groovy from

compile ":functional-test:1.2.7"

to

test ":functional-test:1.2.7"


Reply to this email directly or view it on GitHubhttps://github.com//issues/21#issuecomment-31594138
.

Dr. Paolo Ciccarese
http://www.paolociccarese.info/
Biomedical Informatics Research & Development
Instructor of Neurology at Harvard Medical School
Assistant in Neuroscience at Mass General Hospital
Member of the MGH Biomedical Informatics Core
+1-857-366-1524 (mobile) +1-617-768-8744 (office)

CONFIDENTIALITY NOTICE: This message is intended only for the addressee(s),
may contain information that is considered
to be sensitive or confidential and may not be forwarded or disclosed to
any other party without the permission of the sender.
If you have received this message in error, please notify the sender
immediately.

@jmiranda
Copy link
Contributor Author

jmiranda commented Jan 5, 2014

Yeah, that's the other option and I may need to go back to that if we reference a class from the functional-test plugin in our test classes (I assume we must). I figured I'd give this a chance to see if it works.

@jmiranda
Copy link
Contributor Author

jmiranda commented Jan 5, 2014

i'm done fighting this, so fine.

Sorry, that was meant for a ticket in a different project :)

@jmiranda jmiranda closed this as completed Jan 5, 2014
@jmiranda jmiranda reopened this Jan 5, 2014
@jmiranda
Copy link
Contributor Author

jmiranda commented Jan 5, 2014

Need to reopen because I'm running into this issue when running test-app. In the unit test, it's referencing a different JAR.

file:/home/jmiranda/.grails/ivy-cache/commons-codec/commons-codec/jars/commons-codec-1.3.jar

@jmiranda
Copy link
Contributor Author

jmiranda commented Jan 5, 2014

Ok, this was fixed by adding a global excludes to the BuildConfig.groovy in the AfPersistence plugin.

inherits("global") {
        // uncomment to disable ehcache
        // excludes 'ehcache'
        excludes 'commons-codec'
}

@jmiranda jmiranda closed this as completed Jan 5, 2014
@jmiranda
Copy link
Contributor Author

It's back.

@jmiranda jmiranda reopened this Jan 14, 2014
jmiranda added a commit that referenced this issue Feb 28, 2014
…ve dependency on commons-codec-1.3 (which should finally fix issue #21)
@jmiranda
Copy link
Contributor Author

Should be fixed for good as I've updated the functional-test plugin to the latest version (which does not use commons-codec-1.3 any longer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants