RE: Cayenne Newbe Question

From: JR Ruggentaler (j..pv.com)
Date: Fri Aug 02 2002 - 14:30:01 EDT

  • Next message: Andrus: "RE: Cayenne Newbe Question"

    I checked my cayenne.xml files and it has a name.

    <?xml version="1.0" encoding="utf-8"?>
    <domains>
    <domain name="SWSignatureDomain">
             <map name="SWSignatureDataMap" location="SWSignatureDataMap"/>
            <node name="SWSignatureDataNode"
                     datasource="SWSignatureDataNode"
                     adapter="org.objectstyle.cayenne.dba.mysql.MySQLAdapter"
            
    factory="org.objectstyle.cayenne.conf.DriverDataSourceFactory">
             </node>
    </domain>
    </domains>

    I am attaching the model files.

    J.R.

    -----Original Message-----
    From: Andrus [mailto:andru..bjectstyle.org]
    Sent: Friday, August 02, 2002 12:30 PM
    To: JR Ruggentaler; cayenne-use..bjectstyle.org
    Subject: Re: Cayenne Newbe Question

    Hi J.R.

    The error refers to the fact that your <domain> entry in cayenne.xml file
    doesn't have a "name" attribute:

    <domain name="abc">...

    To fix it, open your cayenne.xml in CayenneModeler, select domain (the
    topmost icon on the tree), and type some arbitrary name in the field
    on the right.

    If there is a problem opening the project in the Modeler because of the
    name problem, you can edit cayenne.xml manually adding the name as shown
    above.

    If you continue having problems with it, please send you map and project
    xml files. I will take a look.

    Also this is more of a cayenne-user list question, so I am transferring
    this discussion to that list.

    Andrus

    At 10:47 AM 8/2/2002 -0500, JR Ruggentaler wrote:
    >I created a simple model and I think I have everything setup correctly by I
    >get the following exception:
    >
    >Aug 2, 2002 10:30:53 AM 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.j
    a
    >va:420)
    >at
    >org.objectstyle.cayenne.conf.DomainHelper$DomainsHandler.startElement(Domai
    n
    >Helper.java:392)
    >at
    >org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.
    j
    >ava:342)
    >at
    >org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidato
    r
    >.java:401)
    >at
    >org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBi
    n
    >der.java:809)
    >at
    >org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.j
    a
    >va:556)
    >at
    >org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(XMLDTDValidat
    o
    >r.java:2678)
    >at
    >org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.jav
    a
    >:782)
    >at
    >org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLD
    o
    >cumentFragmentScannerImpl.java:747)
    >at
    >org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispat
    c
    >her.dispatch(XMLDocumentFragmentScannerImpl.java:1445)
    >at
    >org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocum
    e
    >ntFragmentScannerImpl.java:328)
    >at
    >org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserC
    o
    >nfiguration.java:479)
    >at
    >org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserC
    o
    >nfiguration.java:521)
    >at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:148) at
    >org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:97
    2
    >)
    >at
    >org.objectstyle.cayenne.conf.DomainHelper.loadDomains(DomainHelper.java:193
    )
    >
    >at
    >org.objectstyle.cayenne.conf.DomainHelper.loadDomains(DomainHelper.java:223
    )
    >
    >at org.objectstyle.cayenne.conf.Configuration.init(Configuration.java:207)
    >at
    >org.objectstyle.cayenne.conf.Configuration.initSharedConfig(Configuration.j
    a
    >va:173)
    >at
    >org.objectstyle.cayenne.conf.Configuration.initSharedConfig(Configuration.j
    a
    >va:165)
    >at
    >org.objectstyle.cayenne.conf.Configuration.initSharedConfig(Configuration.j
    a
    >va:147)
    >at
    >org.objectstyle.cayenne.conf.Configuration.getSharedConfig(Configuration.ja
    v
    >a:119)
    >at CayenneTst.<init>(CayenneTst.java:10)
    >at CayenneTst.main(CayenneTst.java:21) java.lang.RuntimeException: Error
    >initializing shared Configuration
    >at
    >org.objectstyle.cayenne.conf.Configuration.initSharedConfig(Configuration.j
    a
    >va:177)
    >at
    >org.objectstyle.cayenne.conf.Configuration.initSharedConfig(Configuration.j
    a
    >va:165)
    >at
    >org.objectstyle.cayenne.conf.Configuration.initSharedConfig(Configuration.j
    a
    >va:147)
    >at
    >org.objectstyle.cayenne.conf.Configuration.getSharedConfig(Configuration.ja
    v
    >a:119)
    >at CayenneTst.<init>(CayenneTst.java:10)
    >at CayenneTst.main(CayenneTst.java:21) Exception in thread "main" Process
    >Exit...
    >
    >Does anyone know what attribute 'name' refers to?
    >
    >J.R.









    This archive was generated by hypermail 2.0.0 : Fri Aug 02 2002 - 14:29:51 EDT