RE: How do you create a custom DB Adapter?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Nov 19 2004 - 11:51:21 EST

  • Next message: Gentry, Michael: "RE: How do you create a custom DB Adapter?"

    Yeah, ClassNotFoundException (and your debug trace) indicate that this has
    nothing to do with the instance creation, and is still likely a classpath
    issue... Another idea - forget the preferences for a while, and set your
    own classpath in modeler.bat. Does it change anything?

    If this doesn't work, I guess you need to debug FileClassLoadingService
    itself (when there is an exception, is there an underlying cause, etc.).

    > Also, on a side note, should (or is?) the CLASSPATH preference
    > be user-specific? Mine is currently pointing down into a project under
    > my home directory. In a multi-user development environment, that could
    > get pretty awkward if it isn't user-specific.

    Well, class path is just a regular Modeler preference, so it is stored in
    HSQL DB per user. BTW, maybe you are running into CAY-220 bug
    (http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-220), that is
    fixed in CVS, but not released yet? Is any of CLASSPATH entries longer
    than 100 chars?

    Andrus

    > Well, I didn't have types.xml there, but after I copied it in, it still
    > doesn't work.
    >
    > I ran the modeler in the debugger and in DataNodeEditor.java's
    > setAdapterName(), it is throwing a ClassNotFoundException, which seems
    > to be out of the loadClass(name) call. It doesn't make it to the next
    > line.
    >
    > getApplication() =>
    > an org.objectstyle.cayenne.modeler.Application instance
    > getApplication().getClassLoadingService() =>
    > an org.objectstyle.cayenne.modeler.FileClassLoadingService instance
    > getApplication().getClassLoadingService().loadClass(name) =>
    > ClassNotFoundException
    >
    > I've quadruple+ checked the CLASSPATH in preferences and it seems
    > correct. Also, on a side note, should (or is?) the CLASSPATH preference
    > be user-specific? Mine is currently pointing down into a project under
    > my home directory. In a multi-user development environment, that could
    > get pretty awkward if it isn't user-specific.
    >
    > Thanks,
    >
    > /dev/mrg
    >



    This archive was generated by hypermail 2.0.0 : Fri Nov 19 2004 - 11:51:23 EST