Results 1 to 7 of 7

Thread: how can i gradle cas?

  1. #1
    Join Date
    Jan 2011
    Posts
    5

    Unhappy how can i gradle cas?

    I follow Building Spring Security . environment:
    D:\studyspringspringsecurityGITsource\samples\cas> gradle -v

    ------------------------------------------------------------
    Gradle 0.9.1
    ------------------------------------------------------------

    Gradle build time: Sunday, 2 January 2011 11:40:57 AM EST
    Groovy: 1.7.6
    Ant: Apache Ant version 1.8.1 compiled on April 30 2010
    Ivy: 2.2.0
    JVM: 1.5.0_12 (Sun Microsystems Inc. 1.5.0_12-b04)
    OS: Windows Vista 6.1 x86

    when I gradle cas,an error occurred,how can i do? thanks

    FAILURE: Build failed with an exception.

    * Where:
    Build file 'D:\studyspringspringsecurityGITsource\build.gradl e' line: 11

    * What went wrong:
    A problem occurred evaluating root project 'studyspringspringsecurityGITsource'.

    Cause: java.net.URISyntaxException: Illegal character in authority at index 7: f
    ile://C:\Users\abel/.m2/repository

    * Try:
    Run with -s or -d option to get more details. Run with -S option to get the full
    (very verbose) stacktrace.

    BUILD FAILED

    Total time: 15 mins 27.363 secs

  2. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    Looks like an issue with the URI for the user's home directory on windows. Try removing the line:

    Code:
            mavenRepo name:'Local', urls: "file://" + System.properties['user.home'] + "/.m2/repository"
    or make sure you are using gradle 0.9.1 and replace it with

    Code:
              mavenLocal()
    if you already have a populated local maven repository that you want to use.

    I will upgrade build.gradle to use the mavenLocal() syntax.
    Spring - by Pivotal
    twitter @tekul

  3. #3
    Join Date
    Jan 2011
    Posts
    5

    Default

    thanks,but new question comming, why
    14:51:02.797 [12107880@qtp-6677434-5] DEBUG o.s.security.web.FilterChainProxy -
    /secure/index.jsp at position 1 of 8 in additional filter chain; firing Filter:
    'AuthenticationFilter'
    14:51:02.799 [12107880@qtp-6677434-5] DEBUG o.jasig.cas.client.util.CommonUtils
    - serviceUrl generated: https://localhost:8443/cas/secure/index.jsp
    14:51:02.806 [12107880@qtp-6677434-5] DEBUG o.j.c.c.a.AuthenticationFilter - no
    ticket and no assertion found
    14:51:02.807 [12107880@qtp-6677434-5] DEBUG o.j.c.c.a.AuthenticationFilter - Con
    structed service url: https://localhost:8443/cas/secure/index.jsp
    14:51:02.809 [12107880@qtp-6677434-5] DEBUG o.j.c.c.a.AuthenticationFilter - red
    irecting to "https://localhost:9443/cas/login?service=https%3A%2F%2Flocalhost%3A
    8443%2Fcas%2Fsecure%2Findex.jsp"
    EXCEPTION
    javax.net.ssl.SSLHandshakeException: Remote host closed connection during handsh
    ake
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRec ord(SSLSocketImpl.j
    ava:742)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.perform InitialHandshake(SS
    LSocketImpl.java:1030)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHa ndshake(SSLSocketIm
    pl.java:1057)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHa ndshake(SSLSocketIm
    pl.java:1041)
    at org.mortbay.jetty.security.SslSocketConnector$SslC onnection.run(SslSo
    cketConnector.java:675)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run (QueuedThreadPool.j
    ava:582)
    Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at com.sun.net.ssl.internal.ssl.InputRecord.read(Inpu tRecord.java:333)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRec ord(SSLSocketImpl.j
    ava:723)
    ... 5 more
    2011-01-11 14:52:49,023 INFO [org.jasig.cas.services.DefaultServicesManagerImpl]

  4. #4
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    Under what circumstances does this happen?

    It looks like an SSL issue. However, if I run "gradle cas" from the root directory, I can succesfully browse to the service URL and log in via CAS. I don't see any errors.
    Spring - by Pivotal
    twitter @tekul

  5. #5
    Join Date
    Jan 2011
    Posts
    5

    Default

    I run D:\studyspringspringsecurityGITsource\samples\cas> gradle cas
    build startup config successful :
    10:08:45.604 [main] DEBUG o.s.web.filter.DelegatingFilterProxy - Filter 'springS
    ecurityFilterChain' configured successfully
    2011-01-13 10:08:54,702 INFO [org.jasig.cas.ticket.registry.support.DefaultTicke
    tRegistryCleaner] - <Beginning ticket cleanup.>
    2011-01-13 10:08:54,731 INFO [org.jasig.cas.ticket.registry.support.DefaultTicke
    tRegistryCleaner] - <0 tickets found to be removed.>
    2011-01-13 10:08:54,735 INFO [org.jasig.cas.ticket.registry.support.DefaultTicke
    tRegistryCleaner] - <Finished ticket cleanup.>
    > Building > :spring-security-samples-cas:jettyRun

    then I browsered at https://localhost:8443/cas/ ,input username and password.I saw http 403
    I saw log:
    2011-01-13 10:16:23,507 INFO [org.jasig.cas.authentication.AuthenticationManager Impl] - AuthenticationHandler: org.jasig.cas.authentication.handler.support.Simpl eTestUsernamePasswordAuthenticationHandler successfully authenticated the user which provided the following credentials: [username: abel]
    2011-01-13 10:16:23,530 INFO [org.jasig.cas.CentralAuthenticationServiceImpl] - Granted service ticket [ST-1-F9oESvBKcgTJVuGhxPgb-cas] for service [https://localhost:8443/cas/secure/index.jsp] for user [abel]
    2011-01-13 10:16:23,777 INFO [org.jasig.cas.authentication.AuthenticationManager Impl] - AuthenticationHandler: org.jasig.cas.authentication.handler.support.HttpB asedServiceCredentialsAuthenticationHandler failed to authenticate the user which provided the following credentials: [callbackUrl: https://localhost:8443/cas-sample/secure/receptor]
    2011-01-13 10:16:23,784 ERROR [org.jasig.cas.web.ServiceValidateController] - TicketException generating ticket for: [callbackUrl: https://localhost:8443/cas-sample/secure/receptor]
    org.jasig.cas.ticket.TicketCreationException: error.authentication.credentials.bad
    at org.jasig.cas.CentralAuthenticationServiceImpl.del egateTicketGrantingTicket_aroundBody6(CentralAuthe nticationServiceImpl.java:300)
    at org.jasig.cas.CentralAuthenticationServiceImpl.del egateTicketGrantingTicket_aroundBody7$advice(Centr alAuthenticationServiceImpl.java:44)
    at org.jasig.cas.CentralAuthenticationServiceImpl.del egateTicketGrantingTicket(CentralAuthenticationSer viceImpl.java:1)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.support.AopUtils.invokeJoi npointUsingReflection(AopUtils.java:309)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.invokeJoinpoint(ReflectiveMethodInvocat ion.java:183)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :150)
    at org.springframework.aop.aspectj.MethodInvocationPr oceedingJoinPoint.proceed(MethodInvocationProceedi ngJoinPoint.java:80)
    at org.perf4j.aop.AbstractTimingAspect.doPerfLogging( AbstractTimingAspect.java:71)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.springframework.aop.aspectj.AbstractAspectJAdv ice.invokeAdviceMethodWithGivenArgs(AbstractAspect JAdvice.java:621)
    at org.springframework.aop.aspectj.AbstractAspectJAdv ice.invokeAdviceMethod(AbstractAspectJAdvice.java: 610)
    at org.springframework.aop.aspectj.AspectJAroundAdvic e.invoke(AspectJAroundAdvice.java:65)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :161)
    at org.springframework.aop.interceptor.ExposeInvocati onInterceptor.invoke(ExposeInvocationInterceptor.j ava:89)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :172)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:202)
    at $Proxy47.delegateTicketGrantingTicket(Unknown Source)
    at org.jasig.cas.web.ServiceValidateController.handle RequestInternal(ServiceValidateController.java:127 )
    at org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest(AbstractController.java:153)
    at org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:48)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:790)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:549)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
    at org.jasig.cas.web.init.SafeDispatcherServlet.servi ce_aroundBody2(SafeDispatcherServlet.java:115)
    at org.jasig.cas.web.init.SafeDispatcherServlet.servi ce_aroundBody3$advice(SafeDispatcherServlet.java:4 4)
    at org.jasig.cas.web.init.SafeDispatcherServlet.servi ce(SafeDispatcherServlet.java:1)
    at org.mortbay.jetty.servlet.ServletHolder.handle(Ser vletHolder.java:511)
    at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1166)
    at com.github.inspektr.common.web.ClientInfoThreadLoc alFilter.doFilter(ClientInfoThreadLocalFilter.java :46)
    at org.mortbay.jetty.servlet.ServletHandler$CachedCha in.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(Se rvletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle( SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(Se ssionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(Co ntextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebA ppContext.java:440)
    at org.mortbay.jetty.handler.ContextHandlerCollection .handle(ContextHandlerCollection.java:230)
    at org.mortbay.jetty.handler.HandlerCollection.handle (HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(Ha ndlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(Htt pConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.he aderComplete(HttpConnection.java:926)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser. java:549)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpPa rser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnec tion.java:404)
    at org.mortbay.jetty.bio.SocketConnector$Connection.r un(SocketConnector.java:228)
    at org.mortbay.jetty.security.SslSocketConnector$SslC onnection.run(SslSocketConnector.java:680)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run (QueuedThreadPool.java:582)
    Caused by: error.authentication.credentials.bad
    at org.jasig.cas.authentication.handler.BadCredential sAuthenticationException.<clinit>(BadCredentialsAu thenticationException.java:25)
    at

  6. #6
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    That is a different error from before...

    You probably entered the wrong password - it should match the username. I'd suggest at this point you read up on CAS a bit from the perspective of how the server works, rather than Spring Security integration.
    Spring - by Pivotal
    twitter @tekul

  7. #7
    Join Date
    Jan 2011
    Posts
    5

    Default

    thank you very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •