ericwilk / jasperoo

Automatically exported from code.google.com/p/jasperoo
0 stars 0 forks source link

Could not resolve view with name 'talkReportList' in servlet with name and Interner Error #13

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.When loading application and saving already show it
2.Then when clicking on pdf or excel image it gives internal error
3.

What is the expected output? What do you see instead?
Expected Output is suposed to be the excel sheet or pdf 
Internal Error

What version of the product are you using? On what operating system?
roo version Latest 1.4 and on windows 7 

Please provide any additional information below.
Please find attached stack trace for exact view of error message
 I am finding out the solotion too but your help is most welcome.
And wanted to know also i have only the option of acrobat and excel 
or the example there is lot more is there is any ways to solve this let me know 
thnks again

Original issue reported on code.google.com by zaprinc...@hotmail.com on 19 Jun 2011 at 6:53

Attachments:

GoogleCodeExporter commented 9 years ago
I'm having the same issue

org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'lokacijaReportDetail': Initialization of bean failed; nested 
exception is org.springframework.context.ApplicationContextException: Could not 
load JasperReports report from ServletContext resource 
[/WEB-INF/reports/lokacijaReportDetail.jasper]; nested exception is 
java.io.FileNotFoundException: Could not open ServletContext resource 
[/WEB-INF/reports/lokacijaReportDetail.jasper]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.web.servlet.view.ResourceBundleViewResolver.initFactory(ResourceBundleViewResolver.java:251)
    at org.springframework.web.servlet.view.ResourceBundleViewResolver.loadView(ResourceBundleViewResolver.java:194)
    at org.springframework.web.servlet.view.AbstractCachingViewResolver.createView(AbstractCachingViewResolver.java:158)
    at org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:77)
    at org.springframework.web.servlet.DispatcherServlet.resolveViewName(DispatcherServlet.java:1078)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1027)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:113)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at com.springsource.insight.collection.tcserver.request.HttpRequestOperationCollectionValve.invoke(HttpRequestOperationCollectionValve.java:84)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:395)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:250)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.springframework.context.ApplicationContextException: Could not 
load JasperReports report from ServletContext resource 
[/WEB-INF/reports/lokacijaReportDetail.jasper]; nested exception is 
java.io.FileNotFoundException: Could not open ServletContext resource 
[/WEB-INF/reports/lokacijaReportDetail.jasper]
    at org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView.loadReport(AbstractJasperReportsView.java:522)
    at org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView.loadReport(AbstractJasperReportsView.java:476)
    at org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView.initApplicationContext(AbstractJasperReportsView.java:306)
    at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119)
    at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:72)
    at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)
    at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:106)
    at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:85)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1413)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    ... 77 more
Caused by: java.io.FileNotFoundException: Could not open ServletContext 
resource [/WEB-INF/reports/lokacijaReportDetail.jasper]
    at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:117)
    at org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView.loadReport(AbstractJasperReportsView.java:494)
    ... 87 more

this is content of the reports folder
 Directory of C:\Users\emirp\Desktop\STS_WORKSPACE\RANDB\src\main\webapp\WEB-INF\reports

07/26/2011  09:06 AM    <DIR>          .
07/26/2011  09:06 AM    <DIR>          ..
07/26/2011  09:54 AM            22,780 lokacijaReportDetail.jrxml
07/26/2011  09:54 AM            22,829 lokacijaReportList.jrxml

Original comment by epan...@gmail.com on 26 Jul 2011 at 8:10

GoogleCodeExporter commented 9 years ago
The plugin generates reports with an extension of .jrxml, but in 
src/main/webapp/WEB-INF/classes/views.properties it inserts a reference to the 
report with a .jasper extension.

You must hand edit this file, and change the line that references 
/WEB-INF/reports/lokacijaReportDetail.jasper to read 
/WEB-INF/reports/lokacijaReportDetail.jrxml

Eric

Original comment by er...@novexsoftware.com on 4 Aug 2011 at 5:31

GoogleCodeExporter commented 9 years ago
Here is the bug in the code:

In jasperoo/src/main/java/ca/digitalface/jasperoo/JasperooOperationsImpl.java:

Line 558
        templateMap.put(pathResolver.getIdentifier(
                Path.SRC_MAIN_WEBAPP,
                "WEB-INF" + separator + "reports" + separator
                        + entityName.toLowerCase() + "ReportList.jrxml"),
                "reportList.jrxml-template");

        templateMap.put(pathResolver.getIdentifier(
                Path.SRC_MAIN_WEBAPP,
                "WEB-INF" + separator + "reports" + separator
                        + entityName.toLowerCase() + "ReportDetail.jrxml"),
                "reportDetail.jrxml-template");

But at line 621:
                out.write(originalData);
                out.write(entityName.toLowerCase()
                        + "ReportList.url=/WEB-INF/reports/"
                        + entityName.toLowerCase() + "ReportList.jasper\n");
                out.write(entityName.toLowerCase()
                        + "ReportList.(class)=ca.digitalface.jasperoo.reports.CustomJasperReportsMultiFormatView\n");

                out.write(entityName.toLowerCase()
                        + "ReportDetail.url=/WEB-INF/reports/"
                        + entityName.toLowerCase() + "ReportDetail.jasper\n");
                out.write(entityName.toLowerCase()
                        + "ReportDetail.(class)=ca.digitalface.jasperoo.reports.CustomJasperReportsMultiFormatView\n");

These two strings need to change to .jrxml

Original comment by er...@novexsoftware.com on 4 Aug 2011 at 5:46

GoogleCodeExporter commented 9 years ago
For some reason, the jasper reports templates are not being compiled. This was 
last known to work on ROO 1.1.2.

I am looking into it.

Sorry for the delay.

Original comment by wa...@digitalface.ca on 10 Aug 2011 at 1:33

GoogleCodeExporter commented 9 years ago

Original comment by wa...@digitalface.ca on 10 Aug 2011 at 1:33

GoogleCodeExporter commented 9 years ago
Work around...

For some reason, since ROO1.1.4, some of my changes to the pom.xml file are not 
being executed.

Add the following to the bottom of the pom.xml inside the <plugins> tag.

        <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jasperreports-maven-plugin</artifactId>
                <configuration>
                    <sourceDirectory>src/main/webapp/WEB-INF/reports</sourceDirectory>
                    <outputDirectory>src/main/webapp/WEB-INF/reports</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile-reports</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>jasperreports</groupId>
                        <artifactId>jasperreports</artifactId>
                        <version>3.5.3</version>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.log4j</groupId>
                        <artifactId>com.springsource.org.apache.log4j</artifactId>
                        <version>1.2.15</version>
                    </dependency>
                </dependencies>
            </plugin>

I will try to get a fix out as soon as possible.

Original comment by wa...@digitalface.ca on 10 Aug 2011 at 8:45