xpath query problem

2010-07-16 Thread Ahmed Elshereay
Hi All, Can anyone please tell me what is wrong in this statment? String statement = //element(*, nt:unstructured)[jcr:like(@jcr:name, 'event%')] order by @jcr:name descending; Query q = session.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);

Re: xpath query problem

2010-07-16 Thread Ahmed Elshereay
Hi Alex, Thank you too much for your help, now it works :-) But please I have another question, I also want to search for event nodes that have the jcr:created property or some Date, and I know I can use xs:dateTime() to say for example: [fn:name() = 'event' and @jcr:created =

Re: xpath query problem

2010-07-16 Thread Ahmed Elshereay
Hi, I found how to get an XML date format in java, here's the way: GregorianCalendar cal = new GregorianCalendar(2010, Calendar.JULY, 15, 15, 29, 17); XMLGregorianCalendar xmlCal = DatatypeFactory.newInstance ().newXMLGregorianCalendar(cal); Then... xs:dateTime(' + xmlCal.toXMLFormat() + ')

Re: xpath query problem

2010-07-16 Thread Ahmed Elshereay
Hi Ard, Your suggestion is even easier, Thank you very much :-) Ahmed

Re: xpath query problem

2010-07-16 Thread Ahmed Elshereay
Yes, I used the first suggestion. Thank you very much :-)

URGENT PLEASE - Problem connecting to remote repository

2010-07-14 Thread Ahmed Elshereay
All, I have jackrabbit on my pc, and I can connect to it just fine, but I also have jackrabbit running on another linux machine (QA server), and I need to connect to jackrabbit QA remotly. I followed the steps mentioned at: http://wiki.apache.org/jackrabbit/RemoteAccess But I am gettng the

Full Text Search jackrabbit 2.1.0

2010-07-12 Thread Ahmed Elshereay
Hi everyone, I use jackrabbit 2.1.0, and I'd like to do full text search in nodes that hold documents (word, pdf.. and so on) I wrote the following code, and the porblem is that it never returns result! Although the documents are there and the query string which I enter does exist in those

Re: Full Text Search jackrabbit 2.1.0

2010-07-12 Thread Ahmed Elshereay
@jackrabbit.apache.org cc Subject Re: Full Text Search jackrabbit 2.1.0 On Mon, Jul 12, 2010 at 16:47, Ahmed Elshereay aelsher...@idc.com wrote: Hi everyone, I use jackrabbit 2.1.0, and I'd like to do full text search in nodes that hold documents (word, pdf.. and so on) I wrote the following code

IOException when setting a Binary property

2010-06-29 Thread Ahmed Elshereay
Hi All, I am facing a strange problem when saving a file to jackrabbit! I am passing a FileInputStream object to createBinary method of ValueFactory as following: session.getValueFactory().createBinary(inputStream); I get the following exception: java.io.IOException: Read error at

Re: IOException when setting a Binary property

2010-06-29 Thread Ahmed Elshereay
Hey everybody, I found out the problem, I was using the stream before to createBinary from it. Anyway everything is working fine now. Thanks

Re: onEvent() invocation

2010-04-21 Thread Ahmed Elshereay
On Mon, Apr 19, 2010 at 12:04, Ahmed Elshereay aelsher...@idc.com wrote: Then I installed jackrabbit-jca on jboss, and I don't know how to configure spring to obtain the session(hope if you can help me in this it will be perfect because I'd like to use spring to look after all that stuff

Re: onEvent() invocation

2010-04-19 Thread Ahmed Elshereay
Hi Alex, Thanks a lot for your reply. Well, at the begining I configured the listeners with the sessionFactory bean in the spring's applicationContext.xml. Then I installed jackrabbit-jca on jboss, and I don't know how to configure spring to obtain the session(hope if you can help me in this

onEvent() invocation

2010-04-16 Thread Ahmed Elshereay
Hi All, I have a problem with observation! I created a listener implementing EventListener and implemented the onEvent() method, just as a start I only print out a message in the method informing that the onEvent() method has been invoked when NODE_ADDED. The problem is that when I add the