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)
Error adding boolean field
Rajesh Kakawat
When I add boolean field I get following error but when I remove it my report work without any error<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
A BIRT exception occurred.
Plug-in Provider:Eclipse BIRT Project
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:3.7.2.v20120213
Error Code:data.engine.fail.prepareExecution
Error Message:Failed to prepare the query execution for the data set: Sales
Failed to prepare the following query for the data set type (org.jboss.tools.birt.oda.dataSet).
[select
buyer.salutation,
buyer.sellerSpf
from SaleProperty as saleProperty]
org.eclipse.datatools.connectivity.oda.OdaException: 'boolean' is not a valid type.
</pre>
<br />
here sellerSpf is boolean type.<br />
I am using hibernate to connect with report and MySql 5.1.61<br />
Eclipse : 3.7<br />
<br />
Thanks for help
Find more posts tagged with
Comments
Hans_vd
Hi rajesh,<br />
<br />
As far as I know, in MySql a boolean actually is a tinyInt type field.<br />
Can you check out what happens if you write the query like this.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
select buyer.salutation,
cast (buyer.sellerSpf as INTEGER) as sellerSpf
from SaleProperty as saleProperty
</pre>
<br />
I suppose the data set field will now contain 1's and 0's<br />
<br />
Hope this helps<br />
Hans
Rajesh Kakawat
Thank it working but have to change INTEGER to integer otherwise it is giving error<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
No data type for node: org.hibernate.hql.ast.tree.MethodNode
\-[METHOD_CALL] MethodNode: '('
+-[METHOD_NAME] IdentNode: 'cast' {originalText=cast}
\-[EXPR_LIST] SqlNode: 'exprList'
+-[DOT] DotNode: 'saleproper0_.SELLER_SPF' {propertyName=sellerSpf,dereferenceType=ALL,propertyPath=sellerSpf,path=saleProperty.sellerSpf,tableAlias=saleproper0_,className=com.castor.master.sale.property.SaleProperty,classAlias=saleProperty}
| +-[ALIAS_REF] IdentNode: 'saleproper0_.ID' {alias=saleProperty, className=com.castor.master.sale.property.SaleProperty, tableAlias=saleproper0_}
| \-[IDENT] IdentNode: 'sellerSpf' {originalText=sellerSpf}
\-[IDENT] IdentNode: 'INTEGER' {originalText=INTEGER}
No data type for node: org.hibernate.hql.ast.tree.MethodNode
\-[METHOD_CALL] MethodNode: '('
+-[METHOD_NAME] IdentNode: 'cast' {originalText=cast}
\-[EXPR_LIST] SqlNode: 'exprList'
+-[DOT] DotNode: 'saleproper0_.SELLER_SPF' {propertyName=sellerSpf,dereferenceType=ALL,propertyPath=sellerSpf,path=saleProperty.sellerSpf,tableAlias=saleproper0_,className=com.castor.master.sale.property.SaleProperty,classAlias=saleProperty}
| +-[ALIAS_REF] IdentNode: 'saleproper0_.ID' {alias=saleProperty, className=com.castor.master.sale.property.SaleProperty, tableAlias=saleproper0_}
| \-[IDENT] IdentNode: 'sellerSpf' {originalText=sellerSpf}
\-[IDENT] IdentNode: 'INTEGER' {originalText=INTEGER}
</pre>