Alexander Klimetschek | 1 Mar 2009 11:01
Favicon

Re: How to make use of the JcrConstants?

On Sat, Feb 28, 2009 at 1:17 PM, Akil Ali <Akil.Ajani <at> cognizant.com> wrote:
>
> Iam getting the exception while trying to set the values of the
> JcrConstants.JCR_CONTENT
>
> javax.jcr.nodetype.ConstraintViolationException: no matching property
> definition found for {http://www.jcp.org/jcr/1.0}content

This means that the node on which you want to set the jcr:content
property does not allow a property with this name. To fix that, change
the nodetype so that it either includes a jcr:content property
definition or a residual property definition (*).

This is not related to the use of the JcrConstants class.

> Please help me to know the supporting documents that gives me this
> information.

Look at the JCR specification [1] [2].

[1] http://jcp.org/en/jsr/detail?id=170
[2] http://www.day.com/specs/jcr/1.0/

Regards,
Alex

--

-- 
Alexander Klimetschek
alexander.klimetschek <at> day.com

(Continue reading)

Julio Castillo | 1 Mar 2009 21:24
Favicon

RE: 2 different Exception w/ new jackrabbit 1.5.3

Sorry, I did find my problem (I was bundling obsolete jar files with new
ones).

** julio

-----Original Message-----
From: Julio Castillo [mailto:jcastillo <at> edgenuity.com] 
Sent: Friday, February 27, 2009 4:24 PM
To: 'users <at> jackrabbit.apache.org'
Subject: 2 different Exception w/ new jackrabbit 1.5.3

I upgraded to the latest version replacing an existing 1.5.2 installation
(replacing the two 1.5.3 jar files within the jar file).

Problem 1
After restarting (using the exact same repository) I got the following
exception:

27.02.2009 14:40:33 *INFO * RepositoryImpl: initializing workspace
'default'... (RepositoryImpl.java, line 1723)
27.02.2009 14:40:33 *INFO * LocalFileSystem: LocalFileSystem initialized at
path /opt2/jackrabbit/workspaces/default (LocalFileSystem.java, line 166)
27.02.2009 14:40:33 *INFO * LocalFileSystem: LocalFileSystem initialized at
path /opt2/jackrabbit/workspaces/default/blobs (LocalFileSystem.java, line
166)
27.02.2009 14:40:33 *INFO * RepositoryImpl: workspace 'default' initialized
(RepositoryImpl.java, line 1726)
27.02.2009 14:40:34 *INFO * LocalFileSystem: LocalFileSystem initialized at
path /opt2/jackrabbit/repository/index (LocalFileSystem.java, line 166)
27.02.2009 14:40:34 *ERROR* RepositoryImpl: Failed to initialize workspace
(Continue reading)

NAO | 2 Mar 2009 04:57
Picon
Picon
Favicon

Checking for null reference properties


I have been trying to run a query to collect all the nodes where a reference
property has been set.

The SQL query string 

Query q = queryManager.createQuery("select * from ala:TypeA where
ala:typeBRef is not null",Query.SQL);

works where ala:typeBRef is defined as a string value, but if it has been
defined as a reference, the search returns no nodes regardless of what
getProperty returns.

Could someone please explain to me why this should be the case, and how I
can do a global search for the nodes where a reference link exists?

--

-- 
View this message in context: http://www.nabble.com/Checking-for-null-reference-properties-tp22281732p22281732.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Thomas Müller | 2 Mar 2009 10:07
Favicon

Re: Glassfish and Jackrabbit on Windows throws FileNotFoundException for LICENSE

Hi,

I don't know what the reason could be, but I found a link to a similar problem:

http://www.mulesource.org/jira/browse/MULE-4021
http://forums-beta.sun.com/thread.jspa?threadID=520794&messageID=2489891

Maybe it's a Glassfish v2 problem. I think it's a conflict in a file
name / directory name that only shows up in a case insensitive file
system. I believe you already read this:
http://article.gmane.org/gmane.comp.apache.jackrabbit.user/5673
"Extract the nekohtml-0.9.4.jar from the .rar archive.  Rename the
LICENSE file within the jar (e.g. rename to CyberNeko_LICENSE), and
replace the nekohtml jar in the rar with the updated version."

Regards,
Thomas

On Sat, Feb 28, 2009 at 7:42 PM, Jaco Prinsloo <jacolists <at> gmail.com> wrote:
> Hi Thomas,
>
> I will do, not that it contains a lot of useful information:
>
> [#|2009-02-28T20:40:33.359+0200|SEVERE|sun-appserver2.1|javax.enterprise.system.tools.deployment|_ThreadID=18;_ThreadName=Thread-306;_RequestID=323c8369-a0c8-4ae9-9a28-ff7a17fd8945;|Exception
> occured in J2EEC Phase
> com.sun.enterprise.deployment.backend.IASDeploymentException:
> java.io.IOException: filename:
> C:\Sun\Glassfish\domains\domain1\applications\j2ee-modules\jackrabbit\license\LICENSE
> java.io.FileNotFoundException:
> C:\Sun\Glassfish\domains\domain1\applications\j2ee-modules\jackrabbit\license\LICENSE
(Continue reading)

Marcel Reutegger | 2 Mar 2009 10:23
Picon

Re: Checking for null reference properties

Hi,

I quickly tried this out and it worked as expected:

    public void testRefProp() throws RepositoryException {
        Node n = testRootNode.addNode(nodeName1);
        n.addMixin(mixReferenceable);
        Node n2 = testRootNode.addNode(nodeName2);
        n2.setProperty(propertyName1, n);
        testRootNode.save();
        executeXPathQuery(testPath + "/*[ <at> " + propertyName1 + "]", new
Node[]{n2});
        executeSQLQuery("select * from nt:base where " + propertyName1
                + " is not null and jcr:path like '" + testRoot +
"/%'", new Node[]{n2});
    }

On Mon, Mar 2, 2009 at 04:57, NAO <Nerolie.Oakes <at> csiro.au> wrote:
>
> I have been trying to run a query to collect all the nodes where a reference
> property has been set.
>
> The SQL query string
>
> Query q = queryManager.createQuery("select * from ala:TypeA where
> ala:typeBRef is not null",Query.SQL);
>
>
> works where ala:typeBRef is defined as a string value, but if it has been
> defined as a reference, the search returns no nodes regardless of what
(Continue reading)

neman ould sidahmed | 2 Mar 2009 11:08
Picon
Favicon

custom indexing for jackrabbit

Hello everybody,

I have a problem with configuration indexing for Jackrabbit, I declared my custom nodes types,

I have a node type name mynamespace:item, I would like indexing some
properties like title, autho rfor this node type  this is my
configuration : 

- repsotiroy configuration for search indexing :

<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">

    <param name="path" value="${rep.home}/repository/index"/>

    <param name="indexingConfiguration" value="${rep.home}/jackrabbit-indexing.xml"/>

    <param name="textFilterClasses"
value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>

    <param name="extractorPoolSize " value="2"/>

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

    <param name="forceConsistencyCheck" value="false"/>

    <param name="enableConsistencyCheck" value="false"/>

</SearchIndex>

- my file indexing configuration : 
(Continue reading)

Marcel Reutegger | 2 Mar 2009 12:01
Picon

Re: custom indexing for jackrabbit

Hi,

On Mon, Mar 2, 2009 at 11:08, neman ould sidahmed <nouldsid <at> yahoo.fr> wrote:
> <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
>     <param name="path" value="${rep.home}/repository/index"/>
>     <param name="indexingConfiguration" value="${rep.home}/jackrabbit-indexing.xml"/>
>     <param name="textFilterClasses"
value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
>     <param name="extractorPoolSize " value="2"/>
>     <param name="supportHighlighting" value="true"/>
>     <param name="forceConsistencyCheck" value="false"/>
>     <param name="enableConsistencyCheck" value="false"/>
> </SearchIndex>

this looks like the SearchIndex element for the version store in the
repository.xml. Did you change the workspace.xml files accordingly as
well? If you did, please post the SearchIndex element from the
workspace.xml.

furthermore, what's the exact error you see?

regards
 marcel

neman ould sidahmed | 2 Mar 2009 12:52
Picon
Favicon

Re: custom indexing for jackrabbit

Hi, 
tank for your response, 

but, the SearchIndex element from the
workspace.xml is exactly the SearchIndex element from the repository.xml.

The problem is if I update my item, I lose the item, why?

if I re-index the data without indexconfiguration, I got my item, 
I update the item, I got it whitout problem.

I think the problem is the file jackrabbit-indexing.xml, but it's like 
the conf in the wiki!!!

I hope it's clear.

The searchIndex element in workspace.xml :
        <!-- Search index and the file system it uses.

            class: FQN of class implementing the QueryHandler interface -->

        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">

            <param name="path" value="${wsp.home}/index"/>

            <param name="indexingConfiguration" value="${rep.home}/jackrabbit-indexing.xml"/>

            <param name="textFilterClasses"
value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>

(Continue reading)

Marcel Reutegger | 2 Mar 2009 13:43
Picon

Re: custom indexing for jackrabbit

Hi,

On Mon, Mar 2, 2009 at 12:52, neman ould sidahmed <nouldsid <at> yahoo.fr> wrote:
> The problem is if I update my item, I lose the item, why?

what exactly does that mean? do you mean a query for that item does
not return it anymore? are there any exceptions that are thrown? If
you do a query, how does the query look like?

regards
 marcel

neman ould sidahmed | 2 Mar 2009 13:56
Picon
Favicon

Re: custom indexing for jackrabbit

I get my item with the quer 

"select *  from mynamespace:item where mynamespace:title = 'nould' "
the title is unique. 

ok, I get my item, I update for example the title for this item and I save the session, the new
 value of title is 'nould1'.

I do the same query, with new tilte,  the new query is :
"select *  from mynamespace:item where mynamespace:title = 'nould1' "
the query for that item does not return anymore?

If I check with XPath qury, I got the item. I think the problem is the re-index of this item.

can anyone tell me why?

--- En date de : Lun 2.3.09, Marcel Reutegger <marcel.reutegger <at> gmx.net> a écrit :
De: Marcel Reutegger <marcel.reutegger <at> gmx.net>
Objet: Re: custom indexing for jackrabbit
À: users <at> jackrabbit.apache.org, nouldsid <at> yahoo.fr
Date: Lundi 2 Mars 2009, 13h43

Hi,

On Mon, Mar 2, 2009 at 12:52, neman ould sidahmed <nouldsid <at> yahoo.fr>
wrote:
> The problem is if I update my item, I lose the item, why?

what exactly does that mean? do you mean a query for that item does
not return it anymore? are there any exceptions that are thrown? If
(Continue reading)


Gmane