Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
birt_runtime_3_7_1 unable to find mongodb-oda-plugin
juhi
I have packaged the birt engine along with my application in a war file. I get the following exception while running a report:
20 Dec, 2011 8:08:26 AM org.eclipse.birt.data.engine.odaconsumer.Driver doGetDriverManifest
SEVERE: Cannot find or process the ODA data source extension configuration.
java.lang.IllegalArgumentException: Cannot find the ODA dataSource extension (org.eclipse.birt.report.data.oda.mongodb).
Check the workspace log file for any problems with loading the extension bundle and its dependencies.
at org.eclipse.datatools.connectivity.oda.util.manifest.ManifestExplorer.getExtensionManifest(ManifestExplorer.java:200)
at org.eclipse.birt.data.engine.odaconsumer.Driver.doGetDriverManifest(Driver.java:152)
at org.eclipse.birt.data.engine.odaconsumer.Driver.findDataSourceExtensionConfig(Driver.java:128)
at org.eclipse.birt.data.engine.odaconsumer.Driver.getDriverExtensionConfig(Driver.java:79)
at org.eclipse.birt.data.engine.odaconsumer.Driver.getExtensionConfig(Driver.java:61)
at org.eclipse.birt.data.engine.odaconsumer.Driver.createNewDriverHelper(Driver.java:99)
at org.eclipse.birt.data.engine.odaconsumer.DriverManager.getDriverHelper(DriverManager.java:115)
at org.eclipse.birt.data.engine.odaconsumer.DriverManager.getNewDriverHelper(DriverManager.java:101)
at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:150)
at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:224)
at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:212)
at org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource(DataSourceRuntime.java:217)
at org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSource(QueryExecutor.java:407)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:317)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:145)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:620)
at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:80)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:267)
at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1905)
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:249)
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:260)
at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:85)
at com.entrib.emg.server.reportengine.birt.BirtReportEngineImpl.runReport(BirtReportEngineImpl.java:119)
at com.entrib.emg.server.controller.ReportingController.handleClientRequest(ReportingController.java:74)
at com.entrib.emg.server.controller.DecryptingController.handleRequestInternal(DecryptingController.java:126)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
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.doPost(FrameworkServlet.java:560)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:662)
From the stack trace it seems that the org.eclipse.birt.report.data.oda.mongodb plugin is not been fetched correctly or it is not placed in the correct location. It was originally under /WEB-INF/libs along with the other jar files. After I got this error for the first time, I placed it unser /WEB-INF/Platform/ and still getting the same error. Also the code that I have written is:
public void init() {
config = new EngineConfig();
config.setLogConfig(logDirectory, Level.INFO);
config.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
Thread.currentThread().getContextClassLoader());
config.getAppContext().put(EngineConstants.WEBAPP_CLASSPATH_KEY,
servletContext.getRealPath("/WEB-INF/lib"));
logger.info(servletContext.getRealPath("/WEB-INF/lib"));
// IPlatformContext platformContext = new PlatformFileContext();
IPlatformContext platformContext = new PlatformServletContext( servletContext );
config.setPlatformContext( platformContext );
try {
Platform.startup(config);
IReportEngineFactory reportEngineFactory = (IReportEngineFactory) Platform
.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
reportEngine = reportEngineFactory.createReportEngine(config);
} catch (BirtException e) {
logger.error("Exception starting platform. " + e.getMessage(), e);
}
}
Any ideas how to resolve this issue?
Thanks,
Juhi.
Find more posts tagged with
Comments
JasonW
With 3.7.1 you should not need any of the following:
config.getAppContext().put(EngineConstants.APPCONTEXT_CLASSLOADER_KEY,
Thread.currentThread().getContextClassLoader());
config.getAppContext().put(EngineConstants.WEBAPP_CLASSPATH_KEY,
servletContext.getRealPath("/WEB-INF/lib"));
logger.info(servletContext.getRealPath("/WEB-INF/lib"));
// IPlatformContext platformContext = new PlatformFileContext();
IPlatformContext platformContext = new PlatformServletContext( servletContext );
config.setPlatformContext( platformContext );
The error you are getting is because the mongo db oda can not be located. Where do you have it? It should be in your web-inf/lib.
Jason
juhi
I did not have it earlier. I added it only when Istarted getting those errors.
Also my mongodb oda is under WEB-INF/lib. The logging configurations are been read from it that i changed for ubuntu (
http://code.google.com/a/eclipselabs.org/p/mongodb-oda-birt-plugin/issues/detail?id=2)
, this shows that it can find the mongodb oda plugin jars, still i get this error.
And the interesting part is the .war file runs on Windows platform but gives the above errors on ubuntu. I suspect there is some absolute path defined in some of the jars that is being used for birt, specific to windows. Do you have any idea regarding that?
juhi
Also this error comes up under tomcat with linux, but runs well under tomcat windows.
This leads to another question : Has anybody tested the mongodb oda plugin with linux? Any ideas please help.
juhi
Hi,
I could got through the problem. We actually created the problem ourselves. When we rebuilt the mongodb-oda plugin changing the log configurations, the MANIFEST file was not getting included, so it couldnt read the datasource. So beware when you create rebuild any of the plugins, while creating a jar file do not forget the -m option of the jar.
Thanks Jason for your response.
So now the plugin works fine on linux too..