Jasper + Grails
17/08/2012 00:29
0
Estou usando o plugin do jasper, no ambiente de desenvolvimento funcinou corretamente, mas quando dou war, jogo no tomcat e vou para produção ocorre alguns erros que não entendo.

Qualquer ajuda é bem vinda.. obrigado com antecedência.

Obs: Utilizo MySql, Tomcat, firewall desabilitado, portas redirecionados no rotador.. tudo ok. Uso TomCat na porta 9001 mesmo.

Minhas configurações:

Config.groovy
// set per-environment serverURL stem for creating absolute links
environments {
development {
grails.logging.jul.usebridge = true
jasper.dir.reports = 'web-app/reports'
}
production {
grails.logging.jul.usebridge = false
jasper.dir.reports = 'web-app/reports'
// TODO: grails.serverURL = "http://www.changeme.com"
// tentei setar o serverURL tb.. mas depois tirei.
// grails.serverURL = "http://[MEU IP]:9001/CleanCar"
}
}



Pedido no gsp:
<g:jasperReport jasper="autorizacao-reports" format="PDF" name="Gerar PDF">
<input type="hidden" name="autorizacao_id" value="${autorizacaoServicoInstance?.id}" />
</g:jasperReport>



Erro no Firebug:
"NetworkError: 500 Internal Server Error - http://[meu ip aqui]:9001/CleanCar/jasper/?_format=PDF&_name=Gerar+PDF&_file=autorizacao-reports&autorizacao_id=1"



Trace:

URI
/CleanCar/jasper/
Class
java.lang.Exception
Message
No such report spec: web-app/reports\autorizacao-reports (jasper or .jrxml)


Trace
Line | Method
->> -2 | newInstance0 in sun.reflect.NativeConstructorAccessorImpl
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| -1 | newInstance in ''
| 77 | invoke . . . . . . . . . . . . in org.codehaus.groovy.reflection.CachedConstructor
| 71 | doConstructorInvoke in ''
| 81 | callConstructor . . . . . . . . in org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap
| 190 | callConstructor in org.codehaus.groovy.runtime.callsite.AbstractCallSite
| 115 | getReport . . . . . . . . . . . in org.codehaus.groovy.grails.plugins.jasper.JasperReportDef
| -1 | call in org.codehaus.groovy.grails.plugins.jasper.JasperReportDef$getReport
| 227 | generatePrinter . . . . . . . . in org.codehaus.groovy.grails.plugins.jasper.JasperService
| -1 | this$2$generatePrinter in ''
| 51 | buildReportDefinition . . . . . in ''
| -1 | invoke in org.codehaus.groovy.grails.plugins.jasper.JasperService$$FastClassByCGLIB$$903b2389
| 191 | invoke . . . . . . . . . . . . in net.sf.cglib.proxy.MethodProxy
| 689 | invokeJoinpoint in org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation
| 150 | proceed . . . . . . . . . . . . in org.springframework.aop.framework.ReflectiveMethodInvocation
| 110 | invoke in org.springframework.transaction.interceptor.TransactionInterceptor
| 172 | proceed . . . . . . . . . . . . in org.springframework.aop.framework.ReflectiveMethodInvocation
| 622 | intercept in org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor
| -1 | buildReportDefinition . . . . . in org.codehaus.groovy.grails.plugins.jasper.JasperService$$EnhancerByCGLIB$$861a5eec
| 42 | defaultCall in org.codehaus.groovy.runtime.callsite.CallSiteArray
| -1 | call . . . . . . . . . . . . . in org.codehaus.groovy.grails.plugins.jasper.JasperService$buildReportDefinition
| 32 | doCall in org.codehaus.groovy.grails.plugins.jasper.JasperController$_closure1
| -2 | invoke0 . . . . . . . . . . . . in sun.reflect.NativeMethodAccessorImpl
| -1 | invoke in ''
| 226 | invoke . . . . . . . . . . . . in org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite
| 52 | callCurrent in org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite
| 141 | callCurrent . . . . . . . . . . in org.codehaus.groovy.runtime.callsite.AbstractCallSite
| -1 | doCall in org.codehaus.groovy.grails.plugins.jasper.JasperController$_closure1
| -2 | invoke0 . . . . . . . . . . . . in sun.reflect.NativeMethodAccessorImpl
| -1 | invoke in ''
| 90 | invoke . . . . . . . . . . . . in org.codehaus.groovy.reflection.CachedMethod
| 233 | doMethodInvoke in groovy.lang.MetaMethod
| 1047 | invokeMethod . . . . . . . . . in groovy.lang.MetaClassImpl
| 1110 | invokeMethod in groovy.lang.ExpandoMetaClass
| 877 | invokeMethod . . . . . . . . . in groovy.lang.MetaClassImpl
| 412 | call in groovy.lang.Closure
| 406 | call . . . . . . . . . . . . . in ''
| -1 | call in java_util_concurrent_Callable$call
| -2 | invoke0 . . . . . . . . . . . . in sun.reflect.NativeMethodAccessorImpl
| -1 | invoke in ''
| 67 | invoke . . . . . . . . . . . . in org.codehaus.groovy.grails.web.servlet.mvc.MixedGrailsControllerHelper
| 330 | handleAction in org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper
| 211 | executeAction . . . . . . . . . in ''
| 177 | handleURI in ''
| 116 | handleURI . . . . . . . . . . . in ''
| 72 | handleRequest in org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController
| 48 | handle . . . . . . . . . . . . in org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter
| 325 | doDispatch in org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet
| 827 | doService . . . . . . . . . . . in org.springframework.web.servlet.DispatcherServlet
| 882 | processRequest in org.springframework.web.servlet.FrameworkServlet
| 778 | doGet . . . . . . . . . . . . . in ''
| 621 | service in javax.servlet.http.HttpServlet
| 722 | service . . . . . . . . . . . . in ''
| 305 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter . . . . . . . . . . . in ''
| 70 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 243 | internalDoFilter . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter in ''
| 369 | doFilter . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 99 | invoke in org.springframework.security.web.access.intercept.FilterSecurityInterceptor
| 83 | doFilter . . . . . . . . . . . in ''
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 97 | doFilter . . . . . . . . . . . in org.springframework.security.web.access.ExceptionTranslationFilter
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 78 | doFilter . . . . . . . . . . . in org.springframework.security.web.authentication.AnonymousAuthenticationFilter
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 119 | doFilter . . . . . . . . . . . in org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 54 | doFilter . . . . . . . . . . . in org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 187 | doFilter . . . . . . . . . . . in org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
| 40 | doFilter in org.codehaus.groovy.grails.plugins.springsecurity.RequestHolderAuthenticationFilter
| 381 | doFilter . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 79 | doFilter in org.codehaus.groovy.grails.plugins.springsecurity.MutableLogoutFilter
| 381 | doFilter . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 57 | doFilter in org.springframework.security.web.context.SecurityContextPersistenceFilter
| 381 | doFilter . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 168 | doFilter in org.springframework.security.web.FilterChainProxy
| 346 | invokeDelegate . . . . . . . . in org.springframework.web.filter.DelegatingFilterProxy
| 259 | doFilter in ''
| 243 | internalDoFilter . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter in ''
| 70 | doFilter . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 243 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter . . . . . . . . . . . in ''
| 70 | doFilter in org.springframework.web.filter.OncePerRequestFilter
| 243 | internalDoFilter . . . . . . . in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter in ''
| 690 | invoke . . . . . . . . . . . . in org.apache.catalina.core.ApplicationDispatcher
| 477 | processRequest in ''
| 402 | doForward . . . . . . . . . . . in ''
| 329 | forward in ''
| 312 | forwardRequestForUrlMappingInfo in org.codehaus.groovy.grails.web.util.WebUtils
| 277 | forwardRequestForUrlMappingInfo in ''
| 268 | forwardRequestForUrlMappingInfo in ''
| 209 | doFilterInternal in org.codehaus.groovy.grails.web.mapping.filter.UrlMappingsFilter
| 76 | doFilter . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 243 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter . . . . . . . . . . . in ''
| 200 | obtainContent in org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter
| 151 | doFilter . . . . . . . . . . . in ''
| 243 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter . . . . . . . . . . . in ''
| 369 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 109 | invoke . . . . . . . . . . . . in org.springframework.security.web.access.intercept.FilterSecurityInterceptor
| 83 | doFilter in ''
| 381 | doFilter . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 97 | doFilter in org.springframework.security.web.access.ExceptionTranslationFilter
| 381 | doFilter . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 78 | doFilter in org.springframework.security.web.authentication.AnonymousAuthenticationFilter
| 381 | doFilter . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 119 | doFilter in org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter
| 381 | doFilter . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 54 | doFilter in org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter
| 381 | doFilter . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 187 | doFilter in org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
| 40 | doFilter . . . . . . . . . . . in org.codehaus.groovy.grails.plugins.springsecurity.RequestHolderAuthenticationFilter
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 79 | doFilter . . . . . . . . . . . in org.codehaus.groovy.grails.plugins.springsecurity.MutableLogoutFilter
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 79 | doFilter . . . . . . . . . . . in org.springframework.security.web.context.SecurityContextPersistenceFilter
| 381 | doFilter in org.springframework.security.web.FilterChainProxy$VirtualFilterChain
| 168 | doFilter . . . . . . . . . . . in org.springframework.security.web.FilterChainProxy
| 346 | invokeDelegate in org.springframework.web.filter.DelegatingFilterProxy
| 259 | doFilter . . . . . . . . . . . in ''
| 243 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter . . . . . . . . . . . in ''
| 69 | doFilterInternal in org.codehaus.groovy.grails.web.servlet.mvc.GrailsWebRequestFilter
| 76 | doFilter . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 243 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter . . . . . . . . . . . in ''
| 69 | doFilterInternal in org.codehaus.groovy.grails.web.filters.HiddenHttpMethodFilter
| 76 | doFilter . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 243 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter . . . . . . . . . . . in ''
| 88 | doFilterInternal in org.springframework.web.filter.CharacterEncodingFilter
| 76 | doFilter . . . . . . . . . . . in org.springframework.web.filter.OncePerRequestFilter
| 346 | invokeDelegate in org.springframework.web.filter.DelegatingFilterProxy
| 259 | doFilter . . . . . . . . . . . in ''
| 243 | internalDoFilter in org.apache.catalina.core.ApplicationFilterChain
| 210 | doFilter . . . . . . . . . . . in ''
| 225 | invoke in org.apache.catalina.core.StandardWrapperValve
| 123 | invoke . . . . . . . . . . . . in org.apache.catalina.core.StandardContextValve
| 168 | invoke in org.apache.catalina.core.StandardHostValve
| 98 | invoke . . . . . . . . . . . . in org.apache.catalina.valves.ErrorReportValve
| 927 | invoke in org.apache.catalina.valves.AccessLogValve
| 118 | invoke . . . . . . . . . . . . in org.apache.catalina.core.StandardEngineValve
| 407 | service in org.apache.catalina.connector.CoyoteAdapter
| 1001 | process . . . . . . . . . . . . in org.apache.coyote.http11.AbstractHttp11Processor
| 585 | process in org.apache.coyote.AbstractProtocol$AbstractConnectionHandler
| 312 | run . . . . . . . . . . . . . . in org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor
| -1 | runWorker in java.util.concurrent.ThreadPoolExecutor
Tags: jasper


0
Pelo que entendi quando boto em produção na minha máquina como servidor o programa não encontrou o .jasper não é?

[]s
17/08/2012 00:35


0
Resolvido

Foi só trocar

jasper.dir.reports = 'web-app/reports'

por

jasper.dir.reports = '/reports'

na produção..

thx
17/08/2012 12:17



Ainda não faz parte da comunidade???

Para se registrar, clique aqui.


Aprenda Groovy e Grails com a Formação itexto!

Newsletter Semana Groovy

Assinar

Envie seu link!


Livro de Grails


/dev/All

Os melhores blogs de TI (e em português) em um único lugar!

 
Creative Commons
RSS Grails Brasil é mantido por itexto Consultoria.
Em caso de problemas contacte Henrique Lobo Weissmann (Kico) por e-mail: kico@itexto.com.br
Todo o conteúdo presente neste site adota o Creative Commons como licença padrão.
Ver: 4.14.0
itexto