3 Replies Latest reply: May 30, 2011 3:06 PM by Jan Groth RSS

    Seam 3: target unreachable identifier object resolved to null

    riboriori riboriori Newbie
      Hi all
      I've a seam3 project packaged as an EAR (mu build tool is ant for now).
      Under WEB-INF/ i've beans.xml and it looks like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee  http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
      </beans>

      under META-INF of ear file i've seam-beans.xml (like idm-console example from seam 3 distribution examples) in wich i configured jpaidentitystore and jpapermissionstore.

      My application server is JBOSS-6-FINAL.
      I've create a test controller:

      @Named
      @Conversationscoped
      public class TestController implements Serializable
      {
        @Inject PersistenceManager persistenceManager;

         public void testCreateUser()
         {
             persistenceManager.createUser("TEST-USER");
         }



      }


      But when i call via facelet that method like so:

      <h:commandButton action="#{testController.testCreateUser()}"/>;

      I got a PropertyNotFoundException like so:
      "target unreachable identifier 'testController' resolved to null";

      Anyone? i've put beans.xml under WEB-IN of war file like states CDI documentation.
      Is the problem related to structure of project? (EAR instead of a WAR)?
      But i need an EAR...

      Anyone?
      Regards