Re: problem retrieving nodes from different workspaces
Were you able to reproduce our problem? Jukka Zitting-3 wrote: Hi, On 8/28/06, J Kuijpers [EMAIL PROTECTED] wrote: Supplied repository.xml and runnable MultipleWorkspaceTest.java http://www.nabble.com/user-files/235783/repository.xml repository.xml http://www.nabble.com/user-files/235784/MultipleWorkspaceTest.java MultipleWorkspaceTest.java The MultipleWorkspaceTest.java file appears to be empty. Could you resend it, inline if necessary? BR, Jukka Zitting -- Yukatan - http://yukatan.fi/ - [EMAIL PROTECTED] Software craftsmanship, JCR consulting, and Java development -- View this message in context: http://www.nabble.com/problem-retrieving-nodes-from-different-workspaces-tf2177041.html#a6037018 Sent from the Jackrabbit - Dev forum at Nabble.com.
Re: problem retrieving nodes from different workspaces
Your repository.xml file is broken. You have: PersistenceManager class=org.apache.jackrabbit.core.state.db.DerbyPersistenceManager param name=url value=jdbc:derby:${rep.home}/version/db;create=true/ param name=schemaObjectPrefix value=version_/ /PersistenceManager A fixed value for the parameter 'schemaObjectPrefix' will cause Jackrabbit to write content of multiple workspaces into the same table, thus possibly overwriting content. You must use a value that includes the workspace name as a variable. E.g. the sample configuration uses this: param name=schemaObjectPrefix value=${wsp.name}_/ See also: https://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit/src/main/config/repository.xml Using the sample repository.xml the test works fine even with a shutdown in between. regards marcel J Kuijpers wrote: Were you able to reproduce our problem? Jukka Zitting-3 wrote: Hi, On 8/28/06, J Kuijpers [EMAIL PROTECTED] wrote: Supplied repository.xml and runnable MultipleWorkspaceTest.java http://www.nabble.com/user-files/235783/repository.xml repository.xml http://www.nabble.com/user-files/235784/MultipleWorkspaceTest.java MultipleWorkspaceTest.java The MultipleWorkspaceTest.java file appears to be empty. Could you resend it, inline if necessary? BR, Jukka Zitting -- Yukatan - http://yukatan.fi/ - [EMAIL PROTECTED] Software craftsmanship, JCR consulting, and Java development -- Marcel Reutegger Day Management AG Barfuesserplatz 6, 4001 Basel Switzerland [EMAIL PROTECTED] www.day.com T 41 61 226 98 98 F 41 61 226 98 97 This message is a private communication. If you are not the intended recipient, please do not read, copy, or use it, and do not disclose it to others. Please notify the sender of the delivery error by replying to this message, and then delete it from your system. Thank you. The sender does not assume any liability for timely, trouble-free, complete, virus free, secure, error free or uninterrupted arrival of this e-mail. For verification please request a hard copy version.
problem retrieving nodes from different workspaces
Hello I am having a problem retrieving nodes from different workspaces. I have supplied a runnable example class. In this class I am creating two workspaces and add some nodes to them. When I retrieve the nodes without first shutting down the repository I am getting a result as expected: workspace1Node1 workspace1Node2 workspace1Node3 But when I am shutting down the repository before retrieving the nodes (passing true in the call to runTest(boolean)), I am getting unexpected results: workspace1Node3 This only happens with the DerbyPersistenceManager. Changing to FileSystemPersistenceManager gives no problems. Supplied repository.xml and runnable MultipleWorkspaceTest.java http://www.nabble.com/user-files/235783/repository.xml repository.xml http://www.nabble.com/user-files/235784/MultipleWorkspaceTest.java MultipleWorkspaceTest.java -- View this message in context: http://www.nabble.com/problem-retrieving-nodes-from-different-workspaces-tf2177041.html#a6019261 Sent from the Jackrabbit - Dev forum at Nabble.com.
Re: problem retrieving nodes from different workspaces
(); env.put(Context.INITIAL_CONTEXT_FACTORY, org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory); env.put(Context.PROVIDER_URL, localhost); InitialContext ctx = new InitialContext(env); RegistryHelper.registerRepository(ctx, repo, configFile, repHomeDir, true); repos = (Repository) ctx.lookup(repo); } return repos; } private static void listNodes() { Session session = null; try{ Repository reposNew = getRepository(); session = reposNew.login(new SimpleCredentials(user, password.toCharArray()), testWorkspace1); Query repositoryQuery = session.getWorkspace().getQueryManager().createQuery(testNodes/*, Query.XPATH); QueryResult result = repositoryQuery.execute(); NodeIterator it = result.getNodes(); while (it.hasNext()) { Node node = it.nextNode(); System.out.println(node.getName()); } } catch (Exception e) { e.printStackTrace(); } finally { if (session != null) { session.logout(); } } } } Jukka Zitting-3 wrote: Hi, On 8/28/06, J Kuijpers [EMAIL PROTECTED] wrote: Supplied repository.xml and runnable MultipleWorkspaceTest.java http://www.nabble.com/user-files/235783/repository.xml repository.xml http://www.nabble.com/user-files/235784/MultipleWorkspaceTest.java MultipleWorkspaceTest.java The MultipleWorkspaceTest.java file appears to be empty. Could you resend it, inline if necessary? BR, Jukka Zitting -- Yukatan - http://yukatan.fi/ - [EMAIL PROTECTED] Software craftsmanship, JCR consulting, and Java development -- View this message in context: http://www.nabble.com/problem-retrieving-nodes-from-different-workspaces-tf2177041.html#a6019752 Sent from the Jackrabbit - Dev forum at Nabble.com.