[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-3795) Hibernate Config view cannot create JPA based configuration with @GeneratedValue using a @GenericGenerator

Dmitry Geraskov (JIRA) jira-events at lists.jboss.org
Tue Feb 17 04:08:44 EST 2009


    [ https://jira.jboss.org/jira/browse/JBIDE-3795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12452896#action_12452896 ] 

Dmitry Geraskov commented on JBIDE-3795:
----------------------------------------

Hi, Bob!
Thank you for your test project.
The problem you are speacking about is two problems:
1. Dali doesn't currently supported package-level annotations. (see  https://jira.jboss.org/jira/browse/JBIDE-3507)
2. Hibernate tools contains inside old hibernate-annotations.jar which is not supported @GenericGenerators annotation.

What you need to do to change this on your eclipse is:
1. Download hibernate-annotations-3.4.0.GA from http://www.hibernate.org/
2. Find org.hibernate.eclipse  plugin in your plugins
3. Save it for backup 
4. Replace hibernate-annotations.jar in lib/annotations in the plugin with jar from hibernate-annotations-3.4.0.GA (it should be renamed to hibernate-annotations.jar)
5. Find in the downloaded archive slf4j-api.jar and slf4j-log4j12.jar and put them into lib/annotations of your plugin
6. Add to the MANIFEST.MF file to Bundle-ClassPath section to additional jars (string to add: 
",
 lib/annotations/slf4j-api.jar,
 lib/annotations/slf4j-log4j12.jar ")
7. Run your eclipse and test your project.
You should see that the error marker appears again(it is because of problem №1), but console configuration builds successfully.

Keep us informed about the result please. 


> Hibernate Config view cannot create JPA based configuration with @GeneratedValue using a @GenericGenerator
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-3795
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-3795
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Hibernate
>    Affects Versions: 3.0.0.CR2
>         Environment: Hibernate Tools 3.2.4.GA-N200902101801, Java Persistence API Tools 2.1.0.v200812180210
>            Reporter: Bob Thule
>            Assignee: Dmitry Geraskov
>             Fix For: 3.0.0.GA
>
>         Attachments: GenericGeneratorProblem.zip
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the jbosstools-issues mailing list