Robert Haycock | 24 Apr 16:05 2014

Overriding SearchIndex.updateNodes - removing

Hi,

Jackrabbit 2.6.4

I've overridden SearchManager.updateNodes(Iterator<NodeId> remove, Iterator<NodeState> add) to
create my own index. This index should reflect the current state so when a node is deleted it should be removed.

I can see when I delete a node that the NodeId does'nt exist in remove but there is an unstructured NodeState
in add.

Could someone please tell me how I can remove documents from my own index.

Thanks,
Rob.
Peter Harrison | 23 Apr 05:56 2014
Picon

Is ORM a Dead Project?

A number of months ago I attempted to contribute some code that provided 
a way to map a List to the properties of a single Node to the ORM 
project. This only works for arrays of primitives of course, but was 
quite useful to me, and others I noted were asking for similar 
functionality.

I have tried to follow the process of issue tracker submission and 
attaching my code but I note that the OCM project has had no commits 
whatsoever since... well as long as I have been watching since at least 
September last year.

I'm using Jackrabbit in anger (aka - not just playing, we are doing 
serious projects) but I am concerned that the code base of OCM has been 
abandoned. This doesn't bode well for the rest of the codebase. I'm 
happy to contribute and help, but there has been no replies to my 
queries about progress on commiting my contributions.

Perhaps my code is junk or I'm taking the wrong approach, or there is a 
better way, but I'm not really getting the impression I'm welcome. I 
realise people are busy, but this is wasting the opportunity to involve 
experienced developers who are keen to help. I'm not beating up on 
anyone - I just would like to get more involved in this great project.

Thanks,
Peter

Stuart Wilson | 22 Apr 07:39 2014

The Jackrabbit JCA

I have tried to set up Jackrabbit Resource Adapter and seem to have reached
a dead-end. I have a post here
<http://stackoverflow.com/questions/23186713/jackrabbit-jca-credentials-conf
usion>  describing (some of) my attempts. I wonder if the resource adapter
works at all, or ever did. It seems as if the documentation has been broken,
albeit in a strange way, with respect  to this, on purpose. Why I do not
know, but I do believe that ir would be difficult to garf up their
documentation, in this specific area, by accident. There is evidence of a
move to use JAAS for the resource adapter, though as nearly everyone who
comments on Jackrabbit says, documentation is hard to come by.

I had hoped to use the JCR for a tag based document store, running in the
same JVM as my application server. At this point however, I am about to
abandon it. I don't know if it is just the JCA, or the entire project, that
ultimately amounts to so little. The project seems to be working on new
things. If I could, I would ask them, "Why?". No one, at least certainly not
I, will be interested in using their stuff when the condition of the
projects in their wake is so deplorable. I am to that point that I don't
really care what reasons there are, and am about to move on to a different
design. 

I wish that I had an email address for someone who was somebody at Apache. I
would ask them why they have such broken cr*p for a project. And why they
continue to publish it with every revision of the documentation since
version 2.0 full of broken links and missing inserts.

Day's concept is/was brilliant. I wish that I could say the same for
Jackrabbit.

(Continue reading)

Karan Malhi | 20 Apr 19:30 2014
Picon

Migrating from derby to h2 using jackrabbit standalone jar causing exception in h2

I am trying to migrate an existing repository from
org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager to
org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager and it
worked like a charm.

Now I am trying to migrate the same repository to
org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager and am
getting a unique/primary key violation in h2 (see below). Appreciate any
help getting around this issue.

$ java -Xmx1024m -jar jackrabbit-standalone-2.8-SNAPSHOT.jar --backup
--repo target-data --conf new-repository.xml --backup-repo ./target-data-h2
--backup-conf new-repository-h2.xml
Welcome to Apache Jackrabbit!
-------------------------------
Using repository directory target-data
Writing log messages to target-data/log
Creating a repository copy in ./target-data-h2
Exception in thread "main" javax.jcr.RepositoryException: failed to
instantiate shared item state manager
    at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.doInitialize(RepositoryImpl.java:2084)
    at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:2035)
    at
org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:543)
    at
org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:326)
    at
org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:615)
(Continue reading)

Picon

Unable to access repository using WebDAV from java.

Hi,

I've deployed jackrabbit-webapp-2.6.5.war in tomcat and I'm able to access
http://localhost:8082/jackrabbit-webapp-2.6.5/server from browser.

But when I try to access repository from java test code
public class Test {

