You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Durham David Contr 805 CSS/SCBE <Da...@scott.af.mil> on 2003/08/05 23:27:35 UTC

strange initilization error

Very strange problem with retrieving a defaultPersistenceBroker().

Basically the problem is that if I have more than one class-descriptor
(aside from OJB internal mappings), then parsing repository.xml fails.

I can verify this by commenting a class-descriptor out and uncommenting
another, then vice versa.

My configuration looks like this

<descriptor-repository version="1.0" isolation-level="read-uncommitted">

    <jdbc-connection-descriptor .../>

	<class-descriptor
        class="mil.usaf.rad.aep.event.Category"
        table="categories">

        <field-descriptor id="1"
            name="id"
            column="categoryId"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"/>

        <field-descriptor id="2"
            name="name"
            column="name"
            jdbc-type="VARCHAR"/>

        <field-descriptor id="3"
            name="parentId"
            column="parentId"
            jdbc-type="INTEGER"
            access="anonymous"/>

        <reference-descriptor
            name="parent"
            class-ref="mil.usaf.rad.aep.event.Category">
            <foreignkey field-ref="parentId"/>
        </reference-descriptor>

        <collection-descriptor
            name="subCategories"
            element-class-ref="mil.usaf.rad.aep.event.Category"
            auto-retrieve="true"
            auto-update="true">
                <inverse-foreignkey field-ref="parentId"/>
        </collection-descriptor>

    </class-descriptor>


<!--  
    <class-descriptor
        class="mil.usaf.rad.aep.event.AircraftType"
        table="aircraftTypes">

        <field-descriptor id="1"
            name="id"
            column="aircraftTypeId"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"/>

        <field-descriptor id="2"
            name="name"
            column="name"
            jdbc-type="VARCHAR"/>

    </class-descriptor>
-->

    <!-- include ojb internal mappings here -->
    &internal;

</descriptor-repository>


An java.lang.ExceptionInInitializerError is thrown from the method
PersistenceBrokerFactory.defaultPersistenceBroker()

Any ideas what would cause this?


Thanks,

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org