| Autor |
Mensagem |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 07/05/2011 09:49:30
|
lucasmartins
Thread.start()
![[Avatar]](/images/avatar/581baad7ad076179c15ccb316967b664.jpg)
Membro desde: 14/03/2010 21:07:25
Mensagens: 41
Offline
|
Bom dia. Estou com esse problema no mapeamento do meu banco.
Seguem os códigos
Hibernate.cfg.xml:
aluno.hbm.xml
GravaAluno
Erros:
run:
07/05/2011 11:03:12 org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.5
07/05/2011 11:03:12 org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
07/05/2011 11:03:12 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
07/05/2011 11:03:12 org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
07/05/2011 11:03:12 org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
07/05/2011 11:03:12 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
07/05/2011 11:03:12 org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : aluno/aluno.hbm.xml
07/05/2011 11:03:12 org.hibernate.util.XMLHelper$ErrorLogger error
SEVERE: Error parsing XML: XML InputStream(5) The content of element type "class" is incomplete, it must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
07/05/2011 11:03:12 org.hibernate.util.XMLHelper$ErrorLogger error
SEVERE: Error parsing XML: XML InputStream(9) The element type "hibernate-mapping" must be terminated by the matching end-tag "</hibernate-mapping>".
E ai pessoal alguma idéia do que seja?
Abraço
|
[]'s
Lucas Martins. |
|
|
 |
|
|
![[Post New]](/templates/default/images/icon_minipost_new.gif) 07/05/2011 13:08:41
|
rafaelbortoletto
JavaBaby
![[Avatar]](/images/avatar/73b31da2c3e19a4920865d0e8ae1c82a.jpeg)
Membro desde: 26/01/2007 14:27:01
Mensagens: 95
Localização: São Bernardo do Campo - SP
Offline
|
Pelo que eu pude perceber existe uma barra a mais fechando a primeira tag <class> no seu XML.
Ficaria assim o código
This message was edited 1 time. Last update was at 07/05/2011 13:09:10
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 09/05/2011 09:54:20
|
lucasmartins
Thread.start()
![[Avatar]](/images/avatar/581baad7ad076179c15ccb316967b664.jpg)
Membro desde: 14/03/2010 21:07:25
Mensagens: 41
Offline
|
corrigi mas o erro agora é:
run:
09/05/2011 11:08:10 org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.5
09/05/2011 11:08:10 org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
09/05/2011 11:08:10 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
09/05/2011 11:08:10 org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
09/05/2011 11:08:10 org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
09/05/2011 11:08:10 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
09/05/2011 11:08:10 org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : Aluno/aluno.hbm.xml
09/05/2011 11:08:10 org.hibernate.util.XMLHelper$ErrorLogger error
SEVERE: Error parsing XML: XML InputStream(4) The content of element type "class" is incomplete, it must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
09/05/2011 11:08:10 org.hibernate.util.XMLHelper$ErrorLogger error
SEVERE: Error parsing XML: XML InputStream( The content of element type "hibernate-mapping" must match "(meta*,typedef*,import*,(class|subclass|joined-subclass|union-subclass)*,resultset*,(query|sql-query)*,filter-def*,database-object*)".
CONSTRUÍDO COM SUCESSO (tempo total: 5 segundos)
|
[]'s
Lucas Martins. |
|
|
 |
|
|
|
|