0 Replies Latest reply on Jan 10, 2005 11:36 AM by vijaiah vangara

    datasource and standardjbosscmp-jdbc.xml problem

    vijaiah vangara Newbie

      Hello all,

      I am using Jboss 4.0 with PostgreSQL 7.4.5.

      I have 3 databases, clientDB, TransactionDB and the ParsingDB in PostgreSQL.

      so i have created "postgres-ds.xml" and placed /server/default/deploy/ directory.

      the contents of this file are,


      <local-tx-datasource>
      <jndi-name>ClientDBDS</jndi-name>
      <connection-url>jdbc:postgresql://10.200.40.48:5432/clientDB</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>ubs</user-name>
      rushil
      <!-- sql to call when connection is created
      <new-connection-sql>some arbitrary sql</new-connection-sql>
      -->
      <min-pool-size>10</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>20</idle-timeout-minutes>
      <!-- sql to call on an existing pooled connection when it is obtained from pool
      <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
      -->
      <idle-timeout-minutes>20</idle-timeout-minutes>
      </local-tx-datasource>

      <local-tx-datasource>
      <jndi-name>TransactionDBDS</jndi-name>
      <connection-url>jdbc:postgresql://10.200.40.48:5432/transactionDB</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>ubs</user-name>
      rushil
      <!-- sql to call when connection is created
      <new-connection-sql>some arbitrary sql</new-connection-sql>
      -->
      <min-pool-size>10</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>20</idle-timeout-minutes>
      <!-- sql to call on an existing pooled connection when it is obtained from pool
      <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
      -->
      <idle-timeout-minutes>20</idle-timeout-minutes>
      </local-tx-datasource>

      <local-tx-datasource>
      <jndi-name>ParsingDBDS</jndi-name>
      <connection-url>jdbc:postgresql://10.200.40.48:5432/parsingDB</connection-url>
      <driver-class>org.postgresql.Driver</driver-class>
      <user-name>ubs</user-name>
      rushil
      <!-- sql to call when connection is created
      <new-connection-sql>some arbitrary sql</new-connection-sql>
      -->
      <min-pool-size>10</min-pool-size>
      <max-pool-size>20</max-pool-size>
      <idle-timeout-minutes>20</idle-timeout-minutes>
      <!-- sql to call on an existing pooled connection when it is obtained from pool
      <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
      -->
      <idle-timeout-minutes>20</idle-timeout-minutes>
      </local-tx-datasource>



      and when i modify the standardjbosscmp-jdbc.xml as follows, I am getting the following error.

      standardjbosscmp-jdbc.xml

      <jbosscmp-jdbc>


      java:/ClientDBDS
      <datasource-mapping>clientdb</datasource-mapping>

      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <read-time-out>300000</read-time-out>
      <row-locking>false</row-locking>
      <pk-constraint>true</pk-constraint>
      <fk-constraint>false</fk-constraint>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
      <read-ahead>
      on-load
      <page-size>1000</page-size>
      <eager-load-group>*</eager-load-group>
      </read-ahead>
      <list-cache-max>1000</list-cache-max>
      <clean-read-ahead-on-load>false</clean-read-ahead-on-load>

      <unknown-pk>
      <key-generator-factory>UUIDKeyGeneratorFactory</key-generator-factory>
      <unknown-pk-class>java.lang.String</unknown-pk-class>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(32)</sql-type>
      </unknown-pk>

      <entity-command name="default"/>
      <ql-compiler>org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler</ql-compiler>



      java:/TransactionDBDS
      <datasource-mapping>transactiondb</datasource-mapping>

      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <read-time-out>300000</read-time-out>
      <row-locking>false</row-locking>
      <pk-constraint>true</pk-constraint>
      <fk-constraint>false</fk-constraint>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
      <read-ahead>
      on-load
      <page-size>1000</page-size>
      <eager-load-group>*</eager-load-group>
      </read-ahead>
      <list-cache-max>1000</list-cache-max>
      <clean-read-ahead-on-load>false</clean-read-ahead-on-load>

      <unknown-pk>
      <key-generator-factory>UUIDKeyGeneratorFactory</key-generator-factory>
      <unknown-pk-class>java.lang.String</unknown-pk-class>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(32)</sql-type>
      </unknown-pk>

      <entity-command name="default"/>
      <ql-compiler>org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler</ql-compiler>



      java:/ParsingDBDS
      <datasource-mapping>parsingdb</datasource-mapping>

      <create-table>true</create-table>
      <remove-table>false</remove-table>
      <read-only>false</read-only>
      <read-time-out>300000</read-time-out>
      <row-locking>false</row-locking>
      <pk-constraint>true</pk-constraint>
      <fk-constraint>false</fk-constraint>
      <preferred-relation-mapping>foreign-key</preferred-relation-mapping>
      <read-ahead>
      on-load
      <page-size>1000</page-size>
      <eager-load-group>*</eager-load-group>
      </read-ahead>
      <list-cache-max>1000</list-cache-max>
      <clean-read-ahead-on-load>false</clean-read-ahead-on-load>

      <unknown-pk>
      <key-generator-factory>UUIDKeyGeneratorFactory</key-generator-factory>
      <unknown-pk-class>java.lang.String</unknown-pk-class>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(32)</sql-type>
      </unknown-pk>

      <entity-command name="default"/>
      <ql-compiler>org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler</ql-compiler>


      What is that i am doing wrong ?
      Thanks in advance.

      Vijay