Opened 14 years ago

Closed 14 years ago

#1516 closed defect (fixed)

Bug when extended property with same name or column is repeated in two different classes

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: minor Milestone: BASE 2.16
Component: core Version:
Keywords: Cc:

Description

To reproduce this error, put the following extended property definition in both the ReporterData and UserData section in the extended-properties.xml file:

<property
   name="foo"
   title="Foo"
   column="foo"
   type="string"
   length="255"
/>

Run the updatedb.sh script to add the new columns to the database. It stops with the following error:

net.sf.basedb.core.BaseException: Duplicate property for class 'UserData' in file '/extended-properties.xml': name=foo
        at net.sf.basedb.core.ExtendedProperties.loadExtendedPropertiesFile(ExtendedProperties.java:129)
        at net.sf.basedb.core.ExtendedProperties.init(ExtendedProperties.java:91)
        at net.sf.basedb.core.Application.start(Application.java:463)
        at net.sf.basedb.core.Install.createTables(Install.java:125)
        at net.sf.basedb.install.InitDB.main(InitDB.java:71)
Caused by: net.sf.basedb.core.InvalidDataException: Duplicate property for class 'UserData' in file '/extended-properties.xml': name=foo
        at net.sf.basedb.core.ExtendedProperties.loadProperties(ExtendedProperties.java:239)
        at net.sf.basedb.core.ExtendedProperties.loadClasses(ExtendedProperties.java:214)
        at net.sf.basedb.core.ExtendedProperties.loadExtendedPropertiesFile(ExtendedProperties.java:123)
        ... 4 more

Change History (2)

comment:1 by Nicklas Nordborg, 14 years ago

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:2 by Nicklas Nordborg, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [5431]) Fixes #1516: Bug when extended property with same name or column is repeated in two different classes

Note: See TracTickets for help on using tickets.