[jbosstools-issues] [JBoss JIRA] (JBIDE-14662) Hibernate configuration view should gracefully handle error caused by multiple persistence.xml

Fred Bricon (JIRA) jira-events at lists.jboss.org
Wed Jul 3 08:31:22 EDT 2013


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

Fred Bricon commented on JBIDE-14662:
-------------------------------------

as per JBDS-2452, after discussing with [~maxandersen], we need to intercept "javax.persistence.PersistenceException: No name provided and several persistence units found" and indicate the user how to fix the problem. The fix itself consists in opening Project properties > Hibernate Settings > select the console configuration and click on details; the persistence unit name must be set, using the name found in the main persistence.xml.
                
> Hibernate configuration view should gracefully handle error caused by multiple persistence.xml
> ----------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-14662
>                 URL: https://issues.jboss.org/browse/JBIDE-14662
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Central, hibernate
>    Affects Versions: 4.1.0.Beta1
>         Environment: JBDS 7.0.0.Beta1a,64
>            Reporter: Jiri Peterka
>            Assignee: Koen Aers
>             Fix For: 4.2.x
>
>
> When importing HTML5 project form Central, Hibernate console isn't properly configured and cannot be expanded and used without errors. 
> {code}
> javax.persistence.PersistenceException: No name provided and several persistence units found
> 	at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:337)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.hibernate.console.ConfigurationFactory.buildJPAConfiguration(ConfigurationFactory.java:218)
> 	at org.hibernate.console.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:161)
> 	at org.hibernate.console.ConfigurationFactory.createConfiguration(ConfigurationFactory.java:96)
> 	at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:240)
> 	at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
> 	at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107)
> 	at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:237)
> 	at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:188)
> 	at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:42)
> 	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:53)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbosstools-issues mailing list