Ahmet Uzun | 1 Nov 2011 17:49
Picon
Favicon

Issues Deleting Node


We have a Jackrabbit domain running under WebLogic. The repository serves as a document management system
for a Financial ERP. It functions fine in general however there seems to have been a node/attachment
created which cannot be removed. We tried, after switching back to simpleLogin, open source utilities,
commercial utilities (such as Toromiro) and a custom developed application (utilizing
removeCollection) however none of these were able to successfully remove the attachment. There seem to
be no explicit errors logged by the application.

Has anyone run into a similar issue? Thanks ahead for your time and responses.

Ahmet
 		 	   		  
jsmarks | 1 Nov 2011 19:01

JCR_SQL2 joins

Since XPATH is deprecated, I'm trying to learn SQL2 using the data from the
auto populate function off the home page.

Since there are three different primary node types (nt:file, nt:folder,
nt:resource) in the resulting repository, I can't use a single primary node
type in the SQL2. Unfortunately, when I try:

select * from [nt:folder] as fo left outer join [nt:file] as fi on
isdescendantnode(fi, fo)

the error is "This query result contains more than one selector". Trying fo
or fi in place of * tells me I need to supply a selector name.

I conclude from this that one can't query for more than one primary node
type. Am I missing something?

It does not help that I've been unable to find many examples.

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/JCR-SQL2-joins-tp3964627p3964627.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Jukka Zitting | 1 Nov 2011 19:23
Picon
Gravatar

Re: JCR_SQL2 joins

Hi,

On Tue, Nov 1, 2011 at 7:01 PM, jsmarks <jmarks <at> salo.com> wrote:
> select * from [nt:folder] as fo left outer join [nt:file] as fi on
> isdescendantnode(fi, fo)
>
> the error is "This query result contains more than one selector". Trying fo
> or fi in place of * tells me I need to supply a selector name.

Use "fo.*", "fi.*" or "fo.*, fi.*" instead of "*".

I guess we should make the query parser automatically expand "*" to
all the properties of all the selectors, but until that's done you
need to explicitly list the selectors from which you want results.

BR,

Jukka Zitting

Gustavo Henrique Orair | 1 Nov 2011 22:06
Picon

Inactive logical session handle called - JCA Managed Repository

I am trying to use Jcr Manager (http://kenai.com/projects/jcrmanager) to
access my multiple workspaces JCA Managed Repository.

My environment is a Glassfish 3.1.1 with and EJB that collect document and
save them in a JCA Managed JackRabbit Repository (version 2.3.0).

I would like to use Jcr Manager (WAR) just to access the content and
monitor if my crawling are being done ok.

I was be able to configure Jca Manager to access the JCA Managed
Repository, but when I try to access a second workspace, It gives a Illegal
State Exception:
Unexpected error occured. Please contact your administrator with this issue.

java.lang.IllegalStateException: Inactive logical session handle called
  org.apache.jackrabbit.jca.JCAManagedConnection.getSession*(
JCAManagedConnection.java:238 )*
  org.apache.jackrabbit.jca.JCASessionHandle.getSession*(
JCASessionHandle.java:90 )*
  org.apache.jackrabbit.jca.JCASessionHandle.getWorkspace*(
JCASessionHandle.java:125 )*
  com.sptci.jcr.webui.MainController.getWorkspace*( MainController.java:120
)*
  com.sptci.jcr.webui.listener.menu.MenuListener.processWorkspace*(
MenuListener.java:183 )*
  com.sptci.jcr.webui.listener.menu.MenuListener.handleAction*(
MenuListener.java:83 )*
  com.sptci.jcr.webui.listener.menu.MenuListener.actionPerformed*(
MenuListener.java:59 )*
**
(Continue reading)

Francisco Carriedo Scher | 2 Nov 2011 10:30
Picon

Behaviour when removing nodes...

Hi there,

i do not have a clear idea about what happens in two defined situations
when operating against a repository.

The first situation is what truly happens when deleting a node with a
binary property. My repository stores mainly nodes with the following
structure:

nt:file
   |
   -- jcr:content (nt:resource type)
           |
           -- "some custom properties with String values"
           -- jcr:data (a potentially large Binary object)

Normaly i invoked the remove() method over the nt:file node described above
(let's say the root of the "file structure"). But when i check the
datastore placed in my hard disk it still contains the file that
corresponds to the Binary property just deleted. At this point two
questions arise: should i remove the entire structure of the nt:file node
(invoking dispose() method i guess) to actually erase the contents on disk?
and, what happens when other nodes contain the same Binary object that
corresponds to the same file deleted on disk, will such links be broken?,
does dispose() "perform smartly" like removing links on Linux (the file is
actually removed only when the last link is removed)?

The other question regards to hashing method used when storing files on the
harddisk. I found that regardless of the name and times uploaded, when a
file is stored it is named with the hash of the content. So if i upload the
(Continue reading)

Jukka Zitting | 2 Nov 2011 12:44
Picon
Gravatar

Re: Behaviour when removing nodes...

Hi Francisco,

On Wed, Nov 2, 2011 at 10:30 AM, Francisco Carriedo Scher
<fcarriedos <at> gmail.com> wrote:
> Can somebody clarify this two questions or point me to related
> documentation?

See http://wiki.apache.org/jackrabbit/DataStore

BR,

Jukka Zitting

Francisco Carriedo Scher | 2 Nov 2011 13:01
Picon

Re: Behaviour when removing nodes...

Thank you very much Jukka, i looked over it and seems to be exactly what i
need!

2011/11/2 Jukka Zitting <jukka.zitting <at> gmail.com>

> Hi Francisco,
>
>
> On Wed, Nov 2, 2011 at 10:30 AM, Francisco Carriedo Scher
> <fcarriedos <at> gmail.com> wrote:
> > Can somebody clarify this two questions or point me to related
> > documentation?
>
> See http://wiki.apache.org/jackrabbit/DataStore
>
> BR,
>
> Jukka Zitting
>
Francisco Carriedo Scher | 2 Nov 2011 22:49
Picon

Exception when operating through load balancer

Hi there,

i have a clustered JR environment and i operate it from the Java side
through Webdav. I have deployed three servers that operate in cluster and
everything went fine until i tried to add a load balancing / fault
tolerance feature to the design. I am using Nginx as load balancer with the
webdav module and, despite obtaining correctly the Repository object, some
operations fail with the following exception:

*javax.jcr.RepositoryException: Request Entity Too Large
    at org.apache.jackrabbit.spi2dav.**ExceptionConverter.generate(**
ExceptionConverter.java:113)
    at org.apache.jackrabbit.spi2dav.**ExceptionConverter.generate(**
ExceptionConverter.java:49)
    at org.apache.jackrabbit.**spi2davex.**RepositoryServiceImpl$**
BatchImpl.start(**RepositoryServiceImpl.java:**457)
    at org.apache.jackrabbit.**spi2davex.**RepositoryServiceImpl$**
BatchImpl.access$200(**RepositoryServiceImpl.java:**399)
    at org.apache.jackrabbit.**spi2davex.**RepositoryServiceImpl.submit(**
RepositoryServiceImpl.java:**304)
    at org.apache.jackrabbit.jcr2spi.**WorkspaceManager$**
OperationVisitorImpl.execute(**WorkspaceManager.java:830)
    at org.apache.jackrabbit.jcr2spi.**WorkspaceManager$**
OperationVisitorImpl.access$**500(WorkspaceManager.java:797)
    at org.apache.jackrabbit.jcr2spi.**WorkspaceManager.execute(**
WorkspaceManager.java:594)
    at org.apache.jackrabbit.jcr2spi.**state.SessionItemStateManager.**
save(SessionItemStateManager.**java:139)
    at org.apache.jackrabbit.jcr2spi.**ItemImpl.save(ItemImpl.java:**246)
    at org.apache.jackrabbit.jcr2spi.**SessionImpl.save(SessionImpl.**
(Continue reading)

Francisco Carriedo Scher | 3 Nov 2011 12:10
Picon

Re: Exception when operating through load balancer

Additionaly to the exceptions that arised when i introduced load balancing
with Nginx (the quoted text below describes the issue) strange behaviour is
taking place now: not finding _existing_ nodes, errors while creating new
nodes and new exceptions appeared even connecting directly with the
repository through its IP address:

2011-11-03 11:57:40.506 WARN  [http-192.168.0.188-8080-1]
JcrRemotingServlet.java:337 */pequeno/jcr:content: mandatory property {
http://www.jcp.org/jcr/1.0}data does not exist*
2011-11-03 12:02:05.009 ERROR [http-192.168.0.188-8080-2]
ExportContextImpl.java:193 ClientAbortException:  *java.net.SocketException:
Broken pipe*

My guessing is that the repository became unconsistent. Any better
interpretation?

Thanks in advance for your attention!

2011/11/2 Francisco Carriedo Scher <fcarriedos <at> gmail.com>

> Hi there,
>
> i have a clustered JR environment and i operate it from the Java side
> through Webdav. I have deployed three servers that operate in cluster and
> everything went fine until i tried to add a load balancing / fault
> tolerance feature to the design. I am using Nginx as load balancer with the
> webdav module and, despite obtaining correctly the Repository object, some
> operations fail with the following exception:
>
> *javax.jcr.RepositoryException: Request Entity Too Large
(Continue reading)

Jukka Zitting | 3 Nov 2011 14:16
Picon
Gravatar

Re: Exception when operating through load balancer

Hi Francisco,

There's a small delay on when content changes in one cluster node
become properly visible on another node, which is why I'd recommended
using a Jackrabbit cluster  only in a setup that supports session
affinity. Otherwise you can easily end up seeing partially
inconsistent results for a short while after updates. And definitely
it'll confuse the server if you're trying to save content and the
save() call ends up sending multiple requests all to separate cluster
nodes.

Anyway, such a failed save() should not be able to cause repository
inconsistencies. Do you still see the problems when accessing the
repository locally?

To check for consistency issues you can add the consistencyCheck
parameter [1] to the PersistenceManager entry in the workspace.xml
configuration file.

    <param name="consistencyCheck" value="true"/>

At next restart the repository will run a full consistency check of
that workspace and log warnings about all problems it may find.

[1] http://jackrabbit.apache.org/api/2.2/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.html#setConsistencyCheck(java.lang.String)

BR,

Jukka Zitting

(Continue reading)


Gmane