6 Replies Latest reply on Jun 4, 2013 4:17 PM by shane.bryzak

    ClassNotFound with picketlink 2.5.0.Beta3 on JBoss AS7.1.1

    derkd

      I constantly get a classNotFound for the

      org.picketlink.Identity

      class. I copied the dependencies from this example: https://github.com/jboss-jdf/jboss-as-quickstart/tree/master/picketlink-authentication-idm-jsf

      Do I need to configure something in AS7 to make it work with the new picketlink version?

      I could not find the bindings jar and core like there are for 2.16 for jbas7...

       

      Regards,

       

      Derk

        • 1. Re: ClassNotFound with picketlink 2.5.0.Beta3 on JBoss AS7.1.1
          shane.bryzak

          Are you deploying a WAR project?  If so, can you confirm that the following libraries are present in your WEB-INF/lib folder:

           

          picketlink-api.jar

          picketlink-impl.jar

          picketlink-idm-api.jar

          picketlink-idm-impl.jar

           

          Also a stack trace would be helpful too.

          • 2. Re: ClassNotFound with picketlink 2.5.0.Beta3 on JBoss AS7.1.1
            derkd

            This is the stacktrace:

             

            20:08:55,980 INFO  [org.jboss.weld.deployer] (MSC service thread 1-14) JBAS016008: Starting weld service for deployment aphasia-web.war

            20:08:56,319 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-14) WELD-000119 Not generating any bean definitions from eu.dukker.aphasia.authenticator.LoginController because of underlying class loading error

            20:08:56,320 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-14) catching: org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class eu.dukker.aphasia.authenticator.LoginController

                      at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                      at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]

                      at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]

            Caused by: java.lang.NoClassDefFoundError: Lorg/picketlink/Identity;

                      at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_17]

                      at java.lang.Class.privateGetDeclaredFields(Class.java:2317) [rt.jar:1.7.0_17]

                      at java.lang.Class.getDeclaredFields(Class.java:1762) [rt.jar:1.7.0_17]

                      at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:102) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:99) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.util.reflection.SecureReflections.getDeclaredFields(SecureReflections.java:99) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:153) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:49) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:40) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355) [guava-11.0.2.jar:]

                      at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184) [guava-11.0.2.jar:]

                      at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153) [guava-11.0.2.jar:]

                      at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69) [guava-11.0.2.jar:]

                      at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393) [guava-11.0.2.jar:]

                      at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:149) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                      ... 11 more

            Caused by: java.lang.ClassNotFoundException: org.picketlink.Identity from [Module "deployment.aphasia-web.war:main" from Service Module Loader]

                      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                      ... 29 more

             

             

            The jars you mentioned are present.

            • 3. Re: ClassNotFound with picketlink 2.5.0.Beta3 on JBoss AS7.1.1
              shane.bryzak

              Does the quickstart that you linked to in your first post deploy successfully?  Unfortunately the stack trace in this case isn't very helpful, and if the jar files are indeed present then I can't explain the CNFE.  I suggest you try the quickstart, and if that works ok perhaps you can either raise an issue in JIRA or send me a minimal test case (basically your project with only the LoginController bean) so I can work out what's going on.

              1 of 1 people found this helpful
              • 4. Re: ClassNotFound with picketlink 2.5.0.Beta3 on JBoss AS7.1.1
                derkd

                Quickstart deploys fine... hmm so it must be something in my project setup I guess.

                • 5. Re: ClassNotFound with picketlink 2.5.0.Beta3 on JBoss AS7.1.1
                  derkd

                  Ok I know the problem. It had something to do with the artifact in Intellij. WIth jboss as the target dir has to be a .war directory. Normally I had this one mapped to the war/target/<war name>.war (dir) but this time it was mapped to <project_dir>/target and in that dir the picketlink jars where not there. Very strange because everytime I run the jboss as it starts building so I would expect it would also add these jars to the target dir. Only the jars of picketlink where not there...

                  Anyway I don't get the CNFE anymore.

                   

                  Thanks!

                  • 6. Re: ClassNotFound with picketlink 2.5.0.Beta3 on JBoss AS7.1.1
                    shane.bryzak

                    I'm not an IntelliJ user so unfortunately can't comment as to its handling of libraries.  Glad to see you got it fixed though!