Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
10 replies
Subscribers
7 subscribers
Views
3305 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
We are currently running on 7.9 & I'm trying to fetch data from a table
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
We are currently running on 7.9 & I'm trying to fetch data from a table using a simple query rule to fetch all details as in SELECT * from TABLE. When I try to do that, I get the following error:
Interface Definition: Expression evaluation error in rule 'fetchAllDetails' at function 'queryruleexec': Error evaluating function 'queryruleexec' : Unexpected error executing query (type: [ACTPREJobDT954], query: [fetchAllDetails], order by: [[]], filters:[null])
Later on I discovered that a particular column of type NUMBER(38,0) (In Appian as well in Database is the same) has a value of '678766787323'. When I changed this value in DB to 8 digits or lesser than that, the query rule works fine, else it displays an error. The log says, it is a 'Numeric Overflow'.We have a Customer requirement to get the data from a different portal and display in Appian. So, if this is the case, how do I achieve this?
I also found a similar post for this ...
numeric-overflow.log
OriginalPostID-157638
OriginalPostID-157638
Discussion posts and replies are publicly visible
0
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
...issue, but the solution doesn't work for me:
forum.appian.com/.../b-48863
Any thoughts.... ??
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
at com.appiancorp.rdbms.hb.HbSqlExceptionConverter.convert(HbSqlExceptionConverter.java:95)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2536)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
at com.appiancorp.type.external.teneoimpl.EntityQueryHandler$4.call(EntityQueryHandler.java:93)
at com.appiancorp.type.external.teneoimpl.EntityQueryHandler$4.call(EntityQueryHandler.java:90)
at com.appiancorp.type.external.teneoimpl.TimedWorkRunner.run(TimedWorkRunner.java:52)
... 265 more
Caused by: java.sql.SQLException: Numeric Overflow
at oracle.jdbc.driver.NumberCommonAccessor.throwOverflow(NumberCommonAccessor.java:4381)
at oracle.jdbc.driver.NumberCommonAccessor.getInt(NumberCommonAccessor.java:112)
at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.java:942)
at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:438)
at org.jboss.jca.adapters.jdbc.WrappedResultSet.getInt(WrappedResultSet.java:1073)
at org.hibernate.type.descriptor.sql.IntegerTypeDescriptor$2.doExtract(IntegerTypeDescriptor.java:61)
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:249)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:229)
at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:330)
at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2283)
at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1527)
at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1455)
at org.hibernate.loader.Loader.getRow(Loader.java:1355)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:611)
at org.hibernate.loader.Loader.doQuery(Loader.java:829)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2533)
... 273 more
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
That means the size of the data inside the column is bigger than what your XSD is declaring. Make sure you have the right @ColumnDefinition annotation with the right length for that column.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
This is what I have declared in my XSD:
<xsd:appinfo source="appian.jpa">@Column(name="LAST_COUNT", columnDefinition="NUMBER(38,0)")</xsd:appinfo>
Even in DB its the same!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Could it be your data store needs to be updated to point to the latest version of the CDT?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
I have double checked the XSDs and recreated the tables...But still the issue persists when retrieving and displaying in Appian.... ! Any idea what could be the problem? or is this the Appian default behaviour, for values that contains more than 9 digits, even after the Column Definition is declared more than 9??
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Chris
over 9 years ago
Have you tried identifying the column in your CDT as 'NUMBER' vs 'NUMBER(38,0)' ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ENOSH EZEKIEL
A Score Level 1
over 9 years ago
Yes.... And the table gets created as declared in the XSD. Data from External system is fed into Appian DB and displayed . While retrieving the data I get an error and its only because the value of the 'LAST_COUNT' column is greater than 9 digits. When I reduce the number of digits, it works fine!
This is how the column was declared:
<xsd:element name="lastCount" nillable="true" type="xsd:int">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@Column(name="LAST_COUNT", columnDefinition="NUMBER(38,0)")</xsd:appinfo>
</xsd:annotation>
</xsd:element>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Chris
over 9 years ago
I was just wondering if there was any difference by removing the "(38,0)" specification from the XSD snippet you posted above, such as:
<xsd:element name="lastCount" nillable="true" type="xsd:int">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">@Column(name="LAST_COUNT", columnDefinition="NUMBER")</xsd:appinfo>
</xsd:annotation>
</xsd:element>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ENOSH EZEKIEL
A Score Level 1
over 8 years ago
AFAIK, when you have a declaration, it can allow a max of upto the limit declared within the datatype.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel