Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356099 - Property binding doesn't work using BIRT 3.7
Summary: Property binding doesn't work using BIRT 3.7
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 3.7.0   Edit
Hardware: PC Windows Server 2008
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Birt-Data-inbox@eclipse.org CLA
QA Contact: Maggie Shen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-29 11:55 EDT by Bluish Joe CLA
Modified: 2011-12-30 02:38 EST (History)
3 users (show)

See Also:


Attachments
report design (29.25 KB, application/octet-stream)
2011-12-30 01:20 EST, Maggie Shen CLA
no flags Details
properties file (76 bytes, application/octet-stream)
2011-12-30 01:21 EST, Maggie Shen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bluish Joe CLA 2011-08-29 11:55:32 EDT
In order to externalize Data source parameters in a property file, with BIRT 2.6 I used to set dummy parameters in section "BIRT JDBC Data Source" and override them in section "Property Binding" with expressions such as reportContext.getMessage("JDBCDriverClass"); and so on. Basically it reads the values from a property file which I configured.

But now using BIRT 3.7 it doesn't work anymore. It works only setting parameters in the standard way (in section "BIRT JDBC Data Source"); if I add the above scripts in section "Property Binding" it gives me the following error. It correctly reads the IP of the DB (192.168.1.202), but can't connect to it.
Note that the driver is in the right folder (as a matter of fact it works with the standard way of setting parameters).
this problem occurs both in Eclipse preview tool and BIRT viewer webapp.

Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
    org.eclipse.birt.report.data.oda.jdbc.JDBCException: There is an error in get connection, The application requester cannot establish the connection. (192.168.1.202 ). (Element ID:1599) 
exception.error ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: An exception occurred during processing. Please see the following message for details:
Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
    org.eclipse.birt.report.data.oda.jdbc.JDBCException: There is an error in get connection, The application requester cannot establish the connection. (192.168.1.202 ). (Element ID:1599)
        at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1206)
        at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1185)
        at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:96)
        at org.eclipse.birt.report.engine.executor.TextItemExecutor.executeHtmlText(TextItemExecutor.java:97)
        at org.eclipse.birt.report.engine.executor.TextItemExecutor.execute(TextItemExecutor.java:70)
        at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:87)
        at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:92)
        at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:92)
        at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:92)
        at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:92)
        at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:92)
        at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:92)
        at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeAll(ReportExecutorUtil.java:92)
        at org.eclipse.birt.report.engine.executor.ReportExecutor.createPageExecutor(ReportExecutor.java:229)
        at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.createPageExecutor(SuppressDuplciateReportExecutor.java:61)
        at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.createPageExecutor(WrappedReportExecutor.java:49)
        at org.eclipse.birt.report.engine.executor.ReportExecutorUtil.executeMasterPage(ReportExecutorUtil.java:63)
        at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.start(HTMLPageLM.java:147)
        at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:91)
        at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
        at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
        at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
        at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:929)
        at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
        at org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:131)
        at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
        at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
        at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
        at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPageAll(BirtDocumentProcessor.java:183)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
        at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
        at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
        at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
        at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
        at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:317)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:939)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
        at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: org.eclipse.birt.report.data.adapter.api.AdapterException: An exception occurred during processing. Please see the following message for details:
Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
    org.eclipse.birt.report.data.oda.jdbc.JDBCException: There is an error in get connection, The application requester cannot establish the connection. (192.168.1.202 ).
        at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:636)
        at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:152)
        at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:265)
        at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1897)
        at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
        ... 68 more
Caused by: org.eclipse.birt.data.engine.odaconsumer.OdaDataException: Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
    org.eclipse.birt.report.data.oda.jdbc.JDBCException: There is an error in get connection, The application requester cannot establish the connection. (192.168.1.202 ).
        at org.eclipse.birt.data.engine.odaconsumer.ExceptionHandler.newException(ExceptionHandler.java:54)
        at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:177)
        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:409)
        at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:319)
        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:616)
        ... 72 more
Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: There is an error in get connection, The application requester cannot establish the connection. (192.168.1.202  ).
        at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDBCDriverManager.java:264)
        at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection(JDBCDriverManager.java:214)
        at org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUrl(Connection.java:237)
        at org.eclipse.birt.report.data.oda.jdbc.Connection.open(Connection.java:162)
        at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)
        at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:165)
        ... 82 more
Comment 1 Maggie Shen CLA 2011-12-30 01:19:57 EST
Hi,

I can you reproduce your issue. Please see my attached report design and properties file. There's no problem previewing the data either in 2.6 or 3.7.
Comment 2 Maggie Shen CLA 2011-12-30 01:20:53 EST
Created attachment 208864 [details]
report design
Comment 3 Maggie Shen CLA 2011-12-30 01:21:16 EST
Created attachment 208865 [details]
properties file
Comment 4 Maggie Shen CLA 2011-12-30 02:38:23 EST
close as worksforme. Please reopen if you can give specific steps or reports to reproduce.