5 Replies Latest reply on Jun 10, 2010 9:54 PM by kdhr83

    Seam Sample Deployment Error

      With JBoss Tools Update and Eclipse I created a seam(2.2.1.CR1) sample but encountered an error when deploying it, without any modification:




      11:48:41,937 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstr
      ap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRO
      RS FOR DETAILS):
      
      DEPLOYMENTS MISSING DEPENDENCIES:
        Deployment "persistence.unit:unitName=#SeamSample" is missing the following de
      pendencies:
          Dependency "jboss.jca:name=SeamSampleDatasource,service=DataSourceBinding" (
      should be in state "Create", but is actually in state "** NOT FOUND Depends on '
      jboss.jca:name=SeamSampleDatasource,service=DataSourceBinding' **")
      
      DEPLOYMENTS IN ERROR:
        Deployment "jboss.jca:name=SeamSampleDatasource,service=DataSourceBinding" is
      in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name
      =SeamSampleDatasource,service=DataSourceBinding' **




      I tried to google for a solution but failed, anybody knows whether this is a registered bug or how to fix it?

        • 1. Re: Seam Sample Deployment Error
          shavo26

          Not much to work with here as no stack trace or what environment your working on but i guess your trying to deploy on jboss as, and your persistence.xml has a data source called SeamSampleDatasource


          Example persistence.xml


           <persistence-unit name="SeamSample">
                <provider>org.hibernate.ejb.HibernatePersistence</provider>
                <jta-data-source>SeamSampleDatasource</jta-data-source>





          which means you should have a -ds.xml file deployed on jboss with the same datasource name




           <local-tx-datasource>
                <jndi-name>SeamSampleDatasource</jndi-name>
            <use-java-context>false</use-java-context>
                ........
             </local-tx-datasource>



          • 2. Re: Seam Sample Deployment Error

            Thank you Shane, you are right, after copying the resources/SeamSample-ds.xml to jboss default deploy directory and restarting, jboss gets up.


            It is my lack of EE knowledge to solve this problem, but I think it's not logic: the -ds is only corresponded to some project, why the -ds is not packed into that war/ear and leave a clean file structure with JBoss itself?

            • 3. Re: Seam Sample Deployment Error
              shavo26

              No worries Nessus.
              part of seam setup is inside IDE eclipse,  when you build the seam project if your jboss home dir is setup correctly in build.properties ant will deploy exploded ear and ds.xml to jboss automatically.


              other servers such as weblogic/websphere you setup datasource via admin console.


              You can read up on this from seam documentation:
              My Link

              • 4. Re: Seam Sample Deployment Error
                shavo26

                A data source is a Java Naming and Directory Interface (JNDI) object used to obtain a connection from a connection pool to a database. In order to create a DataSource (so that you can use JDBC connectivity) you need to create a file ending with -ds.xml under the deploy directory of your server.


                In order to use a datasource you need to put the jdbc driver in jBoss's server's lib directory.

                • 5. Re: Seam Sample Deployment Error

                  My deepest gratitude, Shane. Now I know exactly what a data source is and how to locate and configure it in the overwhelming conventions and configurations.


                  My experience with Java is mainly about SE, and a bit confused by how to glue so many frameworks together for a seemingly simple task. But I found I was wrong. I couldnt bypass them. So I think Seam is the one for all and would like to be an expert in it.


                  From now on I have to think in EE and in Seam.