jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Koci <Martin.K...@aura.cz>
Subject Re: No item in ItemStateManager? Was: Strange exception: javax.jcr.ItemNotFoundException: d1a479a0-b822-43a3-8181-9380635fb02a
Date Wed, 21 Jun 2006 15:14:40 GMT
No, every user has own instance of javax.jcr.Session and there is only
one thread per user. 

Is Jackrabbit creating new session for every login operation? If user
perform login two times with same login and password, is new session
created?

Stefan Guggisberg píše v St 21. 06. 2006 v 17:13 +0200:
> On 6/21/06, Martin Koci <Martin.Koci@aura.cz> wrote:
> > Jackrabbit version is 1.0.1 and repository.xml is the same as in SVN
> > codebase : jackrabbit/src/main/config/repository.xml
> 
> are you sharing Session instances among multiple threads?
> 
> >
> > Stefan Guggisberg píše v St 21. 06. 2006 v 14:51 +0200:
> > > On 6/20/06, Martin Koci <Martin.Koci@aura.cz> wrote:
> > > > Thanks for your answer.
> > > >
> > > > Unfortunately my problem is not reproducible  with a test. I'm using
> > > > repository from production environment and that problem appears only
> > > > with that repository.
> > > >
> > > > Probably repository is corrupted but this should never happen.
> > >
> > > i agree it shouldn't happen. what jackrabbit version are you refering to?
> > > what's the configuration of your repository (PersistenceManager & FileSystem)?
> > >
> > > cheers
> > > stefan
> > >
> > > > I've added method for removing problematic node but it leads to similar
> > > > exception:
> > > > javax.jcr.ItemNotFoundException: a156b553-accf-4137-85cb-93ed24d4c8d4
> > > >         at
> > > > org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:465)
> > > >         at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:321)
> > > >         at org.apache.jackrabbit.core.NodeImpl.onRemove(NodeImpl.java:661)
> > > >         at org.apache.jackrabbit.core.NodeImpl.onRemove(NodeImpl.java:662)
> > > >         at org.apache.jackrabbit.core.NodeImpl.onRemove(NodeImpl.java:662)
> > > >         at org.apache.jackrabbit.core.NodeImpl.onRemove(NodeImpl.java:662)
> > > >         at org.apache.jackrabbit.core.NodeImpl.onRemove(NodeImpl.java:662)
> > > >         at org.apache.jackrabbit.core.NodeImpl.onRemove(NodeImpl.java:662)
> > > >         at
> > > > org.apache.jackrabbit.core.NodeImpl.removeChildNode(NodeImpl.java:626)
> > > >         at
> > > > org.apache.jackrabbit.core.ItemImpl.internalRemove(ItemImpl.java:867)
> > > >         at org.apache.jackrabbit.core.ItemImpl.remove(ItemImpl.java:1053)
> > > >         at
> > > > cz.aura.cms.preferences.impl.PreferencesServiceImpl.deleteUserPreferenceNode(PreferencesServiceImpl.java:271)
> > > >
> > > > Is there any chance to remove problematic nodes? And I don't understand
> > > > why item.remove() calls ItemManager.createItemInstance as shown in stack
> > > > trace above.
> > > >
> > > > Thanks for any help
> > > > Martin
> > > >
> > > > Stefan Guggisberg píše v Út 20. 06. 2006 v 12:31 +0200:
> > > > > On 6/19/06, Martin Koci <Martin.Koci@aura.cz> wrote:
> > > > > > As I'm looking to current code, this exception is thrown with
> > > > > > SessionItemStateManager, because associated instances of
> > > > > > TransientItemStateManager and TransientItemStateManager haven'n
this
> > > > > > item.
> > > > > >
> > > > > > I don't understand what createItemInstance method in item manager
does -
> > > > > > first called method is for getting state of newly creating item:
> > > > > >
> > > > > >         try {
> > > > > >             state = itemStateProvider.getItemState(id);
> > > > > >         } catch (NoSuchItemStateException nsise) {
> > > > > >             throw new ItemNotFoundException(id.toString());
> > > > > >         }
> > > > > > But how can  item has such state when we are in method for creating
this
> > > > > > item, so the item doesn't exist yet?
> > > > >
> > > > > ItemManager#createItemInstance creates, as tis name implies, an ItemImpl
> > > > > instance. ItemImpl, NodeImpl and PropertyImpl wrap the state of an
item and
> > > > > expose the javax.jcr.Item et al interfaces. so if there's no state,
it
> > > > > can't create
> > > > > an ItemImpl wrapper. that's all fine.
> > > > >
> > > > > regarding your problem: please provide a simple test case which reproduces
your
> > > > > issue.
> > > > >
> > > > > cheers
> > > > > stefan
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Martin
> > > > > >
> > > > > > Martin Koci píše v Po 19. 06. 2006 v 12:00 +0200:
> > > > > > > Hello,
> > > > > > >
> > > > > > > I'm adding recursively nodes, but this leads to exception
occasionally:
> > > > > > > javax.jcr.ItemNotFoundException: d1a479a0-b822-43a3-8181-9380635fb02a
> > > > > > >       at
> > > > > > > org.apache.jackrabbit.core.ItemManager.createItemInstance(ItemManager.java:464)
> > > > > > >       at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:320)
> > > > > > >       at
> > > > > > > org.apache.jackrabbit.core.NodeImpl.internalAddChildNode(NodeImpl.java:794)
> > > > > > >       at
> > > > > > > org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:738)
> > > > > > >       at
> > > > > > > org.apache.jackrabbit.core.NodeImpl.internalAddNode(NodeImpl.java:685)
> > > > > > >       at org.apache.jackrabbit.core.NodeImpl.addNode(NodeImpl.java:1772)
> > > > > > >       at
> > > > > > > cz.aura.cms.preferences.impl.PreferencesServiceImpl.addRecursively(PreferencesServiceImpl.java:195)
> > > > > > >
> > > > > > >
> > > > > > > My code is:
> > > > > > > for (int i = 0; i < nodeNames.length; i++) {
> > > > > > >           relPath = nodeNames[i];
> > > > > > >                 if (workNode.hasNode(relPath) == false)
{
> > > > > > >                     Node node = workNode.addNode(relPath);
> > > > > > >                     workNode = node;
> > > > > > >                 } else {
> > > > > > >                     workNode = workNode.getNode(relPath);
> > > > > > >                 }
> > > > > > > }
> > > > > > >
> > > > > > > Unfortunately this behaviour is not reproducible with test
and come on
> > > > > > > accidentally.
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > Martin
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
> 


Mime
View raw message