-->
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.  [ 2 posts ] 
Author Message
 Post subject: Schema text failed: Could not read mapping document from fil
PostPosted: Tue Nov 21, 2006 3:24 pm 
Newbie

Joined: Tue Nov 21, 2006 1:51 pm
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
I am having trouble running SchemaExport with ant, it seems to map some of the files fine but not others. I attached my 3 hbm.xml and the hibernate.cfg.xml. I would appreciate any help.


Hibernate version: Hibernate 3.1

Mapping documents:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<!-- a SessionFactory instance listed as /jndi/name -->
<session-factory
name="java:hibernate/SessionFactory">
<!-- properties -->
<property name="connection.datasource">java:/comp/env/jdbc/osg</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="show_sql">true</property>
<!-- mapping files -->
<mapping resource="edu/ufl/osg/websphere/client/web/User.hbm.xml"/>
<mapping resource="edu/ufl/osg/websphere/client/web/Cluster.hbm.xml"/>
</session-factory>
</hibernate-configuration>

<?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 auto-import="false" package="edu.ufl.osg.websphere.client.web">
<!--<hibernate-mapping>-->
<class name="Cluster" table="clusters">
<id name="id">
<generator class="native"/>
</id>
<property name="name" unique="true" not-null="true"/>
<set name="roles" table="roles_clusters">
<key column="cluster_id"/>
<many-to-many column="role_id" class="Role"/>
</set>
</class>
</hibernate-mapping>

<?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 auto-import="false" package="edu.ufl.osg.websphere.client.web">
<class name="Role" table="roles">
<id name="id" unsaved-value="0">
<generator class="native"/>
</id>
<property name="name" unique="true" not-null="true"/>
<set name="clusters" table="roles_clusters">
<key column="role_id"/>
<many-to-many column="cluster_id" class="Cluster"/>
</set>
<set name="users" table="users_roles">
<key column="role_id"/>
<many-to-many column="user_id" class="User"/>
</set>
</class>
</hibernate-mapping>

<?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 package="edu.ufl.osg.websphere.client.web">
<class name="User" table="users">
<id name="id" unsaved-value="0">
<generator class="native"/>
</id>
<property name="name" unique="true" not-null="true"/>
<set name="roles" table="users_roles">
<key column="user_id"/>
<many-to-many column="role_id" class="Role"/>
</set>
</class>
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
/opt/sun-jdk-1.5.0.06/bin/java -Xmx128m -Dant.home=/home/laura2/idea-5.0.2/lib/ant -Dfile.encoding=US-ASCII -classpath /home/laura2/idea-5.0.2/redist/javac2.jar:/home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/lib/hibernate3.jar:/home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/lib/dom4j-1.6.1.jar:/home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/lib/commons-logging-1.0.4.jar:/home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/src/java:/home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/lib/commons-collections-2.1.1.jar:/home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes:/home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/src/webapp/WEB-INF/classes:/home/laura2/idea-5.0.2/lib/ant/lib/ant-jai.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-antlr.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-starteam.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-icontract.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-jdepend.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-apache-oro.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-trax.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-apache-regexp.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-jmf.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-jsch.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-apache-bsf.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-netrexx.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-swing.jar:/home/laura2/idea-5.0.2/lib/ant/lib/xercesImpl.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-apache-bcel.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-stylebook.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-javamail.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-junit.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-xalan1.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-commons-net.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-commons-logging.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-weblogic.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-apache-log4j.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant.jar:/home/laura2/idea-5.0.2/lib/ant/lib/xml-apis.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-vaj.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-xslp.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-nodeps.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-launcher.jar:/home/laura2/idea-5.0.2/lib/ant/lib/ant-apache-resolver.jar:/opt/sun-jdk-1.5.0.06/lib/tools.jar:/home/laura2/idea-5.0.2/lib/idea_rt.jar com.intellij.rt.ant.execution.AntMain2 -logger com.intellij.rt.ant.execution.IdeaAntLogger2 -verbose -inputhandler com.intellij.rt.ant.execution.IdeaInputHandler -buildfile /home/laura2/IdeaProjects/WebSphere6b/websphere6b.xml schemaexport
websphere6b.xml
Detected Java version: 1.5 in: /opt/sun-jdk-1.5.0.06/jre
Detected OS: Linux
parsing buildfile /home/laura2/IdeaProjects/WebSphere6b/websphere6b.xml with URI = file:///home/laura2/IdeaProjects/WebSphere6b/websphere6b.xml
Project base dir set to: /home/laura2/IdeaProjects/WebSphere6b
property
Loading /home/laura2/IdeaProjects/WebSphere6b/websphere6b.properties

property
property
Build sequence for target(s) `schemaexport' is [schemaexport]
Complete build sequence is [schemaexport, compile.module.websphere6b.production, clean.module.websphere6b, j2ee.build.jar.websphere6b, j2ee.build.exploded.websphere6b, compile.module.websphere6b.tests, compile.module.websphere6b, j2ee.build.websphere6b, clean, init, all, ]
schemaexport
path
taskdef
echo
/home/laura2/IdeaProjects/WebSphere6b
schemaexport
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.1.3
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.Configuration configure
INFO: configuring from file: hibernate.cfg.xml
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource: edu/ufl/osg/websphere/client/web/User.hbm.xml
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: edu.ufl.osg.websphere.client.web.User -> users
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.HbmBinder bindCollection
INFO: Mapping collection: edu.ufl.osg.websphere.client.web.User.roles -> users_roles
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource: edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: edu.ufl.osg.websphere.client.web.Cluster -> clusters
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.HbmBinder bindCollection
INFO: Mapping collection: edu.ufl.osg.websphere.client.web.Cluster.roles -> roles_clusters
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: java:hibernate/SessionFactory
Nov 21, 2006 1:04:05 PM org.hibernate.cfg.Configuration addFile
INFO: Reading mappings from file: /home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes/edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
Nov 21, 2006 1:04:06 PM org.hibernate.cfg.Mappings addImport
INFO: duplicate import: edu.ufl.osg.websphere.client.web.Cluster->edu.ufl.osg.websphere.client.web.Cluster
Nov 21, 2006 1:04:06 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: edu.ufl.osg.websphere.client.web.Cluster -> clusters
Nov 21, 2006 1:04:06 PM org.hibernate.cfg.HbmBinder bindCollection
INFO: Mapping collection: edu.ufl.osg.websphere.client.web.Cluster.roles -> roles_clusters
/home/laura2/IdeaProjects/WebSphere6b/websphere6b.xml:392: Schema text failed: Could not read mapping document from file: /home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes/edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:149)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
Caused by: org.hibernate.MappingException: Could not read mapping document from file: /home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes/edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
at org.hibernate.cfg.Configuration.addFile(Configuration.java:252)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaExportTask.java:202)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:146)
... 17 more
Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping edu.ufl.osg.websphere.client.web.Cluster.roles
at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2030)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2005)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:368)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:248)
... 19 more
--- Nested Exception ---
org.hibernate.MappingException: Could not read mapping document from file: /home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes/edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
at org.hibernate.cfg.Configuration.addFile(Configuration.java:252)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaExportTask.java:202)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:146)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping edu.ufl.osg.websphere.client.web.Cluster.roles
at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2030)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2005)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:368)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:248)
... 19 more
/home/laura2/IdeaProjects/WebSphere6b/websphere6b.xml:392: Schema text failed: Could not read mapping document from file: /home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes/edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:149)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
Caused by: org.hibernate.MappingException: Could not read mapping document from file: /home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes/edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
at org.hibernate.cfg.Configuration.addFile(Configuration.java:252)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaExportTask.java:202)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:146)
... 17 more
Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping edu.ufl.osg.websphere.client.web.Cluster.roles
at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2030)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2005)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:368)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:248)
... 19 more
--- Nested Exception ---
org.hibernate.MappingException: Could not read mapping document from file: /home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes/edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
at org.hibernate.cfg.Configuration.addFile(Configuration.java:252)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaExportTask.java:202)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:146)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping edu.ufl.osg.websphere.client.web.Cluster.roles
at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2030)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2005)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:368)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:248)
... 19 more
/home/laura2/IdeaProjects/WebSphere6b/websphere6b.xml:392: Schema text failed: Could not read mapping document from file: /home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes/edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:149)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
Caused by: org.hibernate.MappingException: Could not read mapping document from file: /home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes/edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
at org.hibernate.cfg.Configuration.addFile(Configuration.java:252)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaExportTask.java:202)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:146)
... 17 more
Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping edu.ufl.osg.websphere.client.web.Cluster.roles
at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2030)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2005)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:368)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:248)
... 19 more
--- Nested Exception ---
org.hibernate.MappingException: Could not read mapping document from file: /home/laura2/IdeaProjects/WebSphere6b/WebSphere6b/build/exploded/WEB-INF/classes/edu/ufl/osg/websphere/client/web/Cluster.hbm.xml
at org.hibernate.cfg.Configuration.addFile(Configuration.java:252)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaExportTask.java:202)
at org.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:146)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping edu.ufl.osg.websphere.client.web.Cluster.roles
at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2030)
at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2005)
at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:368)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:282)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addFile(Configuration.java:248)
... 19 more

Ant build completed with 3 errors 3 warnings in 5s at 1:04:06 PM


Name and version of the database you are using:
MySQL

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:



Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 22, 2006 8:39 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you probably are adding the same mapping twice...don't.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.