Re: How do you create a custom DB Adapter?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Nov 18 2004 - 19:50:54 EST

  • Next message: Bryan Lewis: "Re: Getting info across databases..."

    Michael,

    > I also tried adding in the CLASSPATH preferences the path to the .class
    > files, but that didn't work, either.

    This should be sufficient for the adapter to be picked up. Even modeler
    restart is not required. Aside from possibly incorrect CLASSPATH (is it
    pointing to the root of the compiled classes package hierarchy?), there
    maybe an error in instantiating your custom adapter itself.

    Looking at the modeler code, I see that unfortunately it will provide
    no problem diagnostics (like an exception in the logs, or a verbose
    message on mouse over the red field). So lets try to guess. One thing
    that may be missing is "types.xml" files in the same Java package as
    your custom adapter. This file is accessed in constructor, so it is a
    possibility. You should just copy types.xml from dba.sybase package. If
    this doesn't help, I'll have to think of something else ;-)

    Andrus

    On Nov 18, 2004, at 12:49 PM, Gentry, Michael wrote:
    > I'm trying to create a custom DB adapter for our Sybase database (I
    > need
    > a custom PK generator, basically). I subclassed the existing Sybase
    > adapter and overrode the createPkGenerator() method and then when into
    > the modeler and put the full path to my new adaptor in the "DB Adapter"
    > field of the DataNode Configuration section. When I tab or click out
    > of
    > it, it changes the field background to a reddish pink color and seems
    > to
    > lose the changes.
    >
    > I also tried adding in the CLASSPATH preferences the path to the .class
    > files, but that didn't work, either.
    >
    > Any suggestions?
    >
    > Thanks,
    >
    > /dev/mrg
    >



    This archive was generated by hypermail 2.0.0 : Thu Nov 18 2004 - 19:50:59 EST