dbac | 10 Feb 09:19
Favicon
Gravatar

custem keyword encounter a problem!please help

i want to cumtom keywords for a coument with query, because nt:file is not
keywords properties,so i custom a nodetype  inherit nt:file with a propertie
keywords.

if i use my api add the document with new nodetype, it's ok. it has the
keywords propertie.
but if use webdav client (ie exploer  httpfolder) ,drag a file in it,  its
type is nt:file,not my own new nodetype,
how change it default behavior??? where change it?

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/custem-keyword-encounter-a-problem-please-help-tp4375589p4375589.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Lukas Kahwe Smith | 10 Feb 09:24

LockManagerImpl.java:813 Bad lock token: Bad check digit. Token [..]

Hi,

Our logs are filling up with "LockManagerImpl.java:813 Bad lock token: Bad check digit. Token [..]". Is
this cause for concern? How can this be avoided?
We are using MySQL for persistence with mostly full versioning on nodes via PHPCR (aka Davex)

regards,
Lukas Kahwe Smith
mls <at> pooteeweet.org

Colin Greene | 7 Feb 19:07
Favicon

Access Control for stand alone server

Hi,

I am working on a desktop application that is storing versioned, custom node types in a jackrabbit
repository. This has been developed and seems to be working as expected using just the
jackrabbit-standalone server (as we do not have any other web server/application for our environment at
the moment).

I have been able to switch over the SimpleAccessManger to the DefaultAccessManager and now have a
rep:policy created on the root node by default, however, when I go to use setPolicy(), via RMI,  I get an
UnsupportedRepositoryOperationException (This method is not implemented yet).
Just wondering if there are plans to implement setPolicy (and related methods) for the ClientAccessControlManager.
Alternatively, any recommendation on how to proceed? If I am not able to use the stand alone server, then do I
have to integrate jackrabbit with Tomcat or the like to use a setPolicy that can work with an access control manager?
Also, can someone point me to documentation/examples on setting up and using access manager?
Thanks,
Colin Greene

baxxt3r | 7 Feb 09:17
Picon
Gravatar

How to register a custom node type as versionable ?

Hi, 

I am new to JCR and I have this problem registering a custom node type as
versionable (i hope I got this right)
To explain a little better, I am using Magnolia CMS and my goal is to
version my custom nodes in order to give the possibility to the editor of
the page to have a list of versions and to be able to see the changes.

My nodetypes.xml looks something like this:
<nodeTypes
    xmlns:rep="internal"
    xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
    xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
    xmlns:mgnl="http://www.magnolia.info/jcr/mgnl"
    xmlns:jcr="http://www.jcp.org/jcr/1.0">

    <nodeType name="mgnl:product" isMixin="false"
hasOrderableChildNodes="true" primaryItemName="">
        <supertypes>
            <supertype>mgnl:content</supertype>
            <supertype>mix:referenceable</supertype>
        </supertypes>
    </nodeType>
    <nodeType name="mgnl:productCar" isMixin="false"
hasOrderableChildNodes="true" primaryItemName="">
        <supertypes>
            <supertype>mgnl:product</supertype>
        </supertypes>
    </nodeType>
.........................................................................................
(Continue reading)

mslama | 6 Feb 16:07
Picon
Gravatar

Any way how to remove node lock?

Hi,

I experimented with node locking. I am under JBoss with XATransaction and if I understand this correctly it
means it has now container managed transactions which means transaction starts when I create new session
and end on session logout.

To make lock visible to another session I used:
newSession
lock Node
session logout

newSession
modifyNode
unlock Node
session logout

I just found that I have to transfer lock token so fixed version is:
newSession
lock Node
get lock token
session logout

newSession
add lock token
modifyNode
unlock Node
session logout

Is it correct? But from my first incorrect test I have now some locked nodes. Is there any wahy how to remove locks
from nodes?
(Continue reading)

ABAM | 3 Feb 19:05
Picon
Gravatar

se-jcr issue with jackrabbit

Hi Salvatore

I am triyin to use se-jcr with out succes let me explain to you.

What I have?
I have a Spring MVC 3.1, Jackrabbit 2 (jcr 283)
Now I am using JCR but I am using it in the controller like follow:

repository =
RepositoryAccessServlet.getRepository(request.getSession().getServletContext();
jcrSession = repository.login(new
SimpleCredentials("admin","admin".toCharArray()));

What I like to do?

In order to follow a good MVC architecture I like to make all the jackrabbit
interaction in the DAO layer and not in the controller layer, there is where
I need se-jcr.

Like is not a good idea to sent the session from the controller to the
services and from the services to the DAO I like to get the session in the
DAO like follow:

web.XML first context-param

<context-param>
	<param-name>contextConfigLocation</param-name>
	<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>

(Continue reading)

mslama | 3 Feb 13:13
Picon
Gravatar

XPath query performance question

Hi,

I have following use case:

I have about 2000 company nodes under node companies:
/companies/company[1]
/companies/company[2]
....
/companies/company[N]

I query for one company by property value - exact match, no wildcards. And result should contain just one
node. For example I use query:

//companies/company[@calais='http://d.opencalais.com/er/company/ralg-tr1r/2c970a55-e08d-3af8-ad1d-3c46f341e749']

and then one call of NodeIterator.next to get unique (or first as there is no constraint on uniqueness)
result. So there is no big resultset.

Property 'calais' is string type and when set it is unique ie. small number of company nodes may have this
property either empty or missing. Property value can be up to 100chars long if it can make any difference
for index.

When only one thread is running it takes 100-200ms. When 4 threads are running it is about 500ms on average. I used
profiler with sampling to get some profiling data. I seems to be too much provided that number on nodes is not
that high
and it is using Lucene index. Calls of query.execute and nodeIterator.next take both about the same time.
When I checked thread dumps it uses Lucene index so it does not look like it scans all nodes.

Question: Is there any way how speedup this kind of lookup? The only way I found so far is to incorporate the
most often property used for lookup to node path as session.getNode(path) is much faster.
(Continue reading)

goutham_pn | 3 Feb 08:18
Picon
Gravatar

Jackrabbit Cluster - Document Not Found

Hello All,

We are developing a multi tenant application where we have got 4 tenants
each using separate workspace. (Thought its not a best practice).

As in Wiki(http://wiki.apache.org/jackrabbit/Clustering) I have configured
the application in clustered environment.

We have got 4 portals(each portal acting a cluster-node) where 2 portals can
add/delete(portal1 and portal2) but the other 2 can just read the
documents(portal3 and portal4).

For 3 tenants its working fine but for 4th tenant If I add a document in
portal1 its not seen in portal2 and if add a document in portal2 its not
seen by any other portals. Only documents added by portal1 is seen in
portal3 and portal4(which has read permissions).

The porblem is for only 1 tenant other tenants are working fine.

Could anyone help us on this.

-----
Thanks & Regards,
Goutham PN
--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Jackrabbit-Cluster-Document-Not-Found-tp4353874p4353874.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Robert A. Decker | 31 Jan 17:13
Gravatar

maven, poms, etc

Hi,

I normally work with CQ but I would like to try some development under 
jackrabbit.

Do I work with it in the same way that I do development with CQ? IOW, I 
have an instance running, and I do my development of my bundles in 
eclipse/intellij and I have some settings in my POMS that uses the 
maven-sling-plugin to install the bundles... And I use the 
maven-scr-plugin for annotations...

How different is development in jackrabbit from development in cq? I 
know that I'll lose the crx apis and the com.day.cq apis... Do I lose 
adaptTo?

I hate to ask it, but does anyone have a very basic pom for jackrabbit 
development that I can look at? (not for building jackrabbit but instead 
for just some bundle development)

Rob

Alessandro Bologna | 28 Jan 20:35
Picon

excluding nodes based on node name or namespace

Hi,

because of the (ever growing) growing size of some of our workspaces,
we had the need to tweak the indexing configuration to exclude
indexing on any properties based on a condition that specifies solely
the node name, the local name or the node namespace, and the default
implementation would not allow that easily. And we found that adding
explicit support for the ancestor-or-self and self axis was useful, so
I tried to make some changes to
org.apache.jackrabbit.core.query.lucene.IndexingConfigurationImpl

With this quick (and maybe not very elegant) patch (coded and tested,
but not very thoroughly, against jackrabbit-core 2.2.10), we can
support indexing with rules like the following:

<configuration xmlns=""
        xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
        xmlns:jcr="http://www.jcp.org/jcr/1.0"
        xmlns:html="http://www.w3.org/1999/xhtml">

<!-- exclude all the properties of nt:unstructured nodes called 'body'
in the default namespace and their children -->
        <index-rule nodeType="nt:unstructured"
                condition="ancestor-or-self::body">
        </index-rule>

<!-- exclude all the properties of nt:unstructured nodes called
'headline' in any namespace and their children -->
        <index-rule nodeType="nt:unstructured"
                condition="ancestor-or-self::*:headline">
(Continue reading)

Stephen Kruger | 28 Jan 20:05
Picon
Favicon
Gravatar

Unable to find a way to efficiently sort by child size ?

Hi,

I'm struggling to write a query to return me the node which has the largest amount of children.

For example given : 

root
-A
--a1
--a2
--a3
-B
--b1
--b2
-C
--c1

it should return A (potentially followed by B and then C, but I'm only really interested in A).

My current code simply iterates through the Level 1 nodes A,B,C etc and for each one run a "//* order by xxx"
and gets the getRows().getSize().

However the performance of this is obviously quite bad, but I'm unable to find anything like "//* order by jcr:childcount"

Does anyone have any insights into an efficient way to do this? I'm happy to use JQOM if that might be easier.

regards

Gmane