-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Entity manager classpath problem
PostPosted: Thu May 11, 2006 6:05 pm 
Newbie

Joined: Thu May 11, 2006 7:25 am
Posts: 3
Hi,
I'm using hibernate anotations and entity manager for persisting my objects. I use eclipse plug-in JSR-220 for this. But somehow i can't configure my classpath manual. When JSR-220 configures my classpath it works well when I try to add them maunally application raises the exception about it can not find entity manager named "mymanager". My persistance.xml file is below. What should I do? Thank you for your suggestions.


Code:
<?xml version="1.0" encoding="UTF-8"?>
<entity-manager>
    <name>mymanager</name>
    <class>Human</class>
    <properties>
        <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/human"/>
        <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
        <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
        <property name="hibernate.connection.password" value=""/>
        <property name="hibernate.connection.username" value="root"/>
    </properties>
</entity-manager>


Top
 Profile  
 
 Post subject: Re: Entity manager classpath problem
PostPosted: Fri May 12, 2006 12:29 pm 
Newbie

Joined: Fri May 12, 2006 12:18 pm
Posts: 4
Location: Karlsruhe, Germany
Hi Murat,

i think your persistence.xml should look like this...

murat wrote:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<entity-manager>
    <name>mymanager</name>
    <class>Human</class>
    <properties>
        <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/human"/>
        <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
        <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
        <property name="hibernate.connection.password" value=""/>
        <property name="hibernate.connection.username" value="root"/>
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
    </properties>

</entity-manager>


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 12, 2006 3:44 pm 
Newbie

Joined: Thu May 11, 2006 7:25 am
Posts: 3
Thank you so much, it works well :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.