Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 4343

EmployeeDirectory River Tutorial causes Index Server core dump

$
0
0

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


Viewing all articles
Browse latest Browse all 4343

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>