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)
Problem with sql-statement
mreder
Hi,
I have a problem with a sql-statement. I use the Design Engine API.
In the statement there are matched two tables with a same entryname, e.g.
SELECT table1.name as value1, table2.name as value2 FROM table1, table2 WHERE table1.id = table2.tab1_id
The report is still generated sucessful, but if I want to open the report as maybe a HTML-resource, then I get a message like that:
The following items have errors:
Table table:
+ Column binding "value2" has referred to a data set column "value2" which does not exist.
If I take an other value coloum from the table, maybe "SELECT table1.name as value1, table2.id as value2 FROM table1, table2 WHERE table1.id = table2.tab1_id" it works fine. Then Birt use "name" and "id", I think there are no conflicts because of two equal coloumnames. ???
I don't understand that. Why i can't use alias-names? Or I am wrong?
Find more posts tagged with
Comments
mwilliams
Hi mreder,
Can click on the '+' sign to expand the error and attach the entire thing?
mreder
Hi Micheal,
this is the result by clicking on the "+".
data.engine.ColumnBindingReferToInexistColumn ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: Column binding "alias69" has referred to a data set column "alias69" which does not exist. at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1109) at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1073) at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:88) at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:45) at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:33) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:63) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90) at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:101) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:151) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:72) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:954) at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:933) at org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:132) 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.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.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:225) at javax.servlet.http.HttpServlet.service(HttpServlet.java:616) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:112) at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:269) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)Caused by: org.eclipse.birt.data.engine.core.DataException: Column binding "alias69" has referred to a data set column "alias69" which does not exist. at org.eclipse.birt.data.engine.impl.ResultIterator.validateManualBindingExpressions(ResultIterator.java:296) at org.eclipse.birt.data.engine.impl.ResultIterator.<init>(ResultIterator.java:146) at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:177) at org.eclipse.birt.report.engine.data.dte.QueryResultSet.<init>(QueryResultSet.java:92) at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:128) at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:248) at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1736) at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:77) ... 58 more
mwilliams
mreder,
What version of BIRT are you using? This seems like it's probably a bug, but if you're using a much older version of BIRT, it could be fixed in the newest version. Let me know.
mreder
Hi michael,
I just use the newest birt-runtime version 2.3.1.
regards
mwilliams
mreder,<br />
<br />
You might do a quick search of the <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php'>bug
list</a> and see if you see a bug about this. If not, please log one for it. Also, if you could post the bug info in here if you do, that'd be great. Thanks!
jmiranda
Turns out this is probably a MySQL driver issue. We ran into the same problem. There's a workaround at the following URL.<br />
<br />
<a class='bbc_url' href='
http://bugs.mysql.com/bug.php?id=33966'>MySQL
Bugs: #33966: Alias are ignored on a select when using a combination of Hibernate/mysql 5.1</a>