Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Upgrading Birt from 2.3 to 3.7
Rostand
Hi all,
I am trying to upgrade a web application from birt 2.3 to birt 3.7.
I am getting the following error when i use Tomcat 6 to run the report :
16 d?c. 2011 16:33:35 org.eclipse.birt.report.engine.api.ReportEngine <init>
GRAVE: Cant startup the OSGI framework
Can't load the report engine
java.lang.NullPointerException
at org.eclipse.birt.report.engine.api.ReportEngine.openReportDesign(ReportEngine.java:160)
at fr.dfs.report.service.implementation.BirtEngineWrapper.renderReport(BirtEngineWrapper.java:161)
at fr.dfs.report.service.implementation.BirtReportService.doReport(BirtReportService.java:55)
at fr.dfs.report.service.implementation.BirtReportService.doReport(BirtReportService.java:38)
at fr.dfs.ocrifs.services.EditiqueService.doReport(EditiqueService.java:76)
at fr.dfs.ocrifs.business.implementation.EditiqueBO.executeEditique(EditiqueBO.java:51)
at fr.dfs.ocrifs.web.bean.EditiqueBean.editSingleAttestation(EditiqueBean.java:208)
at fr.dfs.ocrifs.web.bean.EditiqueBean.editSingleAttestation(EditiqueBean.java:215)
at fr.dfs.ocrifs.web.bean.EditiqueBean$$FastClassByCGLIB$$18e7c83f.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:695)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:630)
at fr.dfs.ocrifs.web.bean.EditiqueBean$$EnhancerByCGLIB$$25b217f8.editSingleAttestation(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
at javax.faces.component.UICommand.broadcast(UICommand.java:109)
at javax.faces.component.UIData.broadcast(UIData.java:517)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at fr.dfs.authentification.filter.AuthorisationFilterBean.doFilterInternal(AuthorisationFilterBean.java:46)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at fr.dfs.authentification.filter.AuthentificationFilterBean.doFilterInternal(AuthentificationFilterBean.java:45)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at fr.dfs.authentification.filter.RememberMeFilterBean.doFilterInternal(RememberMeFilterBean.java:65)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
fr.dfs.report.service.exception.ReportServiceException: impossible de produire le report :Reading of Attestation.rptdesign failed : null
at fr.dfs.report.service.implementation.BirtReportService.doReport(BirtReportService.java:58)
at fr.dfs.report.service.implementation.BirtReportService.doReport(BirtReportService.java:38)
at fr.dfs.ocrifs.services.EditiqueService.doReport(EditiqueService.java:76)
at fr.dfs.ocrifs.business.implementation.EditiqueBO.executeEditique(EditiqueBO.java:51)
at fr.dfs.ocrifs.web.bean.EditiqueBean.editSingleAttestation(EditiqueBean.java:208)
at fr.dfs.ocrifs.web.bean.EditiqueBean.editSingleAttestation(EditiqueBean.java:215)
at fr.dfs.ocrifs.web.bean.EditiqueBean$$FastClassByCGLIB$$18e7c83f.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:695)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:630)
at fr.dfs.ocrifs.web.bean.EditiqueBean$$EnhancerByCGLIB$$25b217f8.editSingleAttestation(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
at javax.faces.component.UICommand.broadcast(UICommand.java:109)
at javax.faces.component.UIData.broadcast(UIData.java:517)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at fr.dfs.authentification.filter.AuthorisationFilterBean.doFilterInternal(AuthorisationFilterBean.java:46)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at fr.dfs.authentification.filter.AuthentificationFilterBean.doFilterInternal(AuthentificationFilterBean.java:45)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at fr.dfs.authentification.filter.RememberMeFilterBean.doFilterInternal(RememberMeFilterBean.java:65)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Reading of Attestation.rptdesign failed : null
at fr.dfs.report.service.implementation.BirtEngineWrapper.renderReport(BirtEngineWrapper.java:166)
at fr.dfs.report.service.implementation.BirtReportService.doReport(BirtReportService.java:55)
... 58 more
Caused by: java.lang.NullPointerException
at org.eclipse.birt.report.engine.api.ReportEngine.openReportDesign(ReportEngine.java:160)
at fr.dfs.report.service.implementation.BirtEngineWrapper.renderReport(BirtEngineWrapper.java:161)
... 59 more
But when i run the report using Junit test or java application stand alone, it's succesful.
Here it's a description of my application.
I use a java project to call the birt runtime. Then i have packaged it as a jar.
When i used this jar in batch or Junit test to run a birt 3.7 report, it succeed.
But, when i use the same jar in tomcat6 i get the error above.
Below it's the piece of code where there is failure :
EngineConfig config = new EngineConfig();
// Home du moteur
try
{
logger.debug("engine home, canonical path :"+getEngineHome().getCanonicalPath());
logger.debug("engine home, absolute path :"+getEngineHome().getAbsolutePath());
} catch (IOException e)
{
e.printStackTrace();
throw new RuntimeException(e);
}
// config.setEngineHome(getEngineHome().getAbsolutePath());
config.setProperty(EngineConstants.WEBAPP_CLASSPATH_KEY, getScriptLibFileNames());
// config.setLogConfig(getLogDirectory().getAbsolutePath(), Level.SEVERE);
return new ReportEngine(config);
Please, i need help ....
Thanks
Find more posts tagged with
Comments
mwilliams
Have you tested your report from the designer in 3.7 to be sure that it's not just an issue with the report design in the upgrade?
Rostand
Hi
Thanks you for your help.
The report works very well in the designer.
I have the error only when i try to run the report in an J2EE application (Myfaces + Tomcat)
Thanks
Yaytay
<blockquote class='ipsBlockquote' data-author="'Rostand'" data-cid="92064" data-time="1324051371" data-date="16 December 2011 - 09:02 AM"><p>
Hi all,<br />
<br />
I am trying to upgrade a web application from birt 2.3 to birt 3.7.<br />
<br />
I am getting the following error when i use Tomcat 6 to run the report :<br />
<br />
<br />
16 d?c. 2011 16:33:35 org.eclipse.birt.report.engine.api.ReportEngine <init><br />
GRAVE: Cant startup the OSGI framework<br />
Can't load the report engine<br /></p></blockquote>
It may simply be an inaccurate error message, but if you are using the BIRT 3.7 runtime you shouldn't be using OSGi - it's just a bunch of jars.<br />
<br />
I start BIRT (3.7.1 now) with this:<br />
IPlatformContext platformContext = new PlatformServletContext( servletContext );<br />
<br />
log.debug( "BIRT Platform starting" );<br />
EngineConfig config = new EngineConfig();<br />
config.setPlatformContext( platformContext );<br />
<br />
Platform.startup( config );<br />
IReportEngineFactory engineFactory = (IReportEngineFactory)Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );<br />
<br />
reportEngine = engineFactory.createReportEngine( config );<br />
reportEngine.changeLogLevel( Level.ALL );<br />
log.debug( "BIRT Platform started" );
Rostand
hi <br />
<br />
thank you for your help.<br />
<br />
I have a question about your answer.<br />
<br />
There is no need to specify the path to the birt runtime ?*<br />
<br />
Thanks<br />
<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'Yaytay'" data-cid="92160" data-time="1324237214" data-date="18 December 2011 - 12:40 PM"><p>
It may simply be an inaccurate error message, but if you are using the BIRT 3.7 runtime you shouldn't be using OSGi - it's just a bunch of jars.<br />
<br />
I start BIRT (3.7.1 now) with this:<br />
IPlatformContext platformContext = new PlatformServletContext( servletContext );<br />
<br />
log.debug( "BIRT Platform starting" );<br />
EngineConfig config = new EngineConfig();<br />
config.setPlatformContext( platformContext );<br />
<br />
Platform.startup( config );<br />
IReportEngineFactory engineFactory = (IReportEngineFactory)Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );<br />
<br />
reportEngine = engineFactory.createReportEngine( config );<br />
reportEngine.changeLogLevel( Level.ALL );<br />
log.debug( "BIRT Platform started" );<br /></p></blockquote>
Yaytay
<blockquote class='ipsBlockquote' data-author="'Rostand'" data-cid="92162" data-time="1324244167" data-date="18 December 2011 - 02:36 PM"><p>
There is no need to specify the path to the birt runtime ?*<br /></p></blockquote>
You mean BIRT_HOME?<br />
No, see here: <a class='bbc_url' href='
http://wiki.eclipse.org/Birt_3.7_Migration_Guide#BIRT_POJO_Viewer_Deployment.'>http://wiki.eclipse.org/Birt_3.7_Migration_Guide#BIRT_POJO_Viewer_Deployment.</a><br
/>
BIRT 3.7 really isn't OSGi any more (as <a class='bbc_url' href='
http://www.spudsoft.co.uk/2011/10/lsned40-the-environment-for-the-birt-3-7-runtime-is-not-osgi/'>I
found for other reasons</a>).