Bug 663 - HopObject.getCollection() not respecting "accessname"
: HopObject.getCollection() not respecting "accessname"
Status: RESOLVED FIXED
: Helma
HopObject Functionality
: CVS trunk
: Other Linux
: P5 normal
: 1.7.0
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2009-05-06 14:23 by
Modified: 2009-07-30 11:49 (History)


Attachments
error when retrieving HopObj by accessname on programmatic collection (2.27 KB, text/plain)
2009-05-06 14:23, s o
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2009-05-06 14:23:27
Created an attachment (id=111) [details]
error when retrieving HopObj by accessname on programmatic collection

getting HopObjects by accessname does not work for programmatic collections
created with getCollection().

i tried the minimal case HopObject.getCollection({"accessname":
"ALIAS"}).get("validalias") and more complex ones, all fail with "Error
retrieving Node" - see strace attached.
------- Comment #1 From 2009-05-06 14:30:46 -------
also note that a normal collection fails silently (and returns null) when no
object with the requested accessname exists
------- Comment #2 From 2009-05-11 13:21:46 -------
probably related: 

this throws NPE when trying to load the one story with an accessname, all other
stories before and after that are loaded correctly:
{{{
var coll = Story.getCollection( {"alias": "STO_ALIAS"} );
coll.list(0,10);
}}}


[2009/05/11 12:18:33] [ERROR] [ws2fm4-1] Error in prefetchNodes()
java.lang.NullPointerException
        at helma.objectmodel.db.DbKey.hashCode(DbKey.java:82)
        at helma.objectmodel.db.SyntheticKey.hashCode(SyntheticKey.java:77)
        at java.util.HashMap.put(HashMap.java:418)
        at helma.util.CacheMap.put(CacheMap.java:243)
        at helma.swarm.SwarmCache.put(SwarmCache.java:221)
        at
helma.objectmodel.db.NodeManager.registerNewNode(NodeManager.java:357)
        at
helma.objectmodel.db.NodeManager.prefetchNodes(NodeManager.java:1318)
        at
helma.objectmodel.db.WrappedNodeManager.prefetchNodes(WrappedNodeManager.java:167)
        at helma.objectmodel.db.SubnodeList.prefetch(SubnodeList.java:157)
        at helma.objectmodel.db.Node.prefetchChildren(Node.java:1576)
        at helma.scripting.rhino.HopObject.prefetchChildren(HopObject.java:449)
        at helma.scripting.rhino.HopObject.jsFunction_list(HopObject.java:502)