1 2 Previous Next 27 Replies Latest reply on Mar 30, 2016 10:58 AM by assistenza.bss Go to original post
      • 15. Re: JWT example for Picketlink 2.6.0
        hodrigohamalho

        No, I'm using 2.7.0 version.

        • 16. Re: JWT example for Picketlink 2.6.0
          hodrigohamalho

          I really don't know how i fixed it. But, I fixed. And the problem was not dependencies.

          • 17. Re: JWT example for Picketlink 2.6.0
            trumanustm

            Rodrigo, please, try to figure out how to solve it, i'm still have the same problem

            with the last release of picketlink...

             

            and

            • 18. Re: JWT example for Picketlink 2.6.0
              jimmy001

              Hello,

               

              I am facing the same problem (using JWT Example). When moving the file "picketlink-2.7.0.CR3.jar" from

              WEB-INF/lib

              to ear/lib

              I receive

               

              2015-01-20 14:23:14,265 ERROR [io.undertow.request] (default task-13) UT005023: Exception handling request to /app/rest/private/authc: org.jboss.resteasy.spi.UnhandledException: org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not find MessageBodyWriter for response object of type: java.util.HashMap of media type: application/octet-stream

                  at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:157) [resteasy-jaxrs-3.0.8.Final.jar:]

                  at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:176) [resteasy-jaxrs-3.0.8.Final.jar:]

                  at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.8.Final.jar:]

                  at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.8.Final.jar:]

                  at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.8.Final.jar:]

                  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]

                  at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

               

              Has anyone a solution to this problem?

              Thx

              • 19. Re: JWT example for Picketlink 2.6.0
                jimmy001
                • 20. Re: JWT example for Picketlink 2.6.0
                  pcraveiro

                  Actually, I think this is related with classloader issues when sharing libs within an EAR. There are some known issues in CDI regarding EARs. See references.

                   

                  I would suggest to keep PL related jars inside the WAR. That works for me.

                   

                  Regards.

                   

                  References:

                  [CDI-129] Clarify behaviour of @ApplicationScoped in EARs - JBoss Issue Tracker

                  https://issues.apache.org/jira/browse/DELTASPIKE-335

                  • 21. Re: JWT example for Picketlink 2.6.0
                    matbarni

                    08:52:54,772 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."picketlink-angularjs-rest-0.1.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."picketlink-angularjs-rest-0.1.war".WeldStartService: Failed to start service

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1936) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

                      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_40]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_40]

                      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_40]

                    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous. Name loginCredentials resolves to beans [Managed Bean [class org.picketlink.credential.DefaultLoginCredentials] with qualifiers [@Default @Any @Named], Managed Bean [class org.picketlink.credential.DefaultLoginCredentials] with qualifiers [@Default @Any @Named]]

                      at org.jboss.weld.bootstrap.Validator.validateBeanNames(Validator.java:488)

                      at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:377)

                      at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)

                      at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

                      ... 3 more

                     

                     

                    08:52:54,789 ERROR [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: O procedimento da implantação "picketlink-angularjs-rest-0.1.war" foi revertido com falha de mensagem

                    {"JBAS014671: Falha de serviços" => {"jboss.deployment.unit.\"picketlink-angularjs-rest-0.1.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"picketlink-angularjs-rest-0.1.war\".WeldStartService: Failed to start service

                        Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous. Name loginCredentials resolves to beans [Managed Bean [class org.picketlink.credential.DefaultLoginCredentials] with qualifiers [@Default @Any @Named], Managed Bean [class org.picketlink.credential.DefaultLoginCredentials] with qualifiers [@Default @Any @Named]]"}}

                     

                     

                     

                    Does anyone knows how to fix this? I'm desperate already.

                    • 22. Re: JWT example for Picketlink 2.6.0
                      hodrigohamalho

                      I could reproduce this issue in another project.

                      This happens when you change one unprotected rest endpoint to protected but keep calling the unprotected one.

                       

                      Ex: rest/myendpoint/list      ---------->        rest/protected/myendpoint/list

                       

                      And your application frontend call rest/myendpoint/list  instead rest/protected/myendpoint/list .

                       

                      I think the correct behavior is the Picketlink (or resteasy) return a 404 when the wrong url is called.

                       

                      To workaround this issue you just need to call the correct URL.

                      • 23. Re: JWT example for Picketlink 2.6.0
                        davidfdr.davidfdr.gmail.com

                        I am facing same issue trying to run picketlink-angularjs-rest under wildfly 8.2.0.

                         

                           

                        <version.picketlink.javaee.bom>2.7.0.Final</version.picketlink.javaee.bom>

                         

                           <dependency>
                           <groupId>org.picketlink</groupId>
                           <artifactId>picketlink-javaee-7.0</artifactId>
                           <version>${version.picketlink.javaee.bom}</version>
                           <scope>import</scope>
                           <type>pom</type>
                           </dependency>
                        • 24. Re: JWT example for Picketlink 2.6.0
                          icaro56

                          I try to use picketlink for jwt authentication but I give up. I think the picketlink should have a quickstart to picketlink-javaee-7.0 with only the necessary to the security rest webservice. The modules for json do not come in "module 2.7.1 installation". In short picketlink is complicated for me. I was trying picketlink with Wildfly 10.

                          • 25. Re: JWT example for Picketlink 2.6.0
                            jimmy001
                            • 26. Re: JWT example for Picketlink 2.6.0
                              icaro56

                              Thanks, but I has used this implementation: http://stackoverflow.com/questions/26777083/best-practice-for-rest-token-based-authentication-with-jax-rs-and-jersey

                               

                              I follow this post and built my simple security.

                              • 27. Re: JWT example for Picketlink 2.6.0
                                assistenza.bss

                                I've a similar problem.

                                 

                                I was able to start picketlink with EAR.

                                The HttpSecurityConfiguration start and also the IdentityManagementConfiguration; the initializer create my default partition on database and also default identity.

                                 

                                When i call web service for token release, i riceve the error:

                                 

                                [org.picketlink.http] (default task-7) PLINK002100: Authentication failed for account [bssadmin].: org.picketlink.authentication.AuthenticationException: No org.picketlink.idm.credential.Token$Provider was found

                                 

                                the problem is that the Token provider is not injected even if it is in the WAR.

                                How can I solve it?

                                1 2 Previous Next