Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-7989

Using -enableassertions and AspectJ >= 1.6.10 may cause AssertionError in org.aspectj.weaver.UnresolvedType

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 3.0.5
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      When launching unit tests with maven surefire plugin, JVM assertions are enables by default.

      An assertion error occurs when loading jdbc:script with aspectj 1.6.10 and spring framework 3.0.5.

      This error appears when accessing method "private static String nameToSignature(String name)" of class org.aspectj.weaver.UnresolvedType line 726 during this assert execution : "assert name.charAt(0) != '[';"

      In debug mode, name value is "[[email protected]".

      I guess this tab contains jdbc scripts as spring ressources from context xml config :

       
      <jdbc:embedded-database id="myTestDB" type="H2">
        <jdbc:script location="classpath:referentiel/sql/01-referentiel-create-tables.sql" />
        <jdbc:script location="classpath:referentiel-domaine/sql/01-referentiel-domaine-create-tables.sql" />
        <jdbc:script location="classpath:referentiel-domaine/sql/02-referentiel-domaine-insert-tr-tables.sql" />
      </jdbc:embedded-database> 
      

      So Application context canot be load due to assertion error.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cbeams Chris Beams
                Reporter:
                telligcirdec Cédric Gillet
                Last updater:
                Trevor Marshall
              • Votes:
                3 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  6 years, 5 weeks, 6 days ago