3 Replies Latest reply on Jun 25, 2009 10:12 AM by Manea George

    Please help Seam 2.1.2

    Manea George Newbie

      Hello I am sorry if i am not supposed to put here this but I have no idea where to ask help.I searched google I tried various sites and nothing. I have a project that was made using seamgen in eclipse.I am using jboss-4.2.3.GA as a server.Imediately after creating the project I added identity management using this tutorial http://seamframework.org/Documentation/AddIdentityManagementToASeamgenProject and then generated the entity. My problem is that the project does not deploy. I get the error :

      ERROR [[/anpa]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.security.persistentPermissionResolver 

      My components.xml is like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
                      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd
                       http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd
                       http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.1.xsd
                       http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.1.xsd
                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd
                       http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.1.xsd
                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">
         <core:init debug="true" jndi-pattern="@jndiPattern@"/>
         <core:manager concurrent-request-timeout="500"
         <!-- Make sure this URL pattern is the same as that used by the Faces Servlet -->
         <web:hot-deploy-filter url-pattern="*.seam"/>
         <persistence:entity-manager-factory name="entityManagerFactory"
         <persistence:managed-persistence-context name="entityManager" auto-create="true"
         <drools:rule-base name="securityRules">
         <security:rule-based-permission-resolver security-rules="#{securityRules}"/>
      <security:remember-me enabled="true"/>
      <security:jpa-identity-store user-class="anpa.entity.UserAccount" role-class="anpa.entity.UserRole"/>
      <security:jpa-permission-store user-permission-class="anpa.entity.UserPermission"/>
         <event type="org.jboss.seam.security.notLoggedIn">
            <action execute="#{redirect.captureCurrentView}"/>
         <event type="org.jboss.seam.security.loginSuccessful">
            <action execute="#{redirect.returnToCapturedView}"/>
         <mail:mail-session host="localhost" port="25"/>
         <!-- For use with jBPM pageflow or process management -->

      The thing is that if I remove security:jpa-identity-store and security:jpa-permission-store the application deploys and work fine except i can not log in. I really need help, I will provide any info needed, I have a deadline on it so I need to finish as soon as posible.Thanks in advance.

        • 1. Re: Please help Seam 2.1.2
          Stuart Douglas Master

          Can you post the full stacktrace?

          • 2. Re: Please help Seam 2.1.2
            Jean Luc Apprentice

            A log excerpt (perhaps at the DEBUG level) might be of help as well.

            Where I am now I only have the source of 2.1.1; I looked src\main\org\jboss\seam\security\permission\PersistentPermissionResolver.java and the creation of the component is simple:

               public void create() {
               protected void initPermissionStore() {
                  if (permissionStore == null){
                     permissionStore = (PermissionStore) Component.getInstance(JpaPermissionStore.class, true);
                  if (permissionStore == null) {
                     log.warn("no permission store available - please install a PermissionStore with the name '" +
                           Seam.getComponentName(JpaPermissionStore.class) + "' if persistent permissions are required.");

            Again, the above is for 2.1.1 so 2.1.2 might be different. Look in the source, put a breakpoint in the @Create method and see what happens.

            • 3. Re: Please help Seam 2.1.2
              Manea George Newbie

              Jean do you mean recompiling the source of seam and add the component? And how do I post here the full log because it is huge and does not allow me to post that many text here.