Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 76870 invoked from network); 7 Aug 2009 08:03:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Aug 2009 08:03:05 -0000 Received: (qmail 50478 invoked by uid 500); 7 Aug 2009 08:03:11 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 50420 invoked by uid 500); 7 Aug 2009 08:03:11 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 50409 invoked by uid 99); 7 Aug 2009 08:03:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 08:03:11 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of stefan.guggisberg@gmail.com designates 209.85.220.216 as permitted sender) Received: from [209.85.220.216] (HELO mail-fx0-f216.google.com) (209.85.220.216) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 08:03:02 +0000 Received: by fxm12 with SMTP id 12so1226558fxm.44 for ; Fri, 07 Aug 2009 01:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=7uBmS/JI19WzD/ye+5uMHr8Y+wmRZfhUEnZN46s4GBU=; b=HKVdOi9IeM30wGfdKbgQaKoTN2W1K5+D2f0pBCjjqBriQLhizLsL0Tz5fqFvjNTKsf K/jrrAhJ6N5U7ZCJhD+K8qWGtv6IWCg0cYasbk0idK9XsTQTjk/n75g+0OfSg1OiZfLs b6xpGd9AZBH70LUEgpTtWsvEbO/Mhgbp0uGwU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=AdoTiAkKUinbP0kq029DVkPrVhihivJbunggNAa+NJKD/KodzGMhNzy6pnRdCc31qd FTI168o0b5opvum4LGtbZXH+5SxKyLLlRk+kH0QjUrsxer37/O1rb8d7i5RHNegqI2Ao wt8vAEhGC3BRnUTn1WU6A9roPcoJLDFxbkLKs= MIME-Version: 1.0 Received: by 10.223.107.135 with SMTP id b7mr192693fap.62.1249632161949; Fri, 07 Aug 2009 01:02:41 -0700 (PDT) In-Reply-To: <20090806200213.289160@gmx.net> References: <20090806200213.289160@gmx.net> Date: Fri, 7 Aug 2009 10:02:41 +0200 Message-ID: <90a8d1c00908070102m611cba56v783a8493c2b7650e@mail.gmail.com> Subject: Re: unable to start repository because of missing DEFAULT_NAMES table in derby backend From: Stefan Guggisberg To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org hi andreas On Thu, Aug 6, 2009 at 10:02 PM, Andreas Mucha wrote: > Hello , > > i try to start a jackrabbit repository. I use the 1.5.7 standalone jar. > My code looks like this : > > Repository repository =3D new TransientRepository(); > Session session =3D repository.login(); > try > { > =A0String user =3D session.getUserID(); > =A0String name =3D repository.getDescriptor(Repository.REP_NAME_DESC); > =A0System.out.println("Logged in as " + user + " to a " + name + =A0"repo= sitory."); > } > finally > { > =A0session.logout(); > } > > So if i run this, the initial default repository setup and file > structure is created. I have a repository directory, repository.xml > and the sub directories. > The code above fails with the following exception : > > javax.jcr.RepositoryException: failed to instantiate shared item state ma= nager: failed to write bundle: cafebabe-cafe-babe-cafe-babecafebabe: failed= to write bundle: cafebabe-cafe-babe-cafe-babecafebabe > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo= .doInitialize(RepositoryImpl.java:1881) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo= .initialize(RepositoryImpl.java:1834) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.RepositoryImpl.initStartupWo= rkspaces(RepositoryImpl.java:483) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.RepositoryImpl.(Reposi= toryImpl.java:324) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.RepositoryImpl.create(Reposi= toryImpl.java:621) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.TransientRepository$2.getRep= ository(TransientRepository.java:235) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.TransientRepository.startRep= ository(TransientRepository.java:255) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.TransientRepository.login(Tr= ansientRepository.java:323) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.TransientRepository.login(Tr= ansientRepository.java:378) > =A0 =A0 =A0 =A0... > =A0 =A0 =A0 =A0at java.lang.Thread.run(Thread.java:619) > Caused by: org.apache.jackrabbit.core.state.ItemStateException: failed to= write bundle: cafebabe-cafe-babe-cafe-babecafebabe > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.persistence.bundle.BundleDbP= ersistenceManager.store(BundleDbPersistenceManager.java:544) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.state.SharedItemStateManager= .createRootNodeState(SharedItemStateManager.java:1311) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.state.SharedItemStateManager= .(SharedItemStateManager.java:204) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.RepositoryImpl.createItemSta= teManager(RepositoryImpl.java:1317) > =A0 =A0 =A0 =A0at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo= .doInitialize(RepositoryImpl.java:1863) > =A0 =A0 =A0 =A0... 14 more > > I did not found any hint in the documentation. So i stepped through the c= ode. And i found that the following call fails : > In class org.apache.jackrabbit.core.persistence.bundle.util.DbNameIndex > in method getIndex(String) : > > =A0 =A0protected int getIndex(String string) { > =A0 =A0 =A0 =A0try { > =A0 =A0 =A0 =A0 =A0 =A0Statement stmt =3D connectionManager.executeStmt( > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0indexSelectSQL, new Object[] { str= ing }); > =A0 =A0 =A0 =A0 =A0 =A0ResultSet rs =3D stmt.getResultSet(); > =A0 =A0 =A0 =A0 =A0 =A0try { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (rs.next()) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return rs.getInt(1); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} else { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return -1; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 =A0 =A0} finally { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rs.close(); > =A0 =A0 =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0} catch (Exception e) { > =A0 =A0 =A0 =A0 =A0 =A0IllegalStateException ise =3D new IllegalStateExce= ption( > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"Unable to read index for string: = " + string); > =A0 =A0 =A0 =A0 =A0 =A0ise.initCause(e); > =A0 =A0 =A0 =A0 =A0 =A0throw ise; > =A0 =A0 =A0 =A0} > =A0 =A0} > > The indexSelectSQL string is 'select ID from DEFAULT_NAMES where NAME =3D= ?'. > The call fails with java.sql.SQLException: Table/View 'DEFAULT_NAMES' doe= s not exist. (btw. why is this not logged ???) good point. feel free to create a jira issue. and, of course, patches are welcome! :) > So the big question is : How do i have to initialize the default > derby instance correctly ??? Is there an init() to call or something like= that ? there's no need to setup/initialize the backend. that should be all taken care of automatically. please create a jira issue and provide as much information as possible (logs, environment, steps to reproduce, etc). thanks stefan > > Many many thanks for help in advance . > > Andreas . > > -- > GRATIS f=FCr alle GMX-Mitglieder: Die maxdome Movie-FLAT! > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 >