Re: problem using JNDIDataSource

From: Tore Halset (halse..vv.ntnu.no)
Date: Tue Aug 12 2003 - 08:49:33 EDT

  • Next message: Adrian: "Object creation/update:"

    additional info:

    My datasource-defenition looks like this:

    <datasources>
      <local-tx-datasource>
        <jndi-name>myappDS</jndi-name>
    <connection-url>jdbc:postgresql://baseserver/basename</connection-url>
        <driver-class>org.postgresql.Driver</driver-class>
        <user-name>xx</user-name>
        <password>yy</password>
      </local-tx-datasource>
    </datasources>

    Is domain.node.datasource a jndi-name or a resource ref name? And how can
    I connect to my base? :)

     - Tore.

    On Tue, 12 Aug 2003, Tore Halset wrote:

    > Hello.
    >
    > I need some help moving from DriverDataSourceFactory to
    > JNDIDataSourceFactory. My DataSource are deployed OK in JBoss, but cayenne
    > are not able to load the data source.
    >
    > My cayenne.xml:
    > <?xml version="1.0" encoding="utf-8"?>
    > <domains project-version="1.0">
    > <domain name="myappdomain">
    > <map name="myappmap" location="myappmap.map.xml"/>
    > <node name="myappdatanode"
    > datasource="java:/myappDS"
    > adapter="org.objectstyle.cayenne.dba.postgres.PostgresAdapter"
    > factory="org.objectstyle.cayenne.conf.JNDIDataSourceFactory">
    > <map-ref name="myappmap"/>
    > </node>
    > </domain>
    > </domains>
    >
    > java:/myappDS seem to be deployed OK in JBoss
    >
    > 12:58:11,843 INFO [myappDS] Bound connection factory for resource adapter
    > for ConnectionManager 'jboss.jca:service=LocalTxCM,name=myappDS to JNDI
    > name 'java:/myappDS'
    >
    > Here are the exception:
    >
    > [v.1.0rc1 July 21 2003] Error during Configuration initialization.
    > [v.1.0rc1 July 21 2003] Load failures. Main configuration class:
    > org.objectstyle.cayenne.conf.DefaultConfiguration, details:
    > domain.node.name=myappdatanode, domain.node.datasource=java:/myappDS,
    > reason: DataSource load failed - myappDS not bound
    >
    > How can it be fixed?
    >
    > - Tore.
    >



    This archive was generated by hypermail 2.0.0 : Tue Aug 12 2003 - 08:42:37 EDT