Luis Gervaso | 1 Aug 07:35 2008
Picon

Alias Property

Hi all,

Is possible the definition of an alias property in a node.

This is only to make beautiful the path of a node

We have nodes like : /site/folders/mark/folders/documents

and we want to translate to /site/mark/documents

we can't change the structure so setting an alias property we can search
using xpath

BUT the real issue is : Can we make this alias "unique"?

BR
Luis

--

-- 
-------------------------------------------
Luis Alberto Gervaso Martin
Java EE Architect & Instructor
C/ Cuenca 4A, 2ºB
Getafe (Madrid)
SPAIN
mobile: (+34) 627983344
luis.gervaso <at> gmail.com
Sébastien Launay | 1 Aug 09:30 2008

Re: Stop Jackrabbit-Core to be verbose on console

If you choose to use the log4j implementation you just need to
configure log4j before loading Jackrabbit classes.
Multiple configuration are possible [1].

J2EE listeners can also be used to configure log4j before creating
Logger and therefore share the same configuration.

If not configured, log4j will output messages in the default ouput stream
and therefore in the console in your case.

If you already have a configuration you just need to add the category
"org.apache.jackrabbit" and use WARN or ERROR level which will be less
verbose.

[1] http://commons.apache.org/logging/guide.html#Configuring%20Log4J
[2]
http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/web/util/Log4jConfigListener.html

--
Sébastien Launay

Peter Koch a écrit :
> Hi Sébastien,
> thanks for your fast answer.
> I've checkt slf4j into my project, but where is the configurationfile to
> modify the logging of jackrabbit-Core?
> The propertie-file on my project only handle my own logging statements...
>
> Thanks,
> Peter
(Continue reading)

Saumil.Baxi | 1 Aug 10:08 2008

Please send me a small mixing Node Type Notation ..

Hi ,
        Can you send me an example of how to create a mixing node. Please 
provide the sample xml structure . The example I am not able to create 
from the        example  giving on apache site 

Thanks,
Saumil
H. Wilson | 1 Aug 17:04 2008

OCM exceptions: IncorrectPersistentClassException & RepositoryException caused by NoSuchItemStateException

I am including both these errors in one post, because I have a hunch 
they are related. If it was a mistake to do so even if they were 
related, please let me know for future reference.

I am working with OCM, I have a single class that is being stored and 
versioned in the repository (see below). My first error is when I try to 
get an instance of this class by version (it works fine if I do just a 
getObject (path) ). The error is the IncorrectPersistentClassException 
due to no descriptor for nt:unstructured, which I don't think I am 
using. If I do need this, why? And how should I define it?

I also have an error when I try to checkin the object after updating 
(checkout, getObject, modify it, update, save appear to work fine.). The 
error is the RepositoryException caused by NoSuchItemStateException. I 
have included what I think is the relevant information below. Using 
Jackrabbit 1.4 with 1.4.2 core. I would certainly appreciate any input - 
on either error.

H. Wilson

================= Class ========================

 <at> Node (jcrMixinTypes="mix:versionable")

public class SomeClass {

     <at> Field(path=true) private String path;  

     <at> Field private Date lastUpdate;         

(Continue reading)

Will Scheidegger | 2 Aug 09:38 2008
Picon

xpath queries with node names consisting of numbers?

I have a bunch of nodes with numbers as names. When I try to do an  
xpath query like

/jcr:root/public/000

I get a JCR exception: javax.jcr.query.InvalidQueryException: Parse  
error: data is not a RelationQueryNode

I also tried this:

/jrc:root/public//*[name() = '000']

But it seems like name() is not supported by JCR. Is there a way to do  
this?
Thanks!

will

Jukka Zitting | 4 Aug 10:05 2008
Picon

Re: question about exporting and importing via JCR api

Hi,

On Fri, Aug 1, 2008 at 12:43 AM, Betty Chang <bchang <at> edgenuity.com> wrote:
> Am I supposed to be able to export and import my complete repository using JCR calls?
> I used Session.exportSystemView() to save everything to a file,
> but when I use Workspace.importXML(),  I get a ConstraintViolationException about
>  "/jcr:root/jcr:system: mandatory child node (http://www.jcp.org/jcr/1.0) versionStorage does not exist"

You can't import the jcr:system subtree, so you'll need to ignore it
when exporting content from your workspace. The best practice is to
put all your content within an application root node like /my:content.

BR,

Jukka Zitting

Connor, Brett (LNG-TWY | 4 Aug 10:14 2008
Picon

RE: question about exporting and importing via JCR api

So how do you import the version history?

-----Original Message-----
From: Jukka Zitting [mailto:jukka.zitting <at> gmail.com] 
Sent: 04 August 2008 09:06
To: users <at> jackrabbit.apache.org
Subject: Re: question about exporting and importing via JCR api

Hi,

On Fri, Aug 1, 2008 at 12:43 AM, Betty Chang <bchang <at> edgenuity.com>
wrote:
> Am I supposed to be able to export and import my complete repository
using JCR calls?
> I used Session.exportSystemView() to save everything to a file, but 
> when I use Workspace.importXML(),  I get a 
> ConstraintViolationException about
>  "/jcr:root/jcr:system: mandatory child node
(http://www.jcp.org/jcr/1.0) versionStorage does not exist"

You can't import the jcr:system subtree, so you'll need to ignore it
when exporting content from your workspace. The best practice is to put
all your content within an application root node like /my:content.

BR,

Jukka Zitting

REED ELSEVIER (UK) LIMITED - Registered office - 1-3 STRAND, LONDON WC2N 5JR
Registered in England - Company No. 02746621
(Continue reading)

Sébastien Launay | 4 Aug 10:21 2008

Re: xpath queries with node names consisting of numbers?

Hi Will,

This is the same problem as described recently here:
http://markmail.org/message/xyvhkjjsm2igtrhb?q=jackrabbit

So you must use :
/jcr:root/public/_x30_00
or
/jrc:root/public/*[fn:name() = '000']  (only one '/' is needed for
direct children)

--
Sébastien Launay

Will Scheidegger a écrit :
> I have a bunch of nodes with numbers as names. When I try to do an
> xpath query like
>
> /jcr:root/public/000
>
> I get a JCR exception: javax.jcr.query.InvalidQueryException: Parse
> error: data is not a RelationQueryNode
>
> I also tried this:
>
> /jrc:root/public//*[name() = '000']
>
> But it seems like name() is not supported by JCR. Is there a way to do
> this?
> Thanks!
(Continue reading)

Will Scheidegger | 4 Aug 10:44 2008
Picon

Re: xpath queries with node names consisting of numbers?

Hi Sébastien

Thanks for the help! I did not now that one has to put a "fn:" infront  
of the name() function. I gave it a try like this:

/jrc:root//*[fn:name() = '1234']

I need the // because I don't know where in the tree the node is that  
I'm looking for. However, I'm not getting anything although the node  
exists! When I do this with an sql query, it works:

select * from nt:base where jcr:path like '/%/1234'

In xpath, only this works:

/jcr:root//*/_x0031_234[1]

Am I doing somehing wrong with he name() function or is it simply not  
supported?

Regards,
Will

On 04.08.2008, at 10:21, Sébastien Launay wrote:

> Hi Will,
>
> This is the same problem as described recently here:
> http://markmail.org/message/xyvhkjjsm2igtrhb?q=jackrabbit
>
(Continue reading)

Sébastien Launay | 4 Aug 11:34 2008

Re: xpath queries with node names consisting of numbers?

The following statements are the most efficient:
//_x0031_234
//*[fn:name() = '1234']

Note that  fn:name() is only supported since Jackrabbit 1.4 and will
just not match (no exception thrown) if it is not supported (Jackrabbit
1.3.*)...

--
Sébastien Launay

Will Scheidegger a écrit :
> Hi Sébastien
>
> Thanks for the help! I did not now that one has to put a "fn:" infront
> of the name() function. I gave it a try like this:
>
> /jrc:root//*[fn:name() = '1234']
>
> I need the // because I don't know where in the tree the node is that
> I'm looking for. However, I'm not getting anything although the node
> exists! When I do this with an sql query, it works:
>
> select * from nt:base where jcr:path like '/%/1234'
>
> In xpath, only this works:
>
> /jcr:root//*/_x0031_234[1]
>
> Am I doing somehing wrong with he name() function or is it simply not
(Continue reading)


Gmane