Ae pessoal,
eu e minhas aventuras com o Xdoclet/Hibernate/Ant … tirando a piadinha do patinho do :snipersmile: CV :lol: to precisando de um help.
Estou com o erro (citado no assunto) quando tento gerar a DDL.
O Xdoclet gera os .hbm normal … o que está com erro:
<?xml version=“1.0”?><!DOCTYPE hibernate-mapping PUBLIC
“-//Hibernate/Hibernate Mapping DTD 2.0//EN”
“http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd”><hibernate-mapping> <class name=“entities.Person” table=“PERSON” dynamic-update=“false” dynamic-insert=“false” ><id name="id" column="id" type="java.lang.Long" > <generator class="increment"> </generator> </id> <one-to-one name="address" class="entities.Address" cascade="all" outer-join="auto" constrained="false" /> <property name="name" type="entities.types.Name" update="true" insert="true" column="name" /> <property name="password" type="java.lang.String" update="true" insert="true" column="password" /> <property name="sex" type="entities.types.Sex" update="true" insert="true" column="sex" /> <property name="username" type="java.lang.String" update="true" insert="true" > <column name="" index="useridx" /> </property> <!-- To add non XDoclet property mappings, create a file named hibernate-properties-Person.xml containing the additional properties and place it in your merge dir. --> <subclass name="entities.Member" dynamic-update="false" dynamic-insert="false" discriminator-value="M" > <property name="classification" type="entities.types.Classification" update="true" insert="true" column="classification" /> </subclass> <subclass name="entities.User" dynamic-update="false" dynamic-insert="false" discriminator-value="U" > <property name="systemGroups" type="java.util.Set" update="true" insert="true" column="systemGroups" /> <set name="systemGroups" table="SYSTEM_GROUPSxUSERS" lazy="false" inverse="false" cascade="none" sort="unsorted" > <key column="id" /> <one-to-many class="entities.Group" /> </set> </subclass> </class></hibernate-mapping>
e o erro:
<blockquote>SchemaExportDump:
[echo] ** Criando arquivo DDL **
[schemaexport] 10:53:27,440 [Thread-11] ERROR net.sf.hibernate.cfg.Configuration - Could not configure datastore from file: C:Arquivos de programaseclipseworkspaceicmWEB-INFclassesentitiesPerson.hbm.xml
[schemaexport] java.lang.StringIndexOutOfBoundsException: String index out of range: 0
[schemaexport] at java.lang.String.charAt(String.java:460)
[schemaexport] at net.sf.hibernate.mapping.Column.setName(Column.java:46)
[schemaexport] at net.sf.hibernate.cfg.Binder.bindColumns(Binder.java:366)
[schemaexport] at net.sf.hibernate.cfg.Binder.bindSimpleValue(Binder.java:412)
[schemaexport] at net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1008)
[schemaexport] at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:344)
[schemaexport] at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1204)
[schemaexport] at net.sf.hibernate.cfg.Configuration.add(Configuration.java:247)
[schemaexport] at net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:169)
[schemaexport] at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaExportTask.java:195)
[schemaexport] at net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:135)
[schemaexport] at org.apache.tools.ant.Task.perform(Task.java:341)
[schemaexport] at org.apache.tools.ant.Target.execute(Target.java:309)
[schemaexport] at org.apache.tools.ant.Target.performTasks(Target.java:336)
[schemaexport] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
[schemaexport] at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
[schemaexport] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:583)
[schemaexport] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:381)
[schemaexport] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[schemaexport] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[schemaexport] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[schemaexport] at java.lang.reflect.Method.invoke(Method.java:324)
[schemaexport] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:337)
[schemaexport] at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:205)
[schemaexport] at java.lang.Thread.run(Thread.java:536)
BUILD FAILED: file:C:/Arquivos de programas/eclipse/workspace/icm/build.xml:100: Schema text failed: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
Total time: 13 seconds</blockquote>
Alguma idéia?

