0 Replies Latest reply on Aug 11, 2005 2:37 AM by mazz

    error using Node API

    mazz Master

      Getting farther along, but now am hitting the following exception when trying to use the Node API.

      Here, I'm getting a Node for a resource that I'm pretty sure doesn't exist (I'm not 100% sure, but I'm pretty sure I'm creating a Node object for a resource that doesn't yet exist in the repo). Once I create the Node, I want to call Node.exists() to check it.

      But I get the following exception when I call this (I know its a deprecated method, but I don't think that's the source of the problem... well, maybe it is, I dunno :-)

      retNode = m_nodeFactory.getNode( getNat(), uriString );


      02:29:52,309 INFO [STDOUT] Hibernate: select slideversi0_.VERSION_ID as VERSION1_, slideversi0_.URI_ID as URI2_12_, slideversi0_.BRANCH_ID as BRANCH3_12_, slideversi0_.REVISION_NO as REVISION4_12_ from slide_version_history slideversi0_, slide_uri slideuri1_ where slideversi0_.URI_ID=slideuri1_.URI_ID and slideuri1_.URI_STRING=? and slideversi0_.REVISION_NO=?
      02:29:52,449 ERROR [AbstractFlushingEventListener] Could not synchronize database state with session
      org.hibernate.HibernateException: Unexpected row count: 0 expected: 1
       at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:32)
       at org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2059)
       at org.hibernate.persister.entity.BasicEntityPersister.delete(BasicEntityPersister.java:2203)
       at org.hibernate.action.EntityDeleteAction.execute(EntityDeleteAction.java:59)
       at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:239)
       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:223)
       at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
       at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:274)
       at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
       at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:716)
       at org.jboss.portal.cms.slide.store.hibernate.HibernateStore.safeFlush(HibernateStore.java:3360)
       at org.jboss.portal.cms.slide.store.hibernate.HibernateStore.clearBinding(HibernateStore.java:3299)
       at org.jboss.portal.cms.slide.store.hibernate.HibernateStore.storeObject(HibernateStore.java:870)
       at org.jboss.portal.cms.slide.store.hibernate.HibernateStore.storeObject(HibernateStore.java:790)
       at org.jboss.portal.cms.slide.store.hibernate.HibernateStore.storeObject(HibernateStore.java:215)
       at org.apache.slide.store.AbstractStore.storeObject(AbstractStore.java:639)
       at org.apache.slide.store.ExtendedStore.storeObject(ExtendedStore.java:590)
       at org.apache.slide.security.SecurityImpl.getPrincipal(SecurityImpl.java:1027)
       at org.apache.slide.security.ACLSecurityImpl.hasPermission(ACLSecurityImpl.java:123)
       at org.apache.slide.security.SecurityImpl.checkPermission(SecurityImpl.java:472)
       at org.apache.slide.security.SecurityImpl.checkCredentials(SecurityImpl.java:405)
       at org.apache.slide.structure.StructureImpl.retrieve(StructureImpl.java:216)
       at org.apache.slide.structure.StructureImpl.retrieve(StructureImpl.java:160)
       at org.jboss.portal.cms.Node.getState(Node.java:90)
       at org.jboss.portal.cms.Node.refresh(Node.java:78)
       at org.jboss.portal.cms.Node.<init>(Node.java:72)
       at org.jboss.portal.cms.NodeFactory.getNode(NodeFactory.java:40)