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
15 replies
Subscribers
8 subscribers
Views
7689 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I have created Expression rule with queryEntity() function. It connects with dis
komalk
over 9 years ago
I have created Expression rule with queryEntity() function. It connects with distant database, and fetches data.
The rule works fine in dev environment. but it fails in another environment.
I tried publishing datastore for entity: MY_PROJECT_CUST
Rule is:
a!queryEntity(
entity: cons!MY_PROJECT_CUST,
query: a!query(
selection: a!querySelection(
columns: {
a!queryColumn(
field: "CUST_ID"
),
a!queryColumn(
field: "CUST_NME"
)
}
),
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: - 1,
sort: a!sortInfo(
field: "CUST_NME",
ascending: true()
)
)
)
).data
I am getting error:Expression evaluation error at function a!queryEntity [line 2]: An error occurred while retrieving the data.
OriginalPostID-187384
OriginalPostID-187384
Discussion posts and replies are publicly visible
0
shailendras593
over 9 years ago
Do you have the privilege to access the datastore in the other environment? I mean are you in the configured security group(s) set for the datastore, in the another environment as well ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@komalk Hi, would you be able to attach the logs ('Caused By' in particular) at the time when the query has failed? This would help identifying the root cause and a quick resolution of the same.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
komalk
over 9 years ago
yes, I am set as admin for that datastore in both env. Also I am system admin for both env.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
komalk
over 9 years ago
where to find those logs sikhivahans
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
allanb
over 9 years ago
@Komalk, on the Home page of Designer, last link on the left hand side navigation should be "Access System Logs"
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Christine Shen
A Score Level 1
over 9 years ago
How much data are you retrieving with this queryEntity? You might want to try limiting the batch size if you have a large datasubset.
Another possible cause of this issue is a timeout of the connection to your database. You will have to check the log files to determine the root cause.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sikhivahans
over 9 years ago
@komalk Try as said by @allanb. If not, it would be worth finding out the location of the logs as per your Appian instance and then the application-server.log in them. Ideally it would be
/logs/application-server.log. To the best of my knowledge this will determine the root cause.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
komalk
over 9 years ago
I have checked logs it shows error: 2016-01-05 18:38:31,911 [ajp-/144.226.143.101:8009-3] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00942: table or view does not exist
2016-01-05 18:38:32,044 [ajp-/144.226.143.101:8009-3] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00942: table or view does not exist
2016-01-05 18:38:33,038 [ajp-/144.226.143.101:8009-3] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00942: table or view does not exist
2016-01-05 18:38:33,957 [ajp-/144.226.143.101:8009-3] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00942: table or view does not exist
2016-01-05 18:38:34,789 [ajp-/144.226.143.101:8009-3] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00942: table or view does not exist
2016-01-05 18:38:35,559 [ajp-/144.226.143.101:8009-3] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00942: table or view does not exist
2016-01-05 18:40:02,931 [ajp-/144.226.143.101:8009-3] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00942: table or view does not exist
Actually table is there n I have also published datastore so
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
narasimhaadityac
A Score Level 2
over 9 years ago
It looks like the synonym was not created in the higher environment / the Appian User is not able to access the table, either you need to create a public / private synonym or provide the appropriate permissions to Appian user on the table.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sonalk
over 9 years ago
Hi Komalk,
If the table already exists, try doing impact analysis for the CDT which is being used in the constant in another environment where you are facing the issue. Sometimes if the CDT is not imported properly following the best practice then such issue can arise.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>