Re: ant test fails

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon Aug 29 2005 - 10:02:28 EDT

  • Next message: Gili: "Re: ant test fails"

    Settings look good. Can you connect to this DB using MySQL tools
    outside Cayenne? Does "cayenne" instance exist? Also check the
    generated test XML files - they may contain the clues on why this
    happens.

    Andrus

    On Aug 29, 2005, at 9:27 AM, Gili wrote:

    >
    > The test failure has something to do with cayenne.test.connection
    >
    > If I run "ant test" all tests pass just fine. If, however, I
    > run "ant test -Dcayenne.test.connection=example1" with example1
    > defined as:
    >
    > example1.cayenne.adapter =
    > org.objectstyle.cayenne.dba.mysql.MySQLAdapter
    > example1.jdbc.username = cayenne
    > example1.jdbc.password = cayenne
    > example1.jdbc.url = jdbc:mysql://localhost/cayenne
    > example1.jdbc.driver = com.mysql.jdbc.Driver
    >
    > then it fails.
    >
    > Gili
    >
    > Gili wrote:
    >
    >> Actually you're right, we reference a variable with id
    >> "classpath" which contains the path you mentioned. Still, the
    >> class is not resolving at runtime even though I can go into the
    >> directory and I see it there... How odd.
    >> Gili
    >> Gili wrote:
    >>
    >>>
    >>> Yes but this classpath entry is included at compile-time, not
    >>> runtime. Don't you need to add it to the "test" target?
    >>>
    >>> Gili
    >>>
    >>> Andrus Adamchik wrote:
    >>>
    >>>
    >>>>
    >>>> On Aug 29, 2005, at 8:48 AM, Gili wrote:
    >>>>
    >>>>
    >>>>>
    >>>>> I never depend on the environment variable CLASSPATH on my
    >>>>> end so maybe that's where the problem is coming from.
    >>>>> Shouldn't this be part of the ant file?
    >>>>>
    >>>>
    >>>>
    >>>>
    >>>>
    >>>> Ant script uses CLASSPATH as an easy extension point allowing
    >>>> to include drivers, otherwise the script is self-contained.
    >>>> Tests are included directly from the build folder, not the jar:
    >>>>
    >>>> ...
    >>>> <pathelement path="build/tests/classes"/>
    >>>> ...
    >>>>
    >>>>
    >>>> Andrus
    >>>>
    >>>>
    >>>>
    >>>
    >>>
    >
    > --
    > http://www.desktopbeautifier.com/
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Aug 29 2005 - 10:02:30 EDT