Search Results

Search found 2 results on 1 pages for 'mariselvam'.

Page 1/1 | 1 

  • JDO Exception in google app engine transaction

    - by Mariselvam
    I am getting the following exception while trying to use transation in app engine datastore. javax.jdo.JDOUserException: Transaction is still active. You should always close your transactions correctly using commit() or rollback(). FailedObject:org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManager@12bbe6b at org.datanucleus.jdo.JDOPersistenceManager.close(JDOPersistenceManager.java:277) The following is the code snippet I used : List<String> friendIds = getFriends(userId); Date currentDate = new Date(); PersistenceManager manager = pmfInstance.getPersistenceManager(); try { Transaction trans = manager.currentTransaction(); trans.begin(); for(String friendId : friendIds) { User user = manager.getObjectById(User.class, friendId); if(user != null) { user.setRecoCount(user.getRecoCount() + 1); user.setUpdatedDate(currentDate); manager.makePersistent(user); } } trans.commit(); } finally { manager.close(); }

    Read the article

  • how to get unique values set from a repeating values list

    - by Mariselvam
    I need to parse a large log file (flat file), which contains two column of values (column-A , column-B). Values in both columns are repeating. I need to find for each unique value in column-A , I need to find a set of column-B values. Is this can be done using unix shell command or need to write any perl or python script? What are the ways this can be done? Example: xxxA 2 xxxA 1 xxxB 2 XXXC 3 XXXA 3 xxxD 4 output: xxxA - 2,1,3 xxxB - 2 xxxC - 3 xxxD - 4

    Read the article

1