fawixPJ 26 de jul. de 2006
vou tentar deixar um pouco mais claro… tipo eu criei um arquivo chamado customizeQueries.hbm.xml com o seguinte código
& lt ;? xml version = "1.0" ? & gt ;
& lt ;! DOCTYPE hibernate - mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" & gt ;
& lt ; hibernate - mapping & gt ;
& lt ; sql - query name = "requestsByGroup" & gt ;
& lt ; return alias = "requests" class = "iris.Requests" /& gt ;
SELECT *
FROM requests requests JOIN products products ON products . id_product = requests . id_product
JOIN users users ON users . username = requests . username
WHERE users . id_group = & # 58 ; idGroup
ORDER BY products . product , requests . id_request
& lt ; / sql - query & gt ;
& lt ; sql - query name = "countErrorItemsByRequestAndLine" & gt ;
& lt ; return - scalar column = "total_items" type = "int" /& gt ;
select count & # 40 ; et . error_type & # 41 ; as total_items
from
productions p
join serial_numbers sn
on sn . serial_number = p . serial_number
left join productions_errors pe
join error_types et
on et . id_error_type = pe . id_error_type
on p . id_production = pe . id_production
where sn . id_request = & # 58 ; idRequest and p . id_line = & # 58 ; idLine
& lt ; / sql - query & gt ;
& lt ; / hibernate - mapping & gt ;
e acrescentei a seguinte linha no meu hibernate.cfg.xml
<mapping resource="customizeQueries.hbm.xml"/>
o programa está dando o seguinte erro logo depois da tela de login:
INFO: Configuration resource: hibernate.cfg.xml
26/07/2006 10:29:24 org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource: customizeQueries.hbm.xml
26/07/2006 10:29:24 com.opensymphony.webwork.dispatcher.DispatcherUtils serviceAction
SEVERE: Could not execute action
java.lang.reflect.InvocationTargetException
Caused by: java.lang.ExceptionInInitializerError
Caused by: java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.getEntityResolver()Lorg/xml/sax/EntityResolver;
26/07/2006 10:29:24 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet webwork threw exception
java.lang.reflect.InvocationTargetException
.
.
.
alguem sabe o que pode ser???