Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-3795

Hibernate Config view cannot create JPA based configuration with @GeneratedValue using a @GenericGenerator

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.0.CR2
    • Fix Version/s: 3.3.0.M3
    • Component/s: hibernate
    • Labels:
      None
    • Environment:
      Hibernate Tools 3.2.4.GA-N200902101801, Java Persistence API Tools 2.1.0.v200812180210

      Description

      This may be related to issue JBIDE-3636. https://jira.jboss.org/jira/browse/JBIDE-3636

      With a @GenericGenerator declared as:
      @GenericGenerator(name = "SeqBase",... ) //either in package-info.java or on the class

      and used with:
      @GeneratedValue(generator = "SeqBase") private Long id;

      when in the "Hibernate Config" view and the hibernate configuration is trying to be displayed or rebuilt, Eclipse gives the following exception:
      org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
      Could not create JPA based Configuration
      <No message>
      java.lang.reflect.InvocationTargetException
      java.lang.reflect.InvocationTargetException: <no message>
      java.lang.reflect.InvocationTargetException
      javax.persistence.PersistenceException: org.hibernate.AnnotationException: Unknown Id.generator: SeqBase
      org.hibernate.AnnotationException: Unknown Id.generator: SeqBase
      org.hibernate.AnnotationException: Unknown Id.generator: SeqBase
      Unknown Id.generator: SeqBase

        Gliffy Diagrams

        1. generator.PNG
          29 kB
        2. generator-not-found.png
          160 kB

          Issue Links

            Activity

            Hide
            jpeterka Jiri Peterka added a comment -

            There also an opposite error. Let's say no error when generator is defined in package-info, but if the Generator name is changed changed, no error occurs.

            Show
            jpeterka Jiri Peterka added a comment - There also an opposite error. Let's say no error when generator is defined in package-info, but if the Generator name is changed changed, no error occurs.
            Hide
            maxandersen Max Rydahl Andersen added a comment -

            not blocking M3

            Show
            maxandersen Max Rydahl Andersen added a comment - not blocking M3
            Hide
            dgeraskov Dmitry Geraskov added a comment -

            Jiri, Could you please rechek? My validator works nice. Probably you used old project to validate this and faced the "opposite" error?

            Show
            dgeraskov Dmitry Geraskov added a comment - Jiri, Could you please rechek? My validator works nice. Probably you used old project to validate this and faced the "opposite" error?
            Hide
            maxandersen Max Rydahl Andersen added a comment -

            Dima, we need to start identifying the issues that are causing compatibility errors since we need to fix (or at least identify it more clearly to the user) to support Hibernate 3.x and 4.x anyway.

            Show
            maxandersen Max Rydahl Andersen added a comment - Dima, we need to start identifying the issues that are causing compatibility errors since we need to fix (or at least identify it more clearly to the user) to support Hibernate 3.x and 4.x anyway.
            Hide
            jpeterka Jiri Peterka added a comment -

            Works good on released M3, verified.

            Show
            jpeterka Jiri Peterka added a comment - Works good on released M3, verified.

              People

              • Assignee:
                jpeterka Jiri Peterka
                Reporter:
                bobthule Bob Thule
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development