1 2 Previous Next 18 Replies Latest reply on Apr 14, 2014 10:38 AM by vwjugow Go to original post
      • 15. Re: Errai Security with PicketLink
        mbarkley

        The issue is as explained in the second answer from your stackoverflow link: resteasy-cdi is already provided by jboss. You need to set the dependency to provided like we did in the security demo.

        1 of 1 people found this helpful
        • 16. Re: Errai Security with PicketLink
          vwjugow

          Max, since we weren't using resteasy-cdi I hadn't tried adding it as provided, thought there was no need. After adding it, I was finally able to deploy the project, thanks a lot !!

           

          So now I'm having trouble getting it to work haha. I run it, try to log in as john:123 but the ErrorCallback of identity.login is called. Throwable is null and message.toString() returns this: http://pastebin.com/ZELF7FQR

           

          My money is on the @Startup, I thinks it's not being executed, so no users added.

           

          I've pushed my changes to the repo in case you want to try.

           

          Also I have another question about this line in the pom that I added before:

          <packagingExcludes>**/javax/**/*.*,**/client/local/**/*.class</packagingExcludes>

          It did fix the problem that I was having back then, but I tried adding it in my full app and although it still deploys I get classNotFoundException e.g (java.lang.ClassNotFoundException: app.client.local.strategy.StrategyOperationEvent) Does this means that we are doing things wrong and we should move this class for example to shared package ? Or is it strange that I get this error ?

          • 17. Re: Errai Security with PicketLink
            mbarkley
            My money is on the @Startup, I thinks it's not being executed, so no users added.

            That's at least part of the problem. Your @Startup class is annotated with javax.injection.Singleton, but it should be javax.ejb.Singleton.

            Also I have another question about this line in the pom that I added before:

            <packagingExcludes>**/javax/**/*.*,**/client/local/**/*.class</packagingExcludes>

            It did fix the problem that I was having back then, but I tried adding it in my full app and although it still deploys I get classNotFoundException e.g (java.lang.ClassNotFoundException: app.client.local.strategy.StrategyOperationEvent) Does this means that we are doing things wrong and we should move this class for example to shared package ? Or is it strange that I get this error ?

            Classes in "client.local" is code that is not supposed to be deployed to the server. Errai uses this package naming convention to prevent classes from being deployed to the server which can be potentially harmful. So if you are correct that a class that is used in shared code should be move to a shared pacakage (for example "client.shared", but it could be any package that's part of a GWT module that does not match "client.local").

            • 18. Re: Errai Security with PicketLink
              vwjugow

              Max thank you again. deploy worked and I got an Ok response from the Authentication. Now that I know it works my next step is to implement custom authenticator so I can use my app users and not the dummy picketlink ones. I'll leave this post open until I try that if it's not a problem.

               

              And I'm still having those NotFoundClassException because of the exclusion of client/local but I'll work on that.


              mbarkley  Thank you so much for your time and help, and please forgive me for stupid errors like the wrong import haha.

              1 2 Previous Next