5 Replies Latest reply on Sep 5, 2014 12:49 PM by pcraveiro

    error during run example picketlink-angularjs-rest

    alekspo

      I try to launch the picketlink-angularjs-rest example. I configured a night snapshot repo to get picketlink-2.7.0-SNAPSHOT. And tried to run it in Intellij Idea in result got this error:

       

      [2014-08-26 12:31:58,517] Artifact picketlink-angularjs-rest:war: Error during artifact deployment. See server log for details.
      [2014-08-26 12:31:58,518] Artifact picketlink-angularjs-rest:war: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"picketlink-angularjs-rest.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"picketlink-angularjs-rest.war\".WeldStartService: Failed to start service
          Caused by: org.jboss.weld.exceptions.DeploymentException: Exception List with 2 exceptions:
      Exception 0 :
      org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Provider with qualifiers @Default
        at injection point [BackedAnnotatedField] @Inject private org.jboss.as.quickstarts.picketlink.angularjs.security.model.IdentityModelManager.tokenProvider
        at org.jboss.as.quickstarts.picketlink.angularjs.security.model.IdentityModelManager.tokenProvider(IdentityModelManager.java:0)
      
      
        at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:368)
        at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:289)
        at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:135)
        at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:166)
        at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:514)
        at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
        at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
        at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
        at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
      Exception 0 :
      org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type Provider with qualifiers @Default
        at injection point [UnbackedAnnotatedField] @Inject private org.jboss.as.quickstarts.picketlink.angularjs.security.service.LogoutService.tokenProvider
        at org.jboss.as.quickstarts.picketlink.angularjs.security.service.LogoutService.tokenProvider(LogoutService.java:0)
      
      
        at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:368)
        at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:289)
        at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:135)
        at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:166)
        at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:514)
        at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:68)
        at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:66)
        at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
        at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
      "}}
      
      

      Any idea what I have missed?

        • 1. Re: error during run example picketlink-angularjs-rest
          pcraveiro

          Not sure, is this still happening ? How are u deploying the application ?

          • 2. Re: Re: error during run example picketlink-angularjs-rest
            alekspo

            I am deploying it as war artifact in Intellij Idea. And I tried to deploy using mvn -Pwildfly clean package wildly:deploy on run standalone server.

            In picketlink version Beta1 this error still persists.

            In latest snapshot I have this error:

             

            [0m [31m22:29:17,045 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."picketlink-angularjs-rest.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."picketlink-angularjs-rest.war".WeldStartService: Failed to start service
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_05]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_05]
              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_05]
            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 @Named @Any],
              - Managed Bean [class org.picketlink.credential.DefaultLoginCredentials] with qualifiers [@Default @Named @Any]
              at org.jboss.weld.bootstrap.ConcurrentValidator$5.doWork(ConcurrentValidator.java:134)
              at org.jboss.weld.bootstrap.ConcurrentValidator$5.doWork(ConcurrentValidator.java:130)
              at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:60)
              at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:53)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_05]
              ... 3 more
            
            
            [0m [31m22:29:17,055 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "picketlink-angularjs-rest.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"picketlink-angularjs-rest.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"picketlink-angularjs-rest.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 @Named @Any],
              - Managed Bean [class org.picketlink.credential.DefaultLoginCredentials] with qualifiers [@Default @Named @Any]"}}
            [0m [31m22:29:17,058 ERROR [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "picketlink-angularjs-rest.war" was rolled back with the following failure message:
            {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"picketlink-angularjs-rest.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"picketlink-angularjs-rest.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 @Named @Any],
              - Managed Bean [class org.picketlink.credential.DefaultLoginCredentials] with qualifiers [@Default @Named @Any]"}}
            [0m [0m22:29:17,069 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 18) JBAS011410: Stopping Persistence Unit (phase 2 of 2) Service 'picketlink-angularjs-rest.war#primary'
            [0m [0m22:29:17,070 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 18) HHH000227: Running hbm2ddl schema export
            [0m [0m22:29:17,102 INFO  [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 18) HHH000230: Schema export complete
            [0m [0m22:29:17,103 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016009: Stopping weld service for deployment picketlink-angularjs-rest.war
            [0m [0m22:29:17,160 INFO  [org.jboss.as.jpa] (ServerService Thread Pool -- 18) JBAS011410: Stopping Persistence Unit (phase 1 of 2) Service 'picketlink-angularjs-rest.war#primary'
            [0m [0m22:29:17,164 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010409: Unbound data source [java:jboss/datasources/example-ds]
            [0m [0m22:29:17,182 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment picketlink-angularjs-rest.war (runtime-name: picketlink-angularjs-rest.war) in 123ms
            [0m [0m22:29:17,192 INFO  [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report
            JBAS014775:    New missing/unsatisfied dependencies:
                  service jboss.deployment.unit."picketlink-angularjs-rest.war".WeldBootstrapService (missing) dependents: [service jboss.deployment.unit."picketlink-angularjs-rest.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator, service jboss.deployment.unit."picketlink-angularjs-rest.war".component.SecurityInitializer.WeldInstantiator, service jboss.deployment.unit."picketlink-angularjs-rest.war".component.PersonService.WeldInterceptorBindingsService, service jboss.undertow.deployment.default-server.default-host./picketlink-angularjs-rest, JBAS014799: ... and 22 more ]
                  service jboss.deployment.unit."picketlink-angularjs-rest.war".WeldStartService (missing) dependents: [service jboss.deployment.unit."picketlink-angularjs-rest.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".WeldInstantiator, service jboss.deployment.unit."picketlink-angularjs-rest.war".component.SecurityInitializer.WeldInstantiator, service jboss.deployment.unit."picketlink-angularjs-rest.war".component.PersonService.WeldInterceptorBindingsService, service jboss.deployment.unit."picketlink-angularjs-rest.war".component."javax.faces.webapp.FacetTag".WeldInstantiator, JBAS014799: ... and 21 more ]
            [2014-09-04 10:29:17,279] Artifact picketlink-angularjs-rest:war: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"picketlink-angularjs-rest.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"picketlink-angularjs-rest.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 @Named @Any],
              - Managed Bean [class org.picketlink.credential.DefaultLoginCredentials] with qualifiers [@Default @Named @Any]"}}
            
            
            
            
            
            
            

            My pom.xml:

            <?xml version="1.0"?>
            <!--
              JBoss, Home of Professional Open Source
              Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual
              contributors by the @authors tag. See the copyright.txt in the
              distribution for a full listing of individual contributors.
            
              Licensed under the Apache License, Version 2.0 (the "License");
              you may not use this file except in compliance with the License.
              You may obtain a copy of the License at
              http://www.apache.org/licenses/LICENSE-2.0
              Unless required by applicable law or agreed to in writing, software
              distributed under the License is distributed on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
              See the License for the specific language governing permissions and
              limitations under the License.
            -->
            <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
              <modelVersion>4.0.0</modelVersion>
            
              <groupId>org.picketlink.quickstarts</groupId>
              <artifactId>picketlink-angularjs-rest</artifactId>
              <version>2.7.0-SNAPSHOT</version>
            
              <packaging>war</packaging>
            
              <name>PicketLink Quickstart: picketlink-angularjs-rest</name>
              <description>PicketLink Quickstart: PicketLink AngularJS + REST</description>
            
              <url>http://www.picketlink.org</url>
            
              <licenses>
               <license>
               <name>Apache License, Version 2.0</name>
               <distribution>repo</distribution>
               <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
               </license>
              </licenses>
            
              <properties>
               <!-- JBoss AS dependency versions -->
               <version.jboss.maven.plugin>7.4.Final</version.jboss.maven.plugin>
            
               <!-- WildFly dependency versions -->
               <version.wildfly.maven.plugin>1.0.1.Final</version.wildfly.maven.plugin>
            
               <!-- PicketLink dependency versions -->
              <!--<version.picketlink.javaee.bom>2.6.1.Final</version.picketlink.javaee.bom>-->
               <version.picketlink.javaee.bom>2.7.0-SNAPSHOT</version.picketlink.javaee.bom>
            
               <jboss.bom.version>1.0.7.Final</jboss.bom.version>
            
               <!-- maven-war-plugin -->
               <version.war.plugin>2.1.1</version.war.plugin>
            
               <!-- maven-compiler-plugin -->
               <version.compiler.plugin>3.1</version.compiler.plugin>
               <maven.compiler.target>1.6</maven.compiler.target>
               <maven.compiler.source>1.6</maven.compiler.source>
              </properties>
            
              <repositories>
               <repository>
               <id>JBoss repository</id>
               <url>http://repository-picketlink.forge.cloudbees.com/snapshot/</url>
               </repository>
              </repositories>
            
              <dependencyManagement>
               <dependencies>
               <!-- Dependency Management for PicketLink and Java EE 6.0. -->
              <!--<dependency>-->
              <!--<groupId>org.picketlink</groupId>-->
              <!--<artifactId>picketlink-javaee-6.0</artifactId>-->
              <!--<version>${version.picketlink.javaee.bom}</version>-->
              <!--<scope>import</scope>-->
              <!--<type>pom</type>-->
              <!--</dependency>-->
            
              <!-- Dependency Management for Java EE 6.0 -->
               <dependency>
               <groupId>org.jboss.bom</groupId>
               <artifactId>jboss-javaee-6.0-with-hibernate</artifactId>
               <version>${jboss.bom.version}</version>
               <type>pom</type>
               <scope>import</scope>
               </dependency>
               </dependencies>
              </dependencyManagement>
            
              <dependencies>
            
               <!--
              PicketLink Uber Dependency. It provides all PicketLink dependencies from a single JAR. You still can define each module separately,
              if you want to.
              -->
               <dependency>
               <groupId>org.picketlink</groupId>
               <artifactId>picketlink</artifactId>
               <version>${version.picketlink.javaee.bom}</version>
               <scope>compile</scope>
               </dependency>
            
               <!--
              PicketLink Simple Schema for IDM JPA Identity Store. This is just a simple and specific schema that maps all types provided
              by PicketLink IDM Basic Model. Eg.: User, Role and Group types.
              You can always provide your own entities/schema in order to better satisfy your requirements.
              -->
               <dependency>
               <groupId>org.picketlink</groupId>
               <artifactId>picketlink-idm-simple-schema</artifactId>
               <version>${version.picketlink.javaee.bom}</version>
               <scope>compile</scope>
               </dependency>
            
               <!--
              Picket JSON Dependency. It provides an API to build JWT and JOSE based tokens. We must define it separately because it depends
              on JSON-P (JSR-353) which is a JEE7 library. EAP supports JEE6.
              -->
               <dependency>
               <groupId>org.picketlink</groupId>
               <artifactId>picketlink-json</artifactId>
               <version>${version.picketlink.javaee.bom}</version>
               <scope>compile</scope>
               </dependency>
            
               <dependency>
               <groupId>javax.enterprise</groupId>
               <artifactId>cdi-api</artifactId>
               <scope>provided</scope>
               </dependency>
            
               <dependency>
               <groupId>org.jboss.spec.javax.ejb</groupId>
               <artifactId>jboss-ejb-api_3.1_spec</artifactId>
               <scope>provided</scope>
               </dependency>
            
               <dependency>
               <groupId>org.jboss.spec.javax.ws.rs</groupId>
               <artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
               <scope>provided</scope>
               </dependency>
            
               <dependency>
               <groupId>org.hibernate.javax.persistence</groupId>
               <artifactId>hibernate-jpa-2.0-api</artifactId>
               <scope>provided</scope>
               </dependency>
            
               <dependency>
               <groupId>org.jboss.spec.javax.transaction</groupId>
               <artifactId>jboss-transaction-api_1.1_spec</artifactId>
               <scope>provided</scope>
               </dependency>
            
               <dependency>
               <groupId>javax.mail</groupId>
               <artifactId>mail</artifactId>
               <scope>provided</scope>
               </dependency>
            
              </dependencies>
            
              <build>
               <!-- Set the name of the war, used as the context root when the app is
              deployed -->
               <finalName>${project.artifactId}</finalName>
               <plugins>
               <plugin>
               <artifactId>maven-war-plugin</artifactId>
               <version>${version.war.plugin}</version>
               <configuration>
               <!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! -->
               <failOnMissingWebXml>false</failOnMissingWebXml>
               </configuration>
               </plugin>
               <!-- JBoss AS plugin to deploy war -->
               <plugin>
               <groupId>org.jboss.as.plugins</groupId>
               <artifactId>jboss-as-maven-plugin</artifactId>
               <version>${version.jboss.maven.plugin}</version>
               </plugin>
               </plugins>
              </build>
            
              <profiles>
               <!-- This profile provides some additional configuration when packaging for JBoss EAP. Since JSON API is JEE7+, we need to manually
              include the libraries inside the deployment. -->
               <profile>
               <id>default</id>
               <activation>
               <activeByDefault>true</activeByDefault>
               </activation>
               <dependencies>
               <dependency>
               <groupId>org.jboss.spec.javax.json</groupId>
               <artifactId>jboss-json-api_1.0_spec</artifactId>
               <version>1.0.0.Final</version>
               </dependency>
               <dependency>
               <groupId>org.glassfish</groupId>
               <artifactId>javax.json</artifactId>
               <version>1.0.4</version>
               </dependency>
               </dependencies>
               </profile>
               <profile>
               <id>wildfly</id>
               <properties>
               <target.container>wildfly</target.container>
               </properties>
               <build>
               <plugins>
               <plugin>
               <groupId>org.wildfly.plugins</groupId>
               <artifactId>wildfly-maven-plugin</artifactId>
               <version>${version.wildfly.maven.plugin}</version>
               </plugin>
               </plugins>
               </build>
               <dependencies>
               <dependency>
               <groupId>org.jboss.spec.javax.json</groupId>
               <artifactId>jboss-json-api_1.0_spec</artifactId>
               <version>1.0.0.Final</version>
               <scope>provided</scope>
               </dependency>
               <dependency>
               <groupId>org.glassfish</groupId>
               <artifactId>javax.json</artifactId>
               <version>1.0.4</version>
               <scope>provided</scope>
               </dependency>
               </dependencies>
               </profile>
              </profiles>
            
            </project>
            
            
            
            

             

            Please help.

            • 3. Re: error during run example picketlink-angularjs-rest
              gizbo_12

              Hi guys,

                I'm experiencing the exact samething with 2.7.0-Snapshot. Any clues?

              Yves

              • 4. Re: error during run example picketlink-angularjs-rest
                pcraveiro

                Hey guys,

                 

                   I really don't know what may be causing this. However, the last error from Alex Po seems to be because of duplicated picketlink jars in WEB-INF/lib. Saying that because of those ambiguous error messages.

                 

                   I would suggest a meeting in our IRC channel on freenode. Channel is #picketlink. So we can try to see what is happening.

                 

                   Next week is Beta2. So would be nice to get this solved until then.

                 

                Regards.

                • 5. Re: error during run example picketlink-angularjs-rest
                  pcraveiro

                  Hi All,

                   

                     We found and fixed the issue. The corresponding JIRA is here [PLINK-562] Error deploying PicketLink AngularJS Quickstart in WildFly - JBoss Issue Tracker.

                   

                     There is a workaround if you want to use 2.7.0.Beta1. Upstream master is already updated.

                   

                     The workaround is temporary. It should be fine after 2.7.0.Beta2, next week.

                   

                     Thanks Alex and all for all the feedback and support !

                   

                  Best regards.