This content has been marked as final.
Show 2 replies
-
1. Re: Jboss 4.0.2 with Hibernate 3.0.4
orko May 31, 2005 5:12 AM (in response to parikhm)If have the same problem.
But in the log file I found these entries, and i don't know what to do now.server.log: ... [org.hibernate.impl.SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured ... [org.jboss.hibernate.jmx.Hibernate] SessionFactory successfully built and bound into JNDI [SessionFactory] ...
hibernate-service.xml: <server> <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate"> <attribute name="DatasourceName">java:/DefaultDS</attribute> <attribute name="Dialect">org.hibernate.dialect.Oracle9Dialect</attribute> <property name="hibernate.default_schema">LAGERDBA</property> <property name="connection.pool_size">1</property> <property name="show_sql">true</property> <attribute name="SessionFactoryName">SessionFactory</attribute> <attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute> <attribute name="ShowSqlEnabled">true</attribute> </mbean> </server>
Sample Hibernate Filepackage de.psb_gmbh.main.business.persistence.hibernate; import java.util.Set; public class AcUser implements java.io.Serializable { // Fields private String UserId; private AcGroup AcGroup; private String LoginName; private String Name; private String Password; private Integer CheckCount; private Set<AcUserToGroup> SetOfAcUserToGroup; // Constructors public AcUser() { } // Property accessors public String getUserId() { return this.UserId; } public void setUserId(String UserId) { this.UserId = UserId; } public AcGroup getAcGroup() { return this.AcGroup; } public void setAcGroup(AcGroup AcGroup) { this.AcGroup = AcGroup; } public String getLoginName() { return this.LoginName; } public void setLoginName(String LoginName) { this.LoginName = LoginName; } public String getName() { return this.Name; } public void setName(String Name) { this.Name = Name; } public String getPassword() { return this.Password; } public void setPassword(String Password) { this.Password = Password; } public Integer getCheckCount() { return this.CheckCount; } public void setCheckCount(Integer CheckCount) { this.CheckCount = CheckCount; } public Set<AcUserToGroup> getSetOfAcUserToGroup() { return this.SetOfAcUserToGroup; } public void setSetOfAcUserToGroup(Set<AcUserToGroup> setOfAcUserToGroup) { this.SetOfAcUserToGroup = setOfAcUserToGroup; } }
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="de.psb_gmbh.main.business.persistence.hibernate.AcUser" table="AC_USER" schema="LAGERDBA"> <id name="UserId"> <column name="USER_ID"/> <generator class="assigned" /> </id> <many-to-one name="AcGroup" class="de.psb_gmbh.main.business.persistence.hibernate.AcGroup"> <column name="MASTER_GROUP_ID"/> </many-to-one> <property name="LoginName"> <column name="LOGIN_NAME"/> </property> <property name="Name"> <column name="NAME"/> </property> <property name="Password"> <column name="PASSWORD"/> </property> <property name="CheckCount"> <column name="CHECK_COUNT"/> </property> <set name="SetOfAcUserToGroup"> <key> <column name="USER_ID" /> </key> <one-to-many class="de.psb_gmbh.main.business.persistence.hibernate.AcUserToGroup" /> </set> </class> </hibernate-mapping>
I'm using
- JBoss 4.0.2
- Hibernate 3.0.5
- Java 5.0
- Oracle DB 9.2
- Windows XP SP1
- Eclipse 3.1M7 with MyEclipse 3.8.4, JBoss IDE1.5M1, XML Spy Pro 2005
THANKS! -
2. Re: Jboss 4.0.2 with Hibernate 3.0.4
jeduardo Jul 1, 2005 11:35 AM (in response to parikhm)See if the answer on http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881015#3881015 helps.