Problema no BUILD.XML, configurando o hibernate

0 respostas
M

Pessoal estou seguindo o manual do hibernate em portugues que achei na net, para fazer minha primeira aplicação utilizando esse framework, só que começou ja me dando dor de cabeça rsrsrs, vou postar ai o arquivo xml e o problema pra ver se alguém me da uma luz…

1. <project name="hibernate-tutorial" default="compile"> 2. <property name="sourcedir" value="${basedir}/src"/> 3. <property name="targetdir" value="${basedir}/bin"/> 4. <property name="librarydir" value="${basedir}/lib"/> 5. <path id="libraries"> 6. <fileset dir="${librarydir}"> 7. <include name="*.jar"/> 8. </fileset> 9. </path> 10. <target name="clean"> 11. <delete dir="${targetdir}"/> 12. <mkdir dir="${targetdir}"/> 13. </target> 14. <target name="compile" depends="clean, copy-resources"> 15. <javac srcdir="${sourcedir}" 16. destdir="${targetdir}" 17. classpathref="libraries"/> 18. </target> 19. <target name="copy-resources"> 20. <copy todir="${targetdir}"> 21. <fileset dir="${sourcedir}"> 22. <exclude name="**/*.java"/> 23. </fileset> 24. </copy> 25. </target> 26. </project>

e quando eu compilo ele da o seguinte erro…

1. clean: 2. Deleting directory C:\WORK_NETBEANS\HibernateTeste\src\bin 3. Created dir: C:\WORK_NETBEANS\HibernateTeste\src\bin 4. copy-resources: 5. C:\WORK_NETBEANS\HibernateTeste\src\build.xml:20: C:\WORK_NETBEANS\HibernateTeste\src\src not found. 6. FALHA NA CONSTRUÇÃO (tempo total: 0 segundos)

será que alguém poderia me ajudar…ja instalei o ant e tudo mais…mas não consigo achar o erro ele me aponta que o erro é nessa linha aqui …

1. <copy todir="${targetdir}">

fico no aguardo

estou usando o postgres sql, os dois outros arquivos xml necessário segue abaixo…o Event.hbm.xml e o hibernate.cfg.xml

hibernate.cfg.xml

1. <?xml version='1.0' encoding='utf-8'?> 2. <!DOCTYPE hibernate-configuration PUBLIC 3. "-//Hibernate/Hibernate Configuration DTD 3.0//EN" 4. "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> 5. <hibernate-configuration> 6. <session-factory> 7. <!-- Database connection settings --> 8. <property name="connection.driver_class">org.postgresql.Driver</property> 9. <property name="connection.url">jdbc:postgresql://localhost:5432/testa_hibernate</property> 10. <property name="connection.username">postgres</property> 11. <property name="connection.password">mysenha</property> 12. <!-- JDBC connection pool (use the built-in) --> 13. <property name="connection.pool_size">1</property> 14. <!-- SQL dialect --> 15. <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property> 16. <!-- Enable Hibernate's automatic session context management --> 17. <property name="current_session_context_class">thread</property> 18. <!-- Disable the second-level cache --> 19. <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> 20. <!-- Echo all executed SQL to stdout --> 21. <property name="show_sql">true</property> 22. <!-- Drop and re-create the database schema on startup --> 23. <property name="hbm2ddl.auto">create</property> 24. <mapping resource="events/Event.hbm.xml"/> 25. </session-factory> 26. </hibernate-configuration>

e o Event.hbm.xml

1. <hibernate-mapping> 2. <class name="events.Event" table="EVENTS"> 3. <id name="id" column="EVENT_ID"> 4. <generator class="native"/> 5. </id> 6. <property name="date" type="timestamp" column="EVENT_DATE"/> 7. <property name="title"/> 8. </class> 9. </hibernate-mapping>

Criado 12 de março de 2009
Respostas 0
Participantes 1