RE: Cayenne Newbe Question

From: Andrus (andru..bjectstyle.org)
Date: Sat Aug 03 2002 - 12:17:10 EDT

  • Next message: JR Ruggentaler: "RE: Cayenne Newbe Question"

    >If both answers are "yes", then a probable cause of the crash is the old
    >version of cayenne.xml hanging somewhere in CLASSPATH. Cayenne may be
    >using that older version. Please look for it in your classpath locations,
    >as well as any JAR files you may have built before.

    I figured that this may be a common problem, so I added some code to help
    in diagnostics. This will tell you which cayenne.xml is used:

    1. Get the latest Cayenne nightly build :
    http://objectstyle.org/downloads/cayenne/nightly/2002-8-3/
    2. Unpack it somewhere and change your CAYENNE_HOME to point to it.
    3. In your CayenneTst add this line of code:

    org.objectstyle.cayenne.conf.Configuration.setLogLevel(java.util.logging.Level.SEVERE);

    4. Run your application.
    5. Check the output on console. It should look something like that (second
    line tells which file was used):

    Aug 3, 2002 12:15:25 PM org.objectstyle.cayenne.util.ResourceLocator
    findResourceStream
    SEVERE: Resource URL: file:/F:/TMP/JR/cayenne.xml
    Aug 3, 2002 12:15:25 PM org.objectstyle.cayenne.conf.DomainHelper loadDomains
    SEVERE: start configuration loading.
    Aug 3, 2002 12:15:25 PM
    org.objectstyle.cayenne.conf.DomainHelper$DomainHandler init
    SEVERE: error: unnamed <domain>.
    Aug 3, 2002 12:15:25 PM org.objectstyle.cayenne.conf.Configuration
    initSharedConfig
    SEVERE: Error initializing shared Configuration
    org.xml.sax.SAXParseException: Domain 'name' attribute must be not null.
             at
    org.objectstyle.cayenne.conf.DomainHelper$DomainHandler.init(DomainHelper.java:
    445)
             at
    org.objectstyle.cayenne.conf.DomainHelper$DomainsHandler.startElement(DomainHel

    Hope this helps.

    Andrus



    This archive was generated by hypermail 2.0.0 : Sat Aug 03 2002 - 12:16:45 EDT