glassfish
  1. glassfish
  2. GLASSFISH-385

mapping xml files are not getting validated by TopLink Essential

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 9.0pe
    • Fix Version/s: 9.0pe
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      385

      Description

      In my persistence unit I am referring to the following mapping xml file which is
      invalid as per the schema. Yet, neither in Java SE nor in Java EE environment, I
      got a failure from TopLink.

      <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm">
      <entity class="example.entity.UserCredential"/>
      <entit class="example.entity.UserCredential"/>
      </entity-mappings>

      The complete test case as well as README is attached here with.

        Activity

        Hide
        Sanjeeb Sahoo added a comment -

        Created an attachment (id=124)
        test case along with README

        Show
        Sanjeeb Sahoo added a comment - Created an attachment (id=124) test case along with README
        Hide
        marina vatkina added a comment -

        Note: such validation should not be done against http://java.sun.com/... file as
        it will take too long.

        Show
        marina vatkina added a comment - Note: such validation should not be done against http://java.sun.com/ ... file as it will take too long.
        Hide
        pkrogh added a comment -

        This is now fixed and checked in to CVS.

        Show
        pkrogh added a comment - This is now fixed and checked in to CVS.
        Hide
        marina vatkina added a comment -

        It doesn't seem to be fully fixed as entity-persistence-tests print the
        following warnings:

        [junit] Warning: validation was turned on but an org.xml.sax.ErrorHandler
        was not set, which is probably not what is desired. Parser will use a default
        ErrorHandler to print the first 10 errors. Please call the setErrorHandler
        method to fix this.
        [junit] Error: URI = "null", Line = "2", : cvc-elt.1: Cannot find the
        declaration of element 'entity-mappings'.

        Show
        marina vatkina added a comment - It doesn't seem to be fully fixed as entity-persistence-tests print the following warnings: [junit] Warning: validation was turned on but an org.xml.sax.ErrorHandler was not set, which is probably not what is desired. Parser will use a default ErrorHandler to print the first 10 errors. Please call the setErrorHandler method to fix this. [junit] Error: URI = "null", Line = "2", : cvc-elt.1: Cannot find the declaration of element 'entity-mappings'.
        Hide
        Sanjeeb Sahoo added a comment -

        I also see the same behavior. I don't think this bug is fixed because I don't
        see where the code is telling the XML parser to use the schema. Refer to your
        XML parser documentation to figure out how to do it.

        Show
        Sanjeeb Sahoo added a comment - I also see the same behavior. I don't think this bug is fixed because I don't see where the code is telling the XML parser to use the schema. Refer to your XML parser documentation to figure out how to do it.
        Hide
        Sanjeeb Sahoo added a comment -

        Increasing the priority now there is a regression. At runtime many misleading
        warnings are getting printed as Marina mentioned in her comments.

        Show
        Sanjeeb Sahoo added a comment - Increasing the priority now there is a regression. At runtime many misleading warnings are getting printed as Marina mentioned in her comments.
        Hide
        pkrogh added a comment -

        This issue is now resolved. The Error handler will be fixed on the next drop.

        Show
        pkrogh added a comment - This issue is now resolved. The Error handler will be fixed on the next drop.
        Hide
        tware added a comment -

        Fixed in latest drop

        Show
        tware added a comment - Fixed in latest drop
        Hide
        marina vatkina added a comment -

        Fixed build #

        Show
        marina vatkina added a comment - Fixed build #

          People

          • Assignee:
            tware
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: