[
https://issues.jboss.org/browse/JBIDE-7905?page=com.atlassian.jira.plugin...
]
Jiri Peterka commented on JBIDE-7905:
-------------------------------------
Vitali, steps I described were the easiest which worked for me but it seems hibernate
console was somehow in troubles before because I'm not able to replicate it right now.
There is just one more related thing I still see strange. When creating new JPA Project,
there is Persistent class management setting. If I select "Annotated classes must be
listed in persistence.xml" it seems it has no influence on Hibernate Console. I would
expect that hibernate console will work only with entities listed in persistence.xml but
it's trying to work with all @Entities. When any entity outside persistence.xml
isn't valid console can't be expanded and there is an error. I guess hibernate
console should proceed only entities in persistence.xml in such a mode.
Unable to expand Hibernate Console after JPA entity is added in JPA
project
---------------------------------------------------------------------------
Key: JBIDE-7905
URL:
https://issues.jboss.org/browse/JBIDE-7905
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Hibernate
Affects Versions: 3.2.0.Beta2
Environment: JBDS 4.0.0.beta2 H33, Linux 64
Reporter: Jiri Peterka
Assignee: Vitali Yemialyanchyk
Attachments: screenshot-1.jpg, screenshot-2.jpg
Steps:
1. Create jpa 2.0 project (target runtime jboss-eap 5.1, hibernate platform, hsql
connection, discover classes automatically)
2. Add JPA entity
3. Open hibernate console
org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based
Configuration
at
org.hibernate.console.ConfigurationFactory.buildJPAConfiguration(ConfigurationFactory.java:242)
at
org.hibernate.console.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:172)
at
org.hibernate.console.ConfigurationFactory.createConfiguration(ConfigurationFactory.java:94)
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:209)
at
org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:71)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:206)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:162)
at
org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:40)
at
org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:100)
at
org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:106)
at
org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.hibernate.console.ConfigurationFactory.buildJPAConfiguration(ConfigurationFactory.java:229)
... 12 more
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: jpatest1] Unable to
configure EntityManagerFactory
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:376)
... 17 more
Caused by: org.hibernate.AnnotationException: No identifier specified for entity:
org.example2.Customer2
at
org.hibernate.cfg.InheritanceState.determineDefaultAccessType(InheritanceState.java:272)
at org.hibernate.cfg.InheritanceState.getElementsToProcess(InheritanceState.java:227)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:712)
at
org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:636)
at
org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:359)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1206)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1459)
at
org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:193)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1086)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:280)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:364)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira