3 Replies Latest reply on Jun 5, 2010 6:51 PM by Craig Bensemann

    Seam 2 + JPA 2

    Craig Bensemann Novice

      Hi,


      I would like to make use of some new features from JPA 2 within my seam (2.2.1.CR1) application. I gather that to do this I will need to use JBoss AS 6. I have downloaded JBoss 6.0.0M3 and updated the hibernate jars to 3.5.2Final by removing the ones in common/lib and replacing. I still have my application set out as an ear (I dont think I need to migrate it to the new format for ejb 3.1?) Most of the application deploys successfully except for the following error:


      19:25:04,509 INFO  [org.jboss.system.server.profileservice.ProfileServiceBootstrap] Loading profile: ProfileKey@ac2a183[domain=default, server=default, name=default]
      19:25:04,511 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      DEPLOYMENTS MISSING DEPENDENCIES:
        Deployment "jboss.ejb3:application=RisingStars,module=jboss-seam,component=EjbSynchronizations,service=EjbEncFactory" is missing the following dependencies:
          Dependency "jboss.naming:application=RisingStars,component=EjbSynchronizations,module=jboss-seam" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:application=RisingStars,component=EjbSynchronizations,module=jboss-seam' **")
        Deployment "jboss.ejb3:application=RisingStars,module=jboss-seam,component=TimerServiceDispatcher,service=EjbEncFactory" is missing the following dependencies:
          Dependency "jboss.naming:application=RisingStars,component=TimerServiceDispatcher,module=jboss-seam" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.naming:application=RisingStars,component=TimerServiceDispatcher,module=jboss-seam' **")
        Deployment "jboss.j2ee:ear=RisingStars.ear,jar=jboss-seam.jar,name=EjbSynchronizations,service=EJB3" is missing the following dependencies:
          Dependency "jboss.ejb3:application=RisingStars,component=EjbSynchronizations,module=jboss-seam,service=EjbEncFactory" (should be in state "Installed", but is actually in state "Described")
        Deployment "jboss.j2ee:ear=RisingStars.ear,jar=jboss-seam.jar,name=EjbSynchronizations,service=EJB3_endpoint" is missing the following dependencies:
          Dependency "jboss.j2ee:ear=RisingStars.ear,jar=jboss-seam.jar,name=EjbSynchronizations,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
        Deployment "jboss.j2ee:ear=RisingStars.ear,jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3" is missing the following dependencies:
          Dependency "jboss.ejb3:application=RisingStars,component=TimerServiceDispatcher,module=jboss-seam,service=EjbEncFactory" (should be in state "Installed", but is actually in state "Described")
        Deployment "jboss.j2ee:ear=RisingStars.ear,jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3_endpoint" is missing the following dependencies:
          Dependency "jboss.j2ee:ear=RisingStars.ear,jar=jboss-seam.jar,name=TimerServiceDispatcher,service=EJB3" (should be in state "Installed", but is actually in state "Instantiated")
      
      DEPLOYMENTS IN ERROR:
        Deployment "jboss.ejb3:application=RisingStars,component=TimerServiceDispatcher,module=jboss-seam,service=EjbEncFactory" is in error due to the following reason(s): Described
        Deployment "jboss.naming:application=RisingStars,component=EjbSynchronizations,module=jboss-seam" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:application=RisingStars,component=EjbSynchronizations,module=jboss-seam' **
        Deployment "jboss.ejb3:application=RisingStars,component=EjbSynchronizations,module=jboss-seam,service=EjbEncFactory" is in error due to the following reason(s): Described
        Deployment "jboss.naming:application=RisingStars,component=TimerServiceDispatcher,module=jboss-seam" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.naming:application=RisingStars,component=TimerServiceDispatcher,module=jboss-seam' **
      



      At this point I'm not really sure exactly whats gone wrong or where to go from here. The log says SEE PREVIOUS ERRORS FOR DETAILS but there are no errors shown before this in the logs.


      I know that the TimerService has been updated in EJB3.1 but am not really sure of the full ramifications of this.


      Is it possible to run a seam 2 app under jboss 6? What changes (if any do I need to make for this?)


      Am happy to debug further and extend/change components etc as needed but am just not sure where to go from there.


      Thanks for your ideas and suggestions

        • 1. Re: Seam 2 + JPA 2
          Andrew Wheeler Newbie

          The problem may be that you replaced the JARs in common/lib. JBoss AS 6 is complete JPA 2.0 already so you don't need to do that. Secondly you shouldn't bundle any hibernate of JSF jars with your app. The only one required is facelets if you're using RichFaces.

          • 2. Re: Seam 2 + JPA 2
            Serkan Eskici Novice

            I don't know which new features of JPA2 you want to use, but AFAIK most of these are already present in Hibernate.


            So check Hibernate first and access it's Session like this:


            Session s = (Session) entityManager.getDelegate();
            



            for making specific calls which are not present in JPA(2).

            • 3. Re: Seam 2 + JPA 2
              Craig Bensemann Novice

              There was a reason I chose to upgrade the hibernate jars but having been away for a few days I cant for the life of me remember what that was right now :) Have just unpacked a clean copy of Jboss 6M3 and still get the same errors. I'm not bundling any hibernate or jsf jars in my ear apart from hibernate-search.jar and facelets.


              I started down this road because I wanted to make use of the new ways for querying maps (KEY, VALUE, ENTRY). I have a Map<String, String> and wanted to query all keys etc. I have written a native sql query which I am using for the moment and it works fine but would have been good to try out these new features.


              The other reason for trying to migrate to JB6 is that my application wont be finished until 6 final is released anyway so will probably need to deploy on that at some point.


              I can happily continue on JB5 for now but am curious to know why this is happening