MMBase

Interdependencies of datatypes in jars are not resolving correctly always.

Details

  • Type: Task Task
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.5
  • Fix Version/s: 1.8.6
  • Component/s: DataTypes

Activity

Michiel Meeuwissen made changes - 2008-01-28 19:51
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Michiel Meeuwissen made changes - 2008-01-28 19:52
Description If I have a jar a.jar with datatypes.xml like so:
<?xml version="1.0" ?>
<datatypes
    xmlns="http://www.mmbase.org/xmlns/datatypes"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.mmbase.org/xmlns/datatypes http://www.mmbase.org/xmlns/datatypes.xsd">

  <datatype base="string" id="type_a" />
  <datatype base="type_b" id="subtype_b" />

</datatypes>


and b.jar:

<?xml version="1.0" ?>
<datatypes
    xmlns="http://www.mmbase.org/xmlns/datatypes"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.mmbase.org/xmlns/datatypes http://www.mmbase.org/xmlns/datatypes.xsd">

  <datatype base="string" id="type_b" />
  <datatype base="type_a" id="subtype_a" />


</datatypes>


Then either subtype_b or subtype_a is failing to load, because it is not defined in which order the jars are parsed.

IOW, if you have jar with a dataype based on a datatype in mmbase.jar it might fail if it's datatypes.xml is accidentily read _before_ mmbase.jar.

This may e.g. happend witn mmbase-email.jar.
If I have a jar a.jar with datatypes.xml like so:
<?xml version="1.0" ?>
<datatypes
    xmlns="http://www.mmbase.org/xmlns/datatypes"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.mmbase.org/xmlns/datatypes http://www.mmbase.org/xmlns/datatypes.xsd">

  <datatype base="string" id="type_a" />
  <datatype base="type_b" id="subtype_b" />

</datatypes>


and b.jar:

<?xml version="1.0" ?>
<datatypes
    xmlns="http://www.mmbase.org/xmlns/datatypes"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.mmbase.org/xmlns/datatypes http://www.mmbase.org/xmlns/datatypes.xsd">

  <datatype base="string" id="type_b" />
  <datatype base="type_a" id="subtype_a" />


</datatypes>


Then either subtype_b or subtype_a is failing to load, because it is not defined in which order the jars are parsed.

IOW, if you have jar with a dataype based on a datatype in mmbase.jar it might fail if it's datatypes.xml is accidentily read _before_ mmbase.jar.

This may e.g. have happened with mmbase-email.jar.

People

Dates

  • Created:
    2008-01-28 17:06
    Updated:
    2008-01-28 19:52
    Resolved:
    2008-01-28 19:51