2 Replies Latest reply on May 30, 2007 8:44 AM by etwcn

    Datasource with JBoss and Hibernate

    etwcn

      Hi,

      am trying to configure an oracle datasource with JBoss. I have copied the oracle-ds.xml file from the docs/examples/jca directory and entered my connection url, user and password. I placed the file in the deploy directory. When I now start up JBoss server, I get the message:

      --- Packages waiting for a deployer ---
      org.jboss.deployment.DeploymentInfo@8545a55 { url=file:/D:/henning/epus/ProgShare/JBoss/jboss-4.0.5.GA/server/default/deploy/epus3DS.xml }
       deployer: null
       status: null
       state: INIT_WAITING_DEPLOYER
       watch: file:jboss-4.0.5.GA/server/default/deploy/oracleDS.xml
       altDD: null
       lastDeployed: 1180445920698
       lastModified: 1180445920683
       mbeans:
      
      --- Incompletely deployed packages ---
      org.jboss.deployment.DeploymentInfo@8545a55 { url=file:/D:/henning/epus/ProgShare/JBoss/jboss-4.0.5.GA/server/default/deploy/epus3DS.xml }
       deployer: null
       status: null
       state: INIT_WAITING_DEPLOYER
       watch: file:jboss-4.0.5.GA/server/default/deploy/oracleDS.xml
       altDD: null
       lastDeployed: 1180445920698
       lastModified: 1180445920683
       mbeans:
      


      This does not sound good for start. Then, I modified my hibernate.cfg.xml and replaced the connection parameters by this parameter:
      <property name="hibernate.connection.datasource">java:oracleDS</property>
      
      When my application now tries to connect to the database, I get the message that "oracleDS is not bound".

      What's wrong, how can I fix this.


        • 1. Re: Datasource with JBoss and Hibernate
          andydale

          Hi,

          Try renaming the xml file the datasource is defined in to the following, epus3-ds.xml or oracle-ds.xml. This is how datasources are configured in JBoss running on Linux (note the -ds.xml) i assume it is the same for Windows.

          Cheers

          Andy

          • 2. Re: Datasource with JBoss and Hibernate
            etwcn

            Thanks a lot, that solved the problem. JBoss now binds the datasource as expected. I wonder, if I missed this tiny little naming detail, when I browsed the documentation, or if it just not documented.