Hi Srinu,
can you please create a jira issue and specify the tomcat version you
are using and also how you deployed jackrabbit? as a resource or
embedded with your web application?
thanks
regards
marcel
srinivas reddy wrote:
Hi,
I am having the same problem. I m using the latest jcr jar. In tomcat it is
showing in META-INF/services/
# Copyright 2004-2005 The Apache Software Foundation or its licensors,
# as applicable.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This file lists all available query language implementations that are shipped
# with Jackrabbit.
#
org.apache.jackrabbit.core.query.xpath.QueryBuilder
org.apache.jackrabbit.core.query.sql.QueryBuilder
------------------
But when i execute the same query in standalone it is working fine. Can u help
me in this ...
This is the java file i m using to fetch the content
public static void fetchAllContent()
{
try{
Repository repository =
new TransientRepository(CONFIG_FILE, DIRECTORY);
// Login to the default workspace as a dummy user
Session session = repository.login(new SimpleCredentials
("anonymousId", "anonymous".toCharArray()));
// Use the root node as a starting point
Node root = session.getRootNode();
Workspace ws = session.getWorkspace();
QueryManager qm = ws.getQueryManager();
//Specify a query using the XPATH query language
Query q =qm.createQuery("//content", Query.XPATH);
QueryResult res = q.execute();
//Obtain a node iterator
NodeIterator it = res.getNodes();
while (it.hasNext()) {
Node n = it.nextNode();
//Property prop = n.getProperty("blogtitle");
PropertyIterator iter=n.getProperties();
while(iter.hasNext()){
Property prop=iter.nextProperty();
System.out.println(prop.getString());
}
}
session.logout();
} catch (Exception e) {
e.printStackTrace();
}
Thanks in advance.
srinu.