4 Replies Latest reply on Feb 21, 2009 7:13 AM by ajshivam

    Could not instantiate Seam component {ProjectName}EntityManagerFactory

    adityagaddam

      Hi,


      I am trying out Seam after giving up on Appfuse. I liked all the things people had to say about it, but I have so far, not been able to go through the POJO to generate-ui cycle.


      Everytime I do this, JBOSS is unable to deploy the war I create as it fails at:


      org.jboss.seam.InstantiationException: Could not instantiate Seam component: TestingEntityManagerFactory


      What is this seam component? I can't find it anywhere in the project and I have no real idea how to generate this for my POJOs...


      I thought the problem was the spaces in the path to JBOSS AS, as some forum posts pointed to this, but I reinstalled everything in a manner that there were no spaces in any of the paths I gave during seam setup and it still does this... I am obviously missing some small step somewhere... I have read through the forums (both here and old Jboss site) and I am still lost... please help!


      The following is a list of links to my source code and configuration files. Any help would be very appreciated... The project's name is Testing


      My Link


      My Link


      My Link


      My Link


      My Link


      Thanks,
      Aditya

        • 1. Re: Could not instantiate Seam component {ProjectName}EntityManagerFactory
          dhinojosa

          Can you paste the the entire error trace on here?

          • 2. Re: Could not instantiate Seam component {ProjectName}EntityManagerFactory
            adityagaddam

            Here is the log file:


            Log File

            • 3. Re: Could not instantiate Seam component {ProjectName}EntityManagerFactory
              dhinojosa

              Hmm everything looks ok from what I can see....


              Can you run the clean target on your ant file to make sure that there are no previous class files in the exploded-* directories? Sometimes I get 'class residue' from the previous builds and it holds on to definitions that I removed from a while back.


              I didn't see a field in Author called 'Author' and you may have had it previously and it just didn't get cleaned out. 


              Caused by: org.hibernate.MappingException: Could not determine type for: com.my.testing.Author, for columns: [org.hibernate.mapping.Column(author)]
                      at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266)
                      at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253)
                      at org.hibernate.mapping.Property.isValid(Property.java:185)
                      at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:440)
                      at org.hibernate.mapping.RootClass.validate(RootClass.java:192)
                      at org.hibernate.cfg.Configuration.validate(Configuration.java:1102)
                      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287)
                      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
              

              • 4. Re: Could not instantiate Seam component {ProjectName}EntityManagerFactory
                ajshivam

                hi!!
                I am facing the same problem as mentioned above.I ve tried looking everywhere and cant seem to figure out the problem.I'm still a student and have to work on seam and jboss as part of my project.But i cant seem to go forward. I m using jboss-seam-2.1.1.GA and jboss developer studio version 2.0.0.CR1.. Please help me out.
                Thanx
                shivam