-->
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: "Could not configure entity resolver" Problem
PostPosted: Fri Aug 18, 2006 1:43 am 
Newbie

Joined: Fri Aug 18, 2006 1:39 am
Posts: 3
hi,

I am using hibernate 3 with Eclipse 3.1.

on "Hibernate Configuration" tab, when I am trying to "Create SessionFactory", I get the following exception with the heading "Exception while connecting/starting Hibernate":


[code]org.hibernate.console.HibernateConsoleRuntimeException: Could not configure entity resolver tyn.cm.hibernate.Member
org.hibernate.console.HibernateConsoleRuntimeException: Could not configure entity resolver tyn.cm.hibernate.Member
java.lang.ClassNotFoundException: tyn.cm.hibernate.Member[/code]

The class Member is in its package and generated by the hibernate tool, "tyn.cm.hibernate.Member".

Follwing is my "hibernate.cfg.xml" file:



[code]<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="memberSessionFactory">
<property name="hibernate.connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name="hibernate.connection.password">tyn</property>
<property name="hibernate.connection.url">jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=YellowNumber;SelectMethod=cursor</property>
<property name="hibernate.connection.username">tyn</property>
<property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
<property name="hibernate.session_factory_name">java:org/hibernate/SessionFactory</property>
<!-- mapping files (outer) -->
<!-- mapping resource="src/WEB-INF/Member.hbm.xml" /> -->
</session-factory>
</hibernate-configuration> [/code]



I map the
resourse xml file (tyn/src/Member.hbm.xml) and
Entity Resolver (tyn.cm.hibernate.Member)
through console configuration.


"Member.hbm.xml" is as follows:


[code]<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated Aug 16, 2006 5:41:58 PM by Hibernate Tools 3.1.0.beta5 -->
<hibernate-mapping auto-import="true">
<class name="tyn.cm.hibernate.Member" table="Member" schema="dbo" catalog="YellowNumber">
<id name="memberId" type="int">
<column name="MemberID" />
<generator class="assigned" />
</id>
<property name="memberName" type="string">
<column name="MemberName" length="20" />
</property>
<property name="password" type="string">
<column name="Password" length="10" />
</property>
</class>
</hibernate-mapping> [/code]

Please review my code and configuration, and guide me what is wrong with it.

Please also suggest what should be the correct path to put *.hbm.xml files.

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 18, 2006 1:48 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Entity resolver is a DTDEntityResolver for handling the parsing of the xml.

it is purely optional; why are you setting a pojo as the entity resolver ? :)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 18, 2006 2:26 am 
Newbie

Joined: Fri Aug 18, 2006 1:39 am
Posts: 3
Thanks

my problem has been solved

Thanks once again


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.