Re: problem using JNDIDataSource

From: Eric Schneider (eri..entralparksoftware.com)
Date: Tue Aug 12 2003 - 10:26:23 EDT

  • Next message: Brad Messerle: "data modeler"

    Tore,

    Your cayenne.xml looks fine.

    It looks like your datasource isn't configured properly. See if your
    servlet container has JNDI examples bundled with it. It should show you
    how to create a shared datasource resource that all applications in your
    container can link to.

    Unfortunately, the definitions seem to be different on each container. :-|

    Cheers,
    Eric

    ----- Original Message -----
    From: "Tore Halset" <halse..vv.ntnu.no>
    To: <cayenne-use..bjectstyle.org>
    Sent: Tuesday, August 12, 2003 8:49 AM
    Subject: Re: problem using JNDIDataSource

    > 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 - 10:19:20 EDT