cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sukanya Ratanotoyanon" <>
Subject Question about using a library having Cayenne embedded within a project using Cayenne
Date Thu, 08 Nov 2007 03:47:37 GMT

I'm having a problem getting a correct DataDomain when I'm using a library
containing cayenne objects. Basically, I'm working on a project using
Cayenne. I need the database URL, usename and password to be configurable.
Therefore, I have this method to set up them up like this:

            Configuration config = Configuration.getSharedConfiguration();

            DataDomain domain = config.getDomain();
            DataNode cNode = domain.getNode(LINK_DB_NODE);

 I received a library that also uses Cayenne to map the database, and tried
to integrate this library into my project. However, after integration, when
I call Configuration.getSharedConfiguration(), it loads the configuration
from the cayenne.xml in the library instead of the one I'm using for the
project. So when I tried to get my DataNode, it cannot be founded. This
results in NullPointerException when I use my DataNode object. Is there a
way to work around this, or do I miss something? I just start using Cayenne
not very long ago and  would appreciate any helps.

Thank you very much,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message