You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Sushil Vegad <vs...@serebrum.com> on 2008/06/05 20:17:32 UTC

Jackrabbit 1.4.1 PathNotFoundException

Hello,
Our web application uses custom nodes as follows: [nt:myFolder] > nt:folder
and [nt:myFile] > nt:file

We have a top level folder (called spaceFolder) which is a nt:myFolder under
root; under spaceFolder we add other nodes as follows:
spaceFolder.addNode("topicName",nt:myFolder);
session.save();
session.logout();

We retrieve the topic folder as:
Node root = session.getRootNode();
Node spaceFolder = root.getNode(spaceName);			
Node topic = spaceFolder.getNode(topicName);

If I shutdown the server and start it the next day:
1. spaceFolder.getNode(topicName) throws PathNotFoundException. spaceFolder
is found always, the topicFolder is not found
2. Also, spaceFolder.addNode(topicName) throws ItemExistsException

If I restart the server immediately no exception is thrown. Also, if the
server is not restarted, no exception is thrown.

On server startup, we create the repository and bind it:
InitialContext jndiContext = new InitialContext(props);
RepositoryConfig repoConfig = RepositoryConfig.create(repositoryConfig,
repoHome);
Repository repository = RepositoryImpl.create(repoConfig);
jndiContext.bind(repositoryName, repository);

Can anyone please point out what could be going wrong?

Thanks a lot for any help that you could offer.
Sushil



-- 
View this message in context: http://www.nabble.com/Jackrabbit-1.4.1-PathNotFoundException-tp17676426p17676426.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Jackrabbit 1.4.1 PathNotFoundException

Posted by Sushil Vegad <vs...@serebrum.com>.
Alex,
My bad. This problem has nothing to do with Jackrabbit

This has to do with my dev environment where I run tomcat in its home
directory from eclipse or create a server instance for tomcat in eclipse.
Server instance copies tomcat in eclipse workfolder and it would not
synchronize the repository files correctly, which gave a
PathNotFoundException.

Again, I appreciate your help.

Thanks,
Sushil 


Alexander Klimetschek wrote:
> 
> On Thu, Jun 5, 2008 at 10:45 PM, Sushil Vegad <vs...@serebrum.com>
> wrote:
>> I have attached the  http://www.nabble.com/file/p17679143/repository.xml
>> repository.xml  file.
> 
> I see you use a custom AccessManager and a custom LoginModule. Maybe
> they are (unexpectedly) denying access to the node? A bug there might
> explain why getNode() does not work, but addNode() throws an
> ItemExistsException. And why it happens only after a restart the next
> day (some state in the background or a problem with the ldap
> connection, etc.).
> 
> Otherwise I have no idea what is going on. Maybe you could also post
> the stack trace when it says PathNotFoundException.
> 
> Regards,
> Alex
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Jackrabbit-1.4.1-PathNotFoundException-tp17676426p17698285.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Jackrabbit 1.4.1 PathNotFoundException

Posted by Sushil Vegad <vs...@serebrum.com>.
I uploaded the  http://www.nabble.com/file/p17691739/log.txt log.txt .

We are sure that the LoginModule is not causing a problem - we have to login
first to retrieve the spaceFolder, that always succeeds. If the login module
has issues, space folder cannot be retrieved and it will be seen in the
stack trace. Its the topic folder under spaceFolder that cannot be
retrieved.

We use the AccessManager only for webdav access. The topic folders are
failing when accessed through the web application

Some operation is leaving the repository in an inconsistent state.

I appreciate your help. Maybe I could share some detailed code with you if
that would help?

Thanks,
Sushil


Alexander Klimetschek wrote:
> 
> On Thu, Jun 5, 2008 at 10:45 PM, Sushil Vegad <vs...@serebrum.com>
> wrote:
>> I have attached the  http://www.nabble.com/file/p17679143/repository.xml
>> repository.xml  file.
> 
> I see you use a custom AccessManager and a custom LoginModule. Maybe
> they are (unexpectedly) denying access to the node? A bug there might
> explain why getNode() does not work, but addNode() throws an
> ItemExistsException. And why it happens only after a restart the next
> day (some state in the background or a problem with the ldap
> connection, etc.).
> 
> Otherwise I have no idea what is going on. Maybe you could also post
> the stack trace when it says PathNotFoundException.
> 
> Regards,
> Alex
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Jackrabbit-1.4.1-PathNotFoundException-tp17676426p17691739.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Jackrabbit 1.4.1 PathNotFoundException

Posted by Alexander Klimetschek <ak...@day.com>.
On Thu, Jun 5, 2008 at 10:45 PM, Sushil Vegad <vs...@serebrum.com> wrote:
> I have attached the  http://www.nabble.com/file/p17679143/repository.xml
> repository.xml  file.

I see you use a custom AccessManager and a custom LoginModule. Maybe
they are (unexpectedly) denying access to the node? A bug there might
explain why getNode() does not work, but addNode() throws an
ItemExistsException. And why it happens only after a restart the next
day (some state in the background or a problem with the ldap
connection, etc.).

Otherwise I have no idea what is going on. Maybe you could also post
the stack trace when it says PathNotFoundException.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: Jackrabbit 1.4.1 PathNotFoundException

Posted by Sushil Vegad <vs...@serebrum.com>.
Hello Alex,
I have attached the  http://www.nabble.com/file/p17679143/repository.xml
repository.xml  file.

One more thing I tried is:


> for(Iterator<Node> itr = spaceFolder.getNodes(); itr.hasNext();) {
>     Node tempNode = itr.next();
>     System.out.println("Node name = " + tempNode.getName());
> }
> 
This too doesnt show the topic folder below the spaceFolder.

Regards,
Sushil


Alexander Klimetschek wrote:
> 
> Sounds weird. Could you post your repository.xml configuration?
> 
> Regards,
> Alex
> 
> On Thu, Jun 5, 2008 at 8:17 PM, Sushil Vegad <vs...@serebrum.com> wrote:
>>
>> Hello,
>> Our web application uses custom nodes as follows: [nt:myFolder] >
>> nt:folder
>> and [nt:myFile] > nt:file
>>
>> We have a top level folder (called spaceFolder) which is a nt:myFolder
>> under
>> root; under spaceFolder we add other nodes as follows:
>> spaceFolder.addNode("topicName",nt:myFolder);
>> session.save();
>> session.logout();
>>
>> We retrieve the topic folder as:
>> Node root = session.getRootNode();
>> Node spaceFolder = root.getNode(spaceName);
>> Node topic = spaceFolder.getNode(topicName);
>>
>> If I shutdown the server and start it the next day:
>> 1. spaceFolder.getNode(topicName) throws PathNotFoundException.
>> spaceFolder
>> is found always, the topic folder is not found
>> 2. Also, spaceFolder.addNode(topicName) throws ItemExistsException
>>
>> If I restart the server immediately no exception is thrown. Also, if the
>> server is not restarted, no exception is thrown.
>>
>> On server startup, we create the repository and bind it:
>> InitialContext jndiContext = new InitialContext(props);
>> RepositoryConfig repoConfig = RepositoryConfig.create(repositoryConfig,
>> repoHome);
>> Repository repository = RepositoryImpl.create(repoConfig);
>> jndiContext.bind(repositoryName, repository);
>>
>> Can anyone please point out what could be going wrong?
>>
>> Thanks a lot for any help that you could offer.
>> Sushil
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Jackrabbit-1.4.1-PathNotFoundException-tp17676426p17676426.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Alexander Klimetschek
> alexander.klimetschek@day.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Jackrabbit-1.4.1-PathNotFoundException-tp17676426p17679143.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Jackrabbit 1.4.1 PathNotFoundException

Posted by Alexander Klimetschek <ak...@day.com>.
Sounds weird. Could you post your repository.xml configuration?

Regards,
Alex

On Thu, Jun 5, 2008 at 8:17 PM, Sushil Vegad <vs...@serebrum.com> wrote:
>
> Hello,
> Our web application uses custom nodes as follows: [nt:myFolder] > nt:folder
> and [nt:myFile] > nt:file
>
> We have a top level folder (called spaceFolder) which is a nt:myFolder under
> root; under spaceFolder we add other nodes as follows:
> spaceFolder.addNode("topicName",nt:myFolder);
> session.save();
> session.logout();
>
> We retrieve the topic folder as:
> Node root = session.getRootNode();
> Node spaceFolder = root.getNode(spaceName);
> Node topic = spaceFolder.getNode(topicName);
>
> If I shutdown the server and start it the next day:
> 1. spaceFolder.getNode(topicName) throws PathNotFoundException. spaceFolder
> is found always, the topicFolder is not found
> 2. Also, spaceFolder.addNode(topicName) throws ItemExistsException
>
> If I restart the server immediately no exception is thrown. Also, if the
> server is not restarted, no exception is thrown.
>
> On server startup, we create the repository and bind it:
> InitialContext jndiContext = new InitialContext(props);
> RepositoryConfig repoConfig = RepositoryConfig.create(repositoryConfig,
> repoHome);
> Repository repository = RepositoryImpl.create(repoConfig);
> jndiContext.bind(repositoryName, repository);
>
> Can anyone please point out what could be going wrong?
>
> Thanks a lot for any help that you could offer.
> Sushil
>
>
>
> --
> View this message in context: http://www.nabble.com/Jackrabbit-1.4.1-PathNotFoundException-tp17676426p17676426.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>



-- 
Alexander Klimetschek
alexander.klimetschek@day.com