Re: trouble with data-port

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed May 11 2005 - 12:26:07 EDT

  • Next message: Erik Hatcher: "Re: superclass template question"

    Hi Tore,

    Re: CAY-315 related issue that you opened today:
    http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-315

    I think it is a good idea to move data-port to Cayenne tools package.
    Unlike other examples DataPort is something that does belong in
    Cayenne.

    I also have another reason to move ahead with that. With deployment of
    Confluence Wiki anyone can easily contribute examples. So now is the
    time to deprecate standalone examples release to avoid creating the
    wrong impression that cayenne-examples package is tested and supported
    at the same level as Cayenne core.

    Anyway, if there are more ideas on that, please send them to
    cayenne-devel or attach to the JIRA issue.

    Andrus

    On May 11, 2005, at 5:34 AM, Tore Halset wrote:

    >
    > On May 11, 2005, at 9:56, Tore Halset wrote:
    >
    >> Error during Configuration initialization. [v.1.2-dev May 10 2005]
    >> Load failures. Main configuration class:
    >> org.objectstyle.cayenne.conf.FileConfiguration, details:
    >> domain.node.name=fromnode,
    >> domain.node.adapter=org.objectstyle.cayenne.dba.sqlserver.SQLServerAda
    >> pter, reason: instantiating adapter failed -
    >> org.objectstyle.cayenne.dba.sqlserver.SQLServerAdapter
    >> domain.node.name=tonode,
    >> domain.node.adapter=org.objectstyle.cayenne.dba.derby.DerbyAdapter,
    >> reason: instantiating adapter failed -
    >> org.objectstyle.cayenne.dba.derby.DerbyAdapter
    >>
    >
    > This seems to be a class loader problem.
    >
    > The following hack in RuntimeLoadDelegate.shouldLoadDataNode(..) maked
    > data-port work.
    >
    > //ClassLoader cl = Configuration.getResourceLoader();
    > ClassLoader cl = this.getClass().getClassLoader();
    > Class dbAdapterClass = (cl != null) ?
    > cl.loadClass(adapter) : Class
    > .forName(adapter);
    >
    > Perhaps data-port should do a Configuration.setThreadClassLoader(..)?
    >
    > Regards,
    > - Tore.



    This archive was generated by hypermail 2.0.0 : Wed May 11 2005 - 12:26:10 EDT