Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.0.0.M5
    • Fix Version/s: None
    • Component/s: OAuth 2
    • Labels:
      None
    • Environment:
      Java 1.6, Maven 3

      Description

      Currently there are 2 issues with the oAuth2 samples.

      https://github.com/SpringSource/spring-security-oauth
      First, Jetty does not correctly run with maven 3. This has been corrected with the attached patch for the build files.

      Second, on the client project (tonr2), no security context is set after loading the authorization redirect from sparklr2. As a result, calls to the images crash due to a lack of an OAuth2ClientContext.

      1. 0001-Fixed-maven-3-jetty-plugin-problems.patch
        13 kB
        Todd Nine
      2. debug.log
        242 kB
        Todd Nine
      3. tomcat.log
        177 kB
        Todd Nine
      1. failedsparklrphotos.png
        28 kB

        Activity

        Hide
        Todd Nine added a comment -

        Latest tomcat log

        Show
        Todd Nine added a comment - Latest tomcat log
        Hide
        Dave Syer added a comment -

        I can't actually see any errors in the latest log (Jan 10). Was there something in particular in there that caught your eye?

        Show
        Dave Syer added a comment - I can't actually see any errors in the latest log (Jan 10). Was there something in particular in there that caught your eye?
        Hide
        Dave Syer added a comment -

        All the samples work for me. Please start a new topic in the forum if you still need help with this.

        Show
        Dave Syer added a comment - All the samples work for me. Please start a new topic in the forum if you still need help with this.
        Hide
        Stefan Larsson added a comment -

        The origin of the confusing System.currentTimeMillis() message is the AnnotationMethodHandlerExceptionResolver,
        see http://stackoverflow.com/questions/5652233/spring-mvc-exception-invoking-request-method-resulted-in-exception-public-st/5655429#5655429
        I have the same stack trace as the above link.

        In my case the cause of this was a NullPointerException in my client application's Spring controller, apparently AnnotationMethodHandlerExceptionResolver runs into trouble resolving that, turning on DEBUG logging for spring helps making the problem a little bit more clear:

        DEBUG org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver - Resolving exception from handler [MyController@78d03350]: java.lang.NullPointerException
        DEBUG org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver - Invoking request handler method: public static native long java.lang.System.currentTimeMillis()
        ERROR org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver - Invoking request method resulted in exception : public static native long java.lang.System.currentTimeMillis()
        java.lang.IllegalArgumentException: Invalid handler method return value: 1328614772756
        at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.getModelAndView(AnnotationMethodHandlerExceptionResolver.java:410)
        at
        ...
        
        Show
        Stefan Larsson added a comment - The origin of the confusing System.currentTimeMillis() message is the AnnotationMethodHandlerExceptionResolver, see http://stackoverflow.com/questions/5652233/spring-mvc-exception-invoking-request-method-resulted-in-exception-public-st/5655429#5655429 I have the same stack trace as the above link. In my case the cause of this was a NullPointerException in my client application's Spring controller, apparently AnnotationMethodHandlerExceptionResolver runs into trouble resolving that, turning on DEBUG logging for spring helps making the problem a little bit more clear: DEBUG org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver - Resolving exception from handler [MyController@78d03350]: java.lang.NullPointerException DEBUG org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver - Invoking request handler method: public static native long java.lang.System.currentTimeMillis() ERROR org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver - Invoking request method resulted in exception : public static native long java.lang.System.currentTimeMillis() java.lang.IllegalArgumentException: Invalid handler method return value: 1328614772756 at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.getModelAndView(AnnotationMethodHandlerExceptionResolver.java:410) at ...
        Hide
        Dave Syer added a comment -

        OK, that's useful. So the problem is in the user code, and is masked by some confusing behaviour of Spring MVC. I recommend isolating the problem to leave out the Security concerns and raising a ticket with SPR-*.

        Show
        Dave Syer added a comment - OK, that's useful. So the problem is in the user code, and is masked by some confusing behaviour of Spring MVC. I recommend isolating the problem to leave out the Security concerns and raising a ticket with SPR-*.

          People

          • Assignee:
            Dave Syer
            Reporter:
            Todd Nine
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: