Uploaded image for project: 'z - Hibernate 2'
  1. HB-279

documentation says one thing, config parser throws exception for it.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Rejected
    • Affects Version/s: 2.0 final
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      any
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true

      Description

      The documentation lists the format for an array at:

      http://hibernate.bluemars.net/hib_docs/reference/html/collections.html#collections-s1-6

      which says:

      <array name="foos" table="BAR_FOOS" cascade="all">
      <key column="BAR_ID"/>
      <index column="I"/>
      <many-to-many column="FOO_ID" class="com.illflow.Foo"/>
      </array>

      however in using this in this format:

      <array name="productCodes" table="processorproductcodes" cascade="all">
      <key column="plan_id"/>
      <many-to-many column="plan_id" class="com.stabilia.orm.greenfields.processor.ProcessorProductCode"/>
      </array>

      I get an xml exception:

      14:54:43,421 ERROR XMLHelper:37 - Error parsing XML: XML InputStream(15)
      org.xml.sax.SAXParseException: Attribute "name" is not declared for element "array".
      at org.apache.crimson.parser.Parser2.error(Parser2.java:3160)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1411)
      at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
      at org.apache.crimson.parser.Parser2.content(Parser2.java:1779)
      at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1507)
      at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
      at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
      at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
      at org.dom4j.io.SAXReader.read(SAXReader.java:339)
      at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:252)
      at net.sf.hibernate.cfg.Configuration.addClass(Configuration.java:286)
      at com.stabilia.helpers.HibernateHelper.getConfiguration(HibernateHelper.java:226)
      at com.stabilia.helpers.HibernateHelper.getSessionFactory(HibernateHelper.java:270)
      at com.stabilia.helpers.HibernateHelper.getSession(HibernateHelper.java:287)
      at com.stabilia.orm.greenfields.processor.ProcessorTest.testGetIdentifier(ProcessorTest.java:44)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              brill brill
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: