Uploaded image for project: 'AeroGear'
  1. AeroGear
  2. AEROGEAR-5932

Cannot create iOS variant

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • None
    • None
    • None
    • JBoss EAP 6.3.1.GA
      H2

    Description

      This commit [1] changed the column certificate BLOB to cert_data TEXT and broke the ios variants. From the log you can see the hibernate does not recognize the certificateData property (it has to have getters and setters to be recognized), but this column works because the access is made on field level.

      [0m�[33m14:49:35,613 WARN  [org.hibernate.cfg.annotations.reflection.JPAOverriddenAnnotationReader] (ServerService Thread Pool -- 8) HHH000207: Property org.jboss.aerogear.unifiedpush.api.iOSVariant.certificateData not found in class but described in <mapping-file/> (possible typo error)
      

      The problem lies in the property `certificate` which is no longer used for storage, but hibernate still detects it as a property and creates a column for it.

      �[0m�[0m14:49:35,822 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (ServerService Thread Pool -- 8) HHH000037: Columns: [production, certificate, cert_data, passphrase, id]
      

      Then when you try to create a new iOSVariant, it fails because certificate is null, but the column cannot contain NULL. This results in: https://gist.github.com/TadeasKriz/b115c16bdd617abf4ef5

      When the `getCertificate()` method is annotated with `@Transient`, hibernate won't create the column and it is working as intended.

      1 - https://github.com/aerogear/aerogear-unifiedpush-server/commit/0921280ecb42c18a9a6ce22caa5f850036c0a358

      Attachments

        Activity

          People

            qmx_jira Douglas Campos (Inactive)
            tkriz_jira Tadeas Kriz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: