1 2 Previous Next 15 Replies Latest reply on Mar 12, 2014 7:37 PM by Anil Saldanha

    Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart

    Valentin Fedoskin Newbie

      When I deploy the quickstart war to the glassfish, I see the exception below. Does the picketlink supports this glassfish version by default or I should customize something?

       

      2013-12-23T19:52:58.735+0400|SEVERE: Exception while loading the app : javax.ejb.CreateException: Initialization failed for Singleton IDMInitializer

      javax.ejb.CreateException: Initialization failed for Singleton IDMInitializer

        at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:483)

        at com.sun.ejb.containers.AbstractSingletonContainer.access$000(AbstractSingletonContainer.java:81)

        at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:654)

        at com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:396)

        at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:219)

        at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:180)

        at org.glassfish.ejb.startup.SingletonLifeCycleManager.doStartup(SingletonLifeCycleManager.java:158)

        at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:166)

        at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)

        at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)

        at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)

        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)

        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)

        at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)

        at java.security.AccessController.doPrivileged(Native Method)

        at javax.security.auth.Subject.doAs(Subject.java:356)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)

        at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)

        at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)

        at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)

        at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)

        at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)

        at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)

        at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)

        at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)

        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)

        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)

        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)

        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)

        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)

        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)

        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)

        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)

        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)

        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)

        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)

        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)

        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)

        at java.lang.Thread.run(Thread.java:744)

      Caused by: org.picketlink.idm.IdentityManagementException: PLIDM000401: Could not create partition [9ac47118-c9c3-4931-82b6-2c9112563629] using configuration [default].

        at org.picketlink.idm.internal.DefaultPartitionManager.add(DefaultPartitionManager.java:369)

        at org.picketlink.idm.internal.DefaultPartitionManager.add(DefaultPartitionManager.java:336)

        at org.picketlink.producer.IdentityManagerProducer.createDefaultPartition(IdentityManagerProducer.java:201)

        at org.picketlink.producer.IdentityManagerProducer.createEmbeddedPartitionManager(IdentityManagerProducer.java:213)

        at org.picketlink.producer.IdentityManagerProducer.init(IdentityManagerProducer.java:105)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        at org.jboss.weld.injection.MethodInjectionPoint.invokeWithSpecialValue(MethodInjectionPoint.java:72)

        at org.jboss.weld.injection.MethodInjectionPoint.invoke(MethodInjectionPoint.java:66)

        at org.jboss.weld.util.Beans.callInitializers(Beans.java:389)

        at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:378)

        at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:72)

        at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:60)

        at org.jboss.weld.injection.producer.DefaultInjector$1.proceed(DefaultInjector.java:66)

        at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:142)

        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46)

        at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:64)

        at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:91)

        at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:158)

        at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:103)

        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:716)

        at org.jboss.weld.injection.producer.AbstractMemberProducer.getReceiver(AbstractMemberProducer.java:110)

        at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:129)

        at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:189)

        at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:69)

        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:716)

        at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:774)

        at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)

        at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:368)

        at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:377)

        at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:72)

        at org.jboss.weld.injection.producer.DefaultInjector$1.proceed(DefaultInjector.java:66)

        at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:142)

        at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46)

        at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:64)

        at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:91)

        at org.glassfish.weld.services.JCDIServiceImpl.injectEJBInstance(JCDIServiceImpl.java:257)

        at com.sun.ejb.containers.BaseContainer.injectEjbInstance(BaseContainer.java:1683)

        at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:443)

        ... 44 more

      Caused by: javax.persistence.TransactionRequiredException

        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTxRequiredCheck(EntityManagerWrapper.java:161)

        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.doTransactionScopedTxCheck(EntityManagerWrapper.java:151)

        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:281)

        at org.picketlink.idm.jpa.internal.mappers.EntityMapper.persist(EntityMapper.java:113)

        at org.picketlink.idm.jpa.internal.JPAIdentityStore.addAttributedType(JPAIdentityStore.java:144)

        at org.picketlink.idm.internal.AbstractIdentityStore.add(AbstractIdentityStore.java:89)

        at org.picketlink.idm.jpa.internal.JPAIdentityStore.add(JPAIdentityStore.java:232)

        at org.picketlink.idm.internal.DefaultPartitionManager.add(DefaultPartitionManager.java:359)

        ... 84 more

        • 1. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
          Pedro Igor Master

          Hi,

           

              The following JIRA seems to be related with your issue.

           

                  https://issues.jboss.org/browse/PLINK-332

           

             The root cause of this is that Glassfish behaves differently than WildFly/EAP in the sense that there is no active transaction when the IdentityManagerProducer is being initialized.

           

             During the startup PicketLink tries to create a default partition if it does not exists. You can use the following solution:

           

                 https://issues.jboss.org/browse/PLINK-335

           

             So you can initialize the default partition by your own and configuring transactions properly.

           

          Regards.

          • 2. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
            Valentin Fedoskin Newbie

            Could you possibly provide me with the example how to initialize the partition properly?

            • 3. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
              Pedro Igor Master

              Hi,

               

              Try something like that:

               

              public class PartitionInitializer {
              
                  public void initPartition(@Observes PartitionManagerCreateEvent event) throws Exception {
                      PartitionManager partitionManager = event.getPartitionManager();
              
                      if (partitionManager.getPartition(Realm.class, Realm.DEFAULT_REALM) == null) {
                          partitionManager.add(new Realm(Realm.DEFAULT_REALM));
                      }
                  }
              }
              

               

              This is the code to observe to the PartitionManagerCreateEvent and initialize the partitions. Just make sure you're running any transaction.

              • 4. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                Valentin Fedoskin Newbie

                Pedro Igor написал(а):

                Just make sure you're running any transaction.

                Could you possibly add to your answer some instructions how to do it?

                • 5. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                  John Manko Newbie

                  I tried the following:

                   

                  @Singleton

                  @Startup

                  public class IDMInitializer {

                   

                      @Inject

                      private PartitionManager partitionManager;

                   

                      @PostConstruct

                      public void create() {

                   

                          // Create user john

                          User john = new User("john");

                          john.setEmail("john@acme.com");

                          john.setFirstName("John");

                          john.setLastName("Smith");

                   

                          IdentityManager identityManager = this.partitionManager.createIdentityManager();

                   

                          identityManager.add(john);

                          identityManager.updateCredential(john, new Password("demo"));

                   

                          // Create user mary

                          User mary = new User("mary");

                          mary.setEmail("mary@acme.com");

                          mary.setFirstName("Mary");

                          mary.setLastName("Jones");

                          identityManager.add(mary);

                          identityManager.updateCredential(mary, new Password("demo"));

                   

                          // Create user jane

                          User jane = new User("jane");

                          jane.setEmail("jane@acme.com");

                          jane.setFirstName("Jane");

                          jane.setLastName("Doe");

                          identityManager.add(jane);

                          identityManager.updateCredential(jane, new Password("demo"));

                   

                          // Create role "manager"

                          Role manager = new Role("manager");

                          identityManager.add(manager);

                   

                          // Create application role "superuser"

                          Role superuser = new Role("superuser");

                          identityManager.add(superuser);

                   

                          // Create group "sales"

                          Group sales = new Group("sales");

                          identityManager.add(sales);

                   

                          RelationshipManager relationshipManager = this.partitionManager.createRelationshipManager();

                   

                          // Make john a member of the "sales" group

                          addToGroup(relationshipManager, john, sales);

                   

                          // Make mary a manager of the "sales" group

                          grantGroupRole(relationshipManager, mary, manager, sales);

                   

                          // Grant the "superuser" application role to jane

                          grantRole(relationshipManager, jane, superuser);

                      }

                   

                      public void initPartition(@Observes PartitionManagerCreateEvent event) throws Exception {

                          PartitionManager partitionManagerLocal = event.getPartitionManager();

                   

                          if (partitionManagerLocal.getPartition(Realm.class, Realm.DEFAULT_REALM) == null) {

                              partitionManagerLocal.add(new Realm(Realm.DEFAULT_REALM));

                          }

                      }

                  }

                   

                   

                  But here is the error

                   

                  SEVERE:   Exception while loading the app : javax.ejb.CreateException: Initialization failed for Singleton IDMInitializer

                  javax.ejb.CreateException: Initialization failed for Singleton IDMInitializer

                      at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:483)

                      at com.sun.ejb.containers.AbstractSingletonContainer.access$000(AbstractSingletonContainer.java:81)

                      ....

                      at java.lang.Thread.run(Thread.java:724)

                  Caused by: javax.ejb.EJBException: Illegal synchronous loopback call during Singleton IDMInitializer initialization would have resulted in deadlock

                      at com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:382)

                      at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:443)

                      ....

                      ... 44 more

                  • 6. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                    Pedro Igor Master

                    Hi John,

                     

                       This is because you're injecting the PartitionManager and observing the PartitionManagerCreateEvent in the same bean. Please note that the PartitionManagerCreateEvent is fired during the initialization of the PartitionManager and this gives you a deadlock.

                     

                       Just try to put the observer method in another bean to avoid this error.

                    • 7. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                      Pedro Igor Master

                      Hi Valentin,

                       

                           I`ve pushed a new branch to my quickstarts fork with some changes for Glassfish 4. Can you guys take a look at this commit please ?

                       

                                 Glassfish changes. · a8ed0d0 · pedroigor/picketlink-quickstarts · GitHub

                       

                      Regards.  

                      • 8. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                        John Manko Newbie

                        I applied your changes to the quickstart, and here it the result.  If you'd like, I can supply you with my copy of the quickstart. 

                         

                        SEVERE:   Exception while loading the app

                        SEVERE:   Undeployment failed for context /picketlink-authorization-idm-jpa

                        SEVERE:   Exception while loading the app : javax.ejb.CreateException: Initialization failed for Singleton IDMInitializer

                        javax.ejb.CreateException: Initialization failed for Singleton IDMInitializer

                            at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:483)

                            ...

                            at java.lang.Thread.run(Thread.java:724)

                        Caused by: javax.ejb.EJBException

                            at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)

                            ...

                            at com.sun.proxy.$Proxy551.initPartition(Unknown Source)

                            at org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.__EJB31_Generated__PartitionInitializer__Intf____Bean__.initPartition(Unknown Source)

                            ...

                            ... 44 more

                        Caused by: java.lang.RuntimeException: Could not create default partition.

                            at org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.PartitionInitializer.initPartition(PartitionInitializer.java:49)

                            at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)

                            ...

                            ... 109 more

                        Caused by: org.picketlink.idm.IdentityManagementException: PLIDM000404: Could not load partition for type [class org.picketlink.idm.model.basic.Realm] and name [default].

                            at org.picketlink.idm.internal.DefaultPartitionManager.getPartition(DefaultPartitionManager.java:276)

                            at org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.PartitionInitializer.initPartition(PartitionInitializer.java:36)

                            ... 138 more

                        Caused by: java.lang.IllegalStateException: Exception attempting to inject Env-Prop: org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources/em@Field-Injectable Resource. Class name = org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources Field name=em@java.lang.String@@@ into class org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources: Lookup failed for 'java:comp/env/org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources/em' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

                            at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:145)

                            ...

                            at org.picketlink.internal.EEJPAContextInitializer.initContextForStore(EEJPAContextInitializer.java:29)

                            at org.picketlink.idm.config.AbstractIdentityStoreConfiguration.initializeContext(AbstractIdentityStoreConfiguration.java:102)

                            at org.picketlink.idm.internal.DefaultPartitionManager.getIdentityStoreAndInitializeContext(DefaultPartitionManager.java:917)

                            at org.picketlink.idm.internal.DefaultPartitionManager.getStoreForPartitionOperation(DefaultPartitionManager.java:659)

                            at org.picketlink.idm.internal.DefaultPartitionManager.getPartition(DefaultPartitionManager.java:268)

                            ... 139 more

                        Caused by: com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Env-Prop: org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources/em@Field-Injectable Resource. Class name = org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources Field name=em@java.lang.String@@@ into class org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources: Lookup failed for 'java:comp/env/org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources/em' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}

                            at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:717)

                            at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:484)

                            at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:170)

                            at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:138)

                            ... 157 more

                        Caused by: javax.naming.NamingException: Lookup failed for 'java:comp/env/org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources/em' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: No object bound to name java:comp/env/org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources/em]

                            at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)

                            at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)

                            at javax.naming.InitialContext.lookup(InitialContext.java:411)

                            at javax.naming.InitialContext.lookup(InitialContext.java:411)

                            at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:613)

                            ... 160 more

                        Caused by: javax.naming.NameNotFoundException: No object bound to name java:comp/env/org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources/em

                            at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:741)

                            at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:715)

                            at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:159)

                            at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:471)

                            ... 164 more

                        • 9. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                          Pedro Igor Master

                          Would be nice. I can not understand what resource is that.

                           

                               java:comp/env/org.jboss.as.quickstarts.picketlink.authorization.idm.jpa.Resources/em

                          • 10. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                            Michael Kucinski Newbie

                            I am also facing the same issue with PicketLink and Glassfish 4. I added the PartitionInitializer from this commit https://github.com/pedroigor/picketlink-quickstarts/commit/a8ed0d00f4638dc7d2c596e9c440db78088b1c0d and I get the exception "javax.ejb.RemoveException: Cannot remove EJB: transaction in progress." The stacktrace can be viewed below. Any help would be greatly appreciated.

                             

                            javax.ejb.CreateException: Initialization failed for Singleton IDMInitializer

                              at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:483)

                              at com.sun.ejb.containers.AbstractSingletonContainer.access$000(AbstractSingletonContainer.java:81)

                              at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:654)

                              at com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:396)

                              at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:219)

                              at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:180)

                              at org.glassfish.ejb.startup.SingletonLifeCycleManager.doStartup(SingletonLifeCycleManager.java:158)

                              at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:166)

                              at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)

                              at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)

                              at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)

                              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)

                              at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)

                              at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)

                              at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)

                              at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)

                              at java.security.AccessController.doPrivileged(Native Method)

                              at javax.security.auth.Subject.doAs(Subject.java:356)

                              at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)

                              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)

                              at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)

                              at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)

                              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)

                              at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)

                              at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)

                              at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)

                              at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)

                              at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)

                              at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)

                              at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)

                              at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)

                              at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)

                              at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)

                              at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)

                              at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)

                              at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)

                              at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)

                              at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)

                              at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)

                              at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)

                              at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)

                              at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)

                              at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)

                              at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)

                              at java.lang.Thread.run(Thread.java:744)

                            Caused by: javax.ejb.EJBException

                              at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)

                              at com.sun.ejb.containers.EJBContainerTransactionManager.checkExceptionNoTx(EJBContainerTransactionManager.java:638)

                              at com.sun.ejb.containers.EJBContainerTransactionManager.checkExceptionBeanMgTx(EJBContainerTransactionManager.java:597)

                              at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:467)

                              at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4475)

                              at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2009)

                              at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1979)

                              at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)

                              at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)

                              at com.sun.proxy.$Proxy1495.initPartition(Unknown Source)

                              at com.platform.ejb.common.__EJB31_Generated__PartitionInitializer__Intf____Bean__.initPartition(Unknown Source)

                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                              at java.lang.reflect.Method.invoke(Method.java:606)

                              at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:396)

                              at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:108)

                              at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)

                              at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:63)

                              at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:101)

                              at com.platform.ejb.common.PartitionInitializer$Proxy$_$$_Weld$EnterpriseProxy$.initPartition(Unknown Source)

                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                              at java.lang.reflect.Method.invoke(Method.java:606)

                              at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93)

                              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:274)

                              at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:261)

                              at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:240)

                              at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:170)

                              at org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:166)

                              at org.jboss.weld.event.TransactionalObserverNotifier.notifyObserver(TransactionalObserverNotifier.java:44)

                              at org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:120)

                              at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:113)

                              at org.jboss.weld.event.EventImpl.fire(EventImpl.java:79)

                              at org.picketlink.producer.IdentityManagerProducer.createEmbeddedPartitionManager(IdentityManagerProducer.java:202)

                              at org.picketlink.producer.IdentityManagerProducer.init(IdentityManagerProducer.java:116)

                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                              at java.lang.reflect.Method.invoke(Method.java:606)

                              at org.jboss.weld.injection.MethodInjectionPoint.invokeWithSpecialValue(MethodInjectionPoint.java:72)

                              at org.jboss.weld.injection.MethodInjectionPoint.invoke(MethodInjectionPoint.java:66)

                              at org.jboss.weld.util.Beans.callInitializers(Beans.java:389)

                              at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:378)

                              at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:72)

                              at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:60)

                              at org.jboss.weld.injection.producer.DefaultInjector$1.proceed(DefaultInjector.java:66)

                              at org.glassfish.weld.services.NonModuleInjectionServices.aroundInject(NonModuleInjectionServices.java:87)

                              at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46)

                              at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:64)

                              at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:91)

                              at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:158)

                              at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:103)

                              at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:716)

                              at org.jboss.weld.injection.producer.AbstractMemberProducer.getReceiver(AbstractMemberProducer.java:110)

                              at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:129)

                              at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:189)

                              at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:69)

                              at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:716)

                              at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:774)

                              at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)

                              at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:368)

                              at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:377)

                              at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:72)

                              at org.jboss.weld.injection.producer.DefaultInjector$1.proceed(DefaultInjector.java:66)

                              at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:142)

                              at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:46)

                              at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:64)

                              at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:91)

                              at org.glassfish.weld.services.JCDIServiceImpl.injectEJBInstance(JCDIServiceImpl.java:257)

                              at com.sun.ejb.containers.BaseContainer.injectEjbInstance(BaseContainer.java:1683)

                              at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:443)

                              ... 44 more

                            Caused by: java.lang.RuntimeException: Could not create default partition.

                              at com.platform.ejb.common.PartitionInitializer.initPartition(PartitionInitializer.java:44)

                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                              at java.lang.reflect.Method.invoke(Method.java:606)

                              at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)

                              at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)

                              at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4695)

                              at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)

                              at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)

                              at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)

                              at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)

                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                              at java.lang.reflect.Method.invoke(Method.java:606)

                              at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)

                              at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)

                              at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)

                              at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)

                              at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)

                              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                              at java.lang.reflect.Method.invoke(Method.java:606)

                              at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)

                              at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)

                              at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)

                              at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4667)

                              at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)

                              at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)

                              ... 109 more

                            Caused by: org.picketlink.idm.IdentityManagementException: PLIDM000404: Could not load partition for type [class org.picketlink.idm.model.basic.Realm] and name [default].

                              at org.picketlink.idm.internal.DefaultPartitionManager.getPartition(DefaultPartitionManager.java:307)

                              at org.picketlink.idm.internal.DefaultPartitionManager.add(DefaultPartitionManager.java:383)

                              at org.picketlink.idm.internal.DefaultPartitionManager.add(DefaultPartitionManager.java:367)

                              at com.platform.ejb.common.PartitionInitializer.initPartition(PartitionInitializer.java:35)

                              ... 139 more

                            Caused by: javax.ejb.NoSuchEJBException: Cannot remove EJB: transaction in progress

                              at com.sun.ejb.containers.EjbContainerServicesImpl.remove(EjbContainerServicesImpl.java:152)

                              at org.glassfish.weld.ejb.SessionObjectReferenceImpl.remove(SessionObjectReferenceImpl.java:69)

                              at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:93)

                              at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)

                              at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:63)

                              at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:101)

                              at com.platform.ejb.common.PicketLinkResources$Proxy$_$$_Weld$EnterpriseProxy$.destroy(Unknown Source)

                              at org.jboss.weld.bean.SessionBean.destroy(SessionBean.java:185)

                              at org.jboss.weld.context.ForwardingContextual.destroy(ForwardingContextual.java:31)

                              at org.jboss.weld.context.CreationalContextImpl.destroy(CreationalContextImpl.java:117)

                              at org.jboss.weld.context.CreationalContextImpl.release(CreationalContextImpl.java:107)

                              at org.jboss.weld.context.CreationalContextImpl.release(CreationalContextImpl.java:98)

                              at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:134)

                              at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:189)

                              at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:69)

                              at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:716)

                              at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:738)

                              at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:85)

                              at com.platform.ejb.common.IDMConfiguration$1.initContextForStore(IDMConfiguration.java:92)

                              at org.picketlink.idm.config.AbstractIdentityStoreConfiguration.initializeContext(AbstractIdentityStoreConfiguration.java:105)

                              at org.picketlink.idm.internal.DefaultPartitionManager.getIdentityStoreAndInitializeContext(DefaultPartitionManager.java:946)

                              at org.picketlink.idm.internal.DefaultPartitionManager.getStoreForPartitionOperation(DefaultPartitionManager.java:690)

                              at org.picketlink.idm.internal.DefaultPartitionManager.getPartition(DefaultPartitionManager.java:299)

                              ... 142 more

                            Caused by: javax.ejb.RemoveException: Cannot remove EJB: transaction in progress

                              at com.sun.ejb.containers.StatefulSessionContainer.removeBean(StatefulSessionContainer.java:1226)

                              at com.sun.ejb.containers.StatefulSessionContainer.removeBean(StatefulSessionContainer.java:1175)

                              at com.sun.ejb.containers.EJBLocalObjectImpl.remove(EJBLocalObjectImpl.java:185)

                              at com.sun.ejb.containers.EjbContainerServicesImpl.remove(EjbContainerServicesImpl.java:148)

                              ... 164 more

                            • 11. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                              John Manko Newbie

                              The specified item was not found. How can I send you a private message with the quickstart project? 

                              • 12. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                                Anil Saldanha Master

                                John Manko wrote:

                                 

                                Pedro Igor How can I send you a private message with the quickstart project?

                                Try freenode IRC .  Channel  #picketlink

                                • 13. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                                  Pedro Igor Master

                                  I think is better we talk on IRC, as anilsaldhana suggested. So we can track down this issue once for all

                                  • 14. Re: Glassfish 4.0 and picketlink-authorization-idm-jpa quickstart
                                    Michael Kucinski Newbie

                                    Has PicketLink ever been run on GlassFish successfully? I'm trying to get it to work now. I can toggle between several errors, all transaction related, but no further luck. (Transaction not active in current thread, No Transaction, Cannot inject an instant of the entity manager, cannot remove EJB - transaction in progress, etc. etc) 

                                    1 2 Previous Next