        <at> SuppressWarnings("nls")
       public static void main(String[] args) {

             Repository repository;
             Session session = null;
             try {
                    repository = JcrUtils
                                 .getRepository("http://localhost:8082/jackrabbit-webapp-2.6.5/server");

                    session = repository.login(new SimpleCredentials("admin", "admin"
                                 .toCharArray()));

                    Node node = session.getRootNode();

                    System.out.println("name" + node.getName() + " path "
                                 + node.getPath());

             } catch (Exception e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
             } finally {
                    if (session != null) {
(Continue reading)

Torgeir Veimo | 14 Apr 12:34 2014
Picon

remote user management over webdav

Are there any best practices regarding creating users on a remote
jackrabbit repository?

--

-- 
-Tor

isidoro | 11 Apr 18:03 2014
Picon

Indexing a property in a sub node

I'm trying to index a property in a subnode:
myjcr:myType/jcr:content/myjrc:size.
How can I index the property myjrc:size of the node jcr:content in a node of
type myjcr:myType? 
I've tried doing this in my indexing_configuration.xml:

 <aggregate primaryType="myjcr:myType">
        <include>jcr:content</include>
        <include-property>jcr:content/myjrc:size.</include-property>
    </aggregate>

And then I've created a xpath to search files by size:

jcr:content/ <at> myjrc:size > xs:long('0')

but it does not work. 

What's wrong? Can anyone help me?

Thanks in advance.

Isidoro

--
View this message in context: http://jackrabbit.510166.n4.nabble.com/Indexing-a-property-in-a-sub-node-tp4660697.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Dube, Shreyas | 10 Apr 16:02 2014

Persisting SearchIndex to database

Hello,

Background: I’m evaluating JCR/Jackrabbit as a layer of abstraction for persistence over Oracle. We
are using Tomcat6 as the application server. We usually have 4 – 8 Tomcat’s clustered up in the
production environment. I have configured all <FileSystem> and <PersistenceManager> stanzas to point
to Oracle (well, I’m using MySQL now, but that’ll change). I have NOT set up clustering in Jackrabbit
yet and that is something I want to look at once I figure <SearchIndex> out. This is my <SearchIndex>
configuration for a <Workspace>

        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
            <param name="extractorPoolSize" value="2"/>
            <param name="supportHighlighting" value="true"/>
        </SearchIndex>

This <SearchIndex> configuration ends up creating a bunch of files under ${wsp.home}/index under the
repository home and the workspace home directory.
Questions:

 1.  What are these files storing? I’m assuming it is the search index.
 2.  Given that we have a clustered Tomcat setup, would it be possible to persist the search index to the database?
 3.  If 2 is not possible, are there other search providers that would work in a clustered environment?
 4.  Would turning on Jackrabbit clustering sync search indexes across all nodes? When are search indexes
updated in a clustered environment?

Thanks,
Shreyas
Jakob Reichl | 9 Apr 13:36 2014
Picon

Assign a name to a branch of the version tree

What is the best way to assign names to branches of the version tree of a node ?
A node may have a main branch, one or several development branches and
 an integration branch.
One solution is to use labels, another one is to use a property. Are
there better alternatives ?

An application may be e.g. "give me the latest version on a certain branch".

Lukas Kahwe Smith | 8 Apr 09:25 2014

json API exception

Aloha,

While using the json API we are seeing frequently such errors. These are read requests, which is why I am a bit
confused about the “WRITER” in the stack trace but I guess the issue is that
"/server/joiz_ch/jcr:root/.0.json” is an invalid URL?

2014-04-03 12:28:06.964 ERROR [2115513477 <at> qtp-221739023-131] Slf4jLog.java:87 /server/joiz_ch/jcr:root/.0.json
java.lang.IllegalStateException: WRITER
	at org.mortbay.jetty.Response.getOutputStream(Response.java:594) ~[jackrabbit.jar:na]
	at
org.apache.jackrabbit.webdav.WebdavResponseImpl.sendXmlResponse(WebdavResponseImpl.java:151) ~[jackrabbit.jar:na]
	at org.apache.jackrabbit.webdav.WebdavResponseImpl.sendError(WebdavResponseImpl.java:95) ~[jackrabbit.jar:na]
	at
org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.service(AbstractWebdavServlet.java:299) ~[jackrabbit.jar:na]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) ~[jackrabbit.jar:na]
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) ~[jackrabbit.jar:na]
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390) ~[jackrabbit.jar:na]
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) [jackrabbit.jar:na]
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) [jackrabbit.jar:na]
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) [jackrabbit.jar:na]
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) [jackrabbit.jar:na]
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) [jackrabbit.jar:na]
	at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) [jackrabbit.jar:na]
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) [jackrabbit.jar:na]
	at org.mortbay.jetty.Server.handle(Server.java:326) [jackrabbit.jar:na]
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542) [jackrabbit.jar:na]
	at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938) [jackrabbit.jar:na]
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755) [jackrabbit.jar:na]
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) [jackrabbit.jar:na]
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) [jackrabbit.jar:na]
(Continue reading)

crm6360 | 27 Mar 21:00 2014
Picon

ImportXML fatal bug with jackrabbit webapp 2.6+

Has anyone else been able to confirm this because I'm seeing other developers
reporting similar issues and don't know if the apache team is in fact aware.  
To reproduce simply deploy a jackrabbit-webapp-2.6.2 or greater (haven't
tested on earlier versions).

Attempt to import previously serialized XML using the sesson.importXML or
workspace.importXML( ... ).

When your session or workspace points to the jackrabbit-standalone
configuration the import is successful and the node is generated on the
server.   When your session points to the webapp config, the process fails
because:

DavLocatorFactoryImpl.getRepositoryPath() is returning the incorrect
workspace path.  In this example, the workspace is "default".   The trace:

SEVERE: Servlet.service() for servlet [JCRWebdavServer] in context with path
[/jackrabbit-webapp-2.7.5] threw exception
java.lang.IllegalArgumentException: Unexpected format of resource path:
/jackrabbit-webapp-2.7.5/server/default/jcr:root/8b65d019-719f-47ec-ae2b-675c7a33048c/RTRD
(workspace: /jackrabbit-webapp-2.7.5)
	at
org.apache.jackrabbit.webdav.jcr.DavLocatorFactoryImpl.getRepositoryPath(DavLocatorFactoryImpl.java:65)
	at
org.apache.jackrabbit.webdav.AbstractLocatorFactory$DavResourceLocatorImpl.getRepositoryPath(AbstractLocatorFactory.java:356)
	at
org.apache.jackrabbit.webdav.jcr.version.report.JcrPrivilegeReport.addResponses(JcrPrivilegeReport.java:117)
	at
org.apache.jackrabbit.webdav.jcr.version.report.JcrPrivilegeReport.init(JcrPrivilegeReport.java:102)
	at
(Continue reading)


Gmane