[jbosstools-issues] [JBoss JIRA] (JBIDE-10470) Hibernate configuration is not able to use Hibernate Configuration File referenced in persistence.xml

Dmitry Geraskov (Commented) (JIRA) jira-events at lists.jboss.org
Wed Dec 14 07:40:09 EST 2011


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

Dmitry Geraskov commented on JBIDE-10470:
-----------------------------------------

If it is possible we should make the path leative to project class path. Otherwise it would not work. Now the path is workspace relativ which is wrong.
                
> Hibernate configuration is not able to use Hibernate Configuration File referenced in persistence.xml
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-10470
>                 URL: https://issues.jboss.org/browse/JBIDE-10470
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: hibernate
>    Affects Versions: 3.3.0.M4
>         Environment: JBSD 5.0.M5 H55
>            Reporter: Jiri Peterka
>            Assignee: Dmitry Geraskov
>             Fix For: 3.3.0.Beta1
>
>
> 1. Create JPA Project
> 2. Add JPA/Hibernate(4.0) libs 
> 3. Open persitence.xml
> 4. On Hibernate page use Configuration file, create it
> 5. Try to use Hibernate Console
> ERROR: 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: [PersistenceUnit: jpahibernate40] Unable to configure EntityManagerFactory
>     [PersistenceUnit: jpahibernate40] Unable to configure EntityManagerFactory
>     org.hibernate.HibernateException: /jpahibernate40/src/hibernate.cfg.xml not found
>     /jpahibernate40/src/hibernate.cfg.xml not found
> In persistence.xml is:
> <property name="hibernate.ejb.cfgfile" value="/jpahibernate40/src/hibernate.cfg.xml"/>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list