on 01-23-2014 10:10 PM
Hello,
I've been working my way through the SAP River tutorials on a HANA Rev 70 server and the HelloWorld and showBusiness applications worked like a charm. As I was attempting to activate the EmployeeDirectory.rdl code for the 3rd tutorial, I discovered that my HANA server was crashing ... more specifically that the Index Server was writing a core file and restarting.
I was able to use the Index Server crash file, under Administration > Diagnosis Files > indexserver_host.30003.crashdump.timestamp.trc to identify the problematic block of code:
[CRASH_CONTEXT] context info: (2014-01-23 16:16:35 416 Local)
----> Crashing context information <----
ContextStack at (0x00007fc72ead9110)
stack: 7fc72e9db000-7fc72eadafff, size 1048576
guard: 7fc72e9cb000-7fc72e9dafff, size 65536
last known stack pointer cur: 0, max: 0
ctx addr: 0x00007fc6ae10c000, ctx link: 0x00007fc6ae10c000, ctx owner: 0x00007fc6ae10c000
ctx name: SqlExecutor, ctx type: thread, ctx id: 34066
ctx command text:
{
SQL: --DBG:CodeFragmentID=EmployeeDirectory.services.updateSalary
Which suggested I should look at the code creating the updateSalary action. Sure enough, when I commented out this section of the River code, I was able to activate the code successfully:
export action updateSalary (id : String, newSalary : DecimalFloat) : String {
let employee:EmployeeDirectory.Employee = select one * from EmployeeDirectory.Employee where userId == id;
let loggedin:EmployeeDirectory.Employee = SELECT ONE * FROM EmployeeDirectory.Employee WHERE userId == sap.hana.services.session.getUserName();
let message = ' You are not authorized to update the salary of employee ' + employee.name + '. Please contact his manager ' + employee.manager.name;
if (loggedin.canUpdateSalary (employee) ) {
employee.salary = newSalary;
employee.save();
let message = 'Salary was updated successfully to '+newSalary+ ' ' + 'for employee' + ' ' + employee.name;
}
return message;
}
In fact, the code activates properly as long as the line:
employee.save();
is commented out. The auto-complete in HANA Studio wants the syntax to be EmployeeDirectory.Employee.save() but I think I have cast employee as an instance of EmployeeDirectory.Employee so it should be ok.
Does anyone know more about the save method on an entity and how I might troubleshoot further?
Thanks,
Jim
Hi James,
What version of HANA are you currently using?
Can you please also attach the RDL file you are working on?
Thanks,
Omer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Omer,
I am using Revision 70 of HANA for both studio and server. Here is the EmployeeDirectory.RDL:
https://share.sap.com/I817520/MyShares/HANA/EmployeeDirectory.rdl.txt
Note that this problem happens even if I activate the sample code from the SAP River Tutorials.
Thanks,
Jim
Hi James,
I could not reproduce it on our reference SP7 machine.
(You can find its details here, it's the first instance on in the table)
Can you please attach the index server log from the problematic activation?
Also, if possible, please mail me the details of the machine you are running on so that I can debug the issue.
Thanks,
Omer.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.