Re: Deploy to Resin throws config error

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Sep 24 2004 - 20:11:26 EDT

  • Next message: kalpesh modi: "filtering to-many relationship list"

    As I prefer to know about XML just the bare minimum that gets me by, so
    I can't point to the exact problem... Still looking at the loader code,
    this might be some XML namespace issue. Cayenne extracts element
    attributes using code like this:

    public void startElement(
                 String namespaceURI,
                 String localName,
                 String qName,
                 Attributes atts)
                 throws SAXException {

    String domainName = attrs.getValue("", "name");
    }

    ignoring all other stuff... I wonder if resin's parser doesn't like it.
    It would be nice to be able to pick at the XML parts passed to
    "startElement". The ideal way to do that is to run resin in debugger,
    and insert a breakpoint at ConfigLoader, line 190. Alternatively you
    can get Cayenne from CVS and recompile it with debug statements.

    Another random idea is to check for another cayenne.xml file floating
    around your environment...

    Andrus

    > Normally I do my web dev using Tomcat, today I tryed deploying to Resin
    > and as soon as I get the data context it throws:
    > (ok so it uses a different XML parser and personally I'd point the
    > finger at the caucho lib, but thought I'd ask here. I checked the
    > cayenne.xml and the domain tag has a valid looking name="my_domain")
    >
    > Error during Configuration initialization. [v.1.1B3 September 20 2004]
    > Domain 'name' attribute must be not null.
    >
    > Stack Trace:
    > org.objectstyle.cayenne.conf.RuntimeLoadDelegate.shouldLoadDataDomain(R
    > untimeLoadDelegate.java:179)
    > org.objectstyle.cayenne.conf.ConfigLoader$DomainHandler.init(ConfigLoad
    > er.java:235)
    > org.objectstyle.cayenne.conf.ConfigLoader$DomainsHandler.startElement(C
    > onfigLoader.java:190)
    > com.caucho.xml.XmlParser.addElement(XmlParser.java:2492)
    > com.caucho.xml.XmlParser.parseElement(XmlParser.java:633)
    > com.caucho.xml.XmlParser.parseNode(XmlParser.java:379)
    > com.caucho.xml.XmlParser.parseInt(XmlParser.java:254)
    > com.caucho.xml.AbstractParser.parse(AbstractParser.java:648)
    > org.objectstyle.cayenne.conf.ConfigLoader.loadDomains(ConfigLoader.java
    > :114)
    > org.objectstyle.cayenne.conf.DefaultConfiguration.initialize(DefaultCon
    > figuration.java:185)
    > org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguratio
    > n(Configuration.java:296)
    > org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguratio
    > n(Configuration.java:278)
    > org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguratio
    > n(Configuration.java:261)
    > org.objectstyle.cayenne.conf.Configuration.getSharedConfiguration(Confi
    > guration.java:224)
    > org.objectstyle.cayenne.access.DataContext.createDataContext(DataContex
    > t.java:251)



    This archive was generated by hypermail 2.0.0 : Fri Sep 24 2004 - 20:11:33 EDT