IOException parsing XML document from class path resource [testDomainContext.xml]

Java

29/11/2011

Pessoal,

Na video aula de Struts + Spring + Jpa + Sitemesh, ao gerar os testes com o maven me aparece o seguinte erro abaixo,

JO erro acontece pq ele não encontra meu persistece.xml no class path? Mas ele esta lá!!

Ou da failure pq não encontra o XML no meu arquivo de teste do Spring??

Obrigado galera,

No aguardo!

Running net.fratech.frasys.view.actions.LoginActionTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.102 sec
Running net.fratech.frasys.domain.repository.TesteUserRepository
Nov 29, 2011 11:33:16 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@270e3293: display name [org.springframework.context.support.ClassPathXmlApplicationContext@270e3293]; startup date [Tue Nov 29 23:33:16 BRST 2011]; root of context hierarchy
Nov 29, 2011 11:33:16 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [applicationContext.xml]
Nov 29, 2011 11:33:16 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [testDomainContext.xml]
Nov 29, 2011 11:33:16 PM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.0.Final}
Nov 29, 2011 11:33:16 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.0.0.CR6}
Nov 29, 2011 11:33:16 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Nov 29, 2011 11:33:16 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Nov 29, 2011 11:33:17 PM org.hibernate.ejb.Ejb3Configuration configure
INFO: HHH000318: Could not find any META-INF/persistence.xml file in the classpath
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.809 sec <<< FAILURE!

Results :

Tests in error:
net.fratech.frasys.domain.repository.TesteUserRepository: IOException parsing XML document from class path resource [testDomainContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [testDomainContext.xml] cannot be opened because it does not exist
net.fratech.frasys.domain.repository.TesteUserRepository: No Persistence provider for EntityManager named frasys: No META-INF/persistence.xml was found in classpath.
Rafael Jesus

Rafael Jesus

Curtidas 0

Respostas

Rafael Jesus

Rafael Jesus

29/11/2011

Resolvido, era erro de escrita no Spring, isso que da fazer aulas depois da meia-noite,

Meu surgiu outro erro, vou abrir outro chamado blz...

Valeu
GOSTEI 0
Davi Costa

Davi Costa

29/11/2011

Show de bola Rafael. Assim que possível fechar o chamdo.

att Davi
GOSTEI 0
Rafael Jesus

Rafael Jesus

29/11/2011

me manda a opção pra fechamento, não to encontrando onde fecha!!!!!!
GOSTEI 0
Davi Costa

Davi Costa

29/11/2011

Senão me engano fica no topo do chamado.

att Davi
GOSTEI 0
Dyego Carmo

Dyego Carmo

29/11/2011

Opa !

Resolvido ?

Poderia fechar o chamado ?

Valeu !
GOSTEI 0
Rafael Jesus

Rafael Jesus

29/11/2011

Dyego, não sei por qual razão eu não encontro de maneira alguma o lugar que fecha esse bendito chamado,

Eu me lembro que vinha uma opção junto com a mensagem do moderador, ai selecionava e fechava,

Mas não há a opção de fechamento, ou pelo menos não estou encontrando

GOSTEI 0
Dyego Carmo

Dyego Carmo

29/11/2011

Opa !

Resolvido ? Se sim , poderia fechar o chamado ?


Valeu !
GOSTEI 0
POSTAR