Re: Deploy to Resin throws config error

From: Andrus Adamchik (
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...


    > 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
    > org.objectstyle.cayenne.conf.ConfigLoader$DomainHandler.init(ConfigLoad
    > org.objectstyle.cayenne.conf.ConfigLoader$DomainsHandler.startElement(C
    > com.caucho.xml.XmlParser.addElement(
    > com.caucho.xml.XmlParser.parseElement(
    > com.caucho.xml.XmlParser.parseNode(
    > com.caucho.xml.XmlParser.parseInt(
    > com.caucho.xml.AbstractParser.parse(
    > org.objectstyle.cayenne.conf.ConfigLoader.loadDomains(
    > :114)
    > org.objectstyle.cayenne.conf.DefaultConfiguration.initialize(DefaultCon
    > org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguratio
    > n(
    > org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguratio
    > n(
    > org.objectstyle.cayenne.conf.Configuration.initializeSharedConfiguratio
    > n(
    > org.objectstyle.cayenne.conf.Configuration.getSharedConfiguration(Confi
    > org.objectstyle.cayenne.access.DataContext.createDataContext(DataContex

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