Return-Path: X-Original-To: apmail-db-derby-user-archive@www.apache.org Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5885D10BFF for ; Fri, 21 Jun 2013 12:49:48 +0000 (UTC) Received: (qmail 28414 invoked by uid 500); 21 Jun 2013 12:49:48 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 28395 invoked by uid 500); 21 Jun 2013 12:49:48 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 28297 invoked by uid 99); 21 Jun 2013 12:49:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jun 2013 12:49:47 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of geetha.bharathi.attili@oracle.com designates 141.146.126.69 as permitted sender) Received: from [141.146.126.69] (HELO aserp1040.oracle.com) (141.146.126.69) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jun 2013 12:49:40 +0000 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r5LCnIv8026306 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Jun 2013 12:49:19 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r5LCnIbn024128 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 21 Jun 2013 12:49:18 GMT Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r5LCnH95018344 for ; Fri, 21 Jun 2013 12:49:17 GMT Received: from [10.175.25.130] (/10.175.25.130) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 21 Jun 2013 05:49:17 -0700 Message-ID: <51C44BCB.1020702@oracle.com> Date: Fri, 21 Jun 2013 13:49:15 +0100 From: Geetha Attili Organization: Oracle Corporation User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: derby-user@db.apache.org Subject: Re: Cannot access DB on Classpath References: <51C38B61.4000103@oracle.com> <51C44A93.2060604@oracle.com> In-Reply-To: <51C44A93.2060604@oracle.com> Content-Type: multipart/alternative; boundary="------------060607060200030806090904" X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------060607060200030806090904 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Thanks very much Rick , that explains the failing case. I am using the 10.8 jdbc driver so wondered if its supposed to work . -Geetha On 21/06/2013 13:44, Rick Hillegas wrote: > On 6/20/13 4:08 PM, Geetha Attili wrote: >> Hi , >> I am trying to connect to a JavaDB Database on Classpath , I tried >> various things as given in the doc, but I feel the behaviour is very >> inconsistent or may be I am doing some silly mistake. >> >> In a Command prompt >> > cd D:\DerbyDemo >> >ij >> ij version 10.8 >> //created a sample database jdb_classpath >> ij>connect 'jdbc:derby:jdb_classpath;create=true;'; >> //created a sample Table >> ij>create table mytable(id numeric); >> //Disconnected from the jdb_classpath database >> ij>disconnect; >> >> >> I have then Set the Classpath to include D:\DerbyDemo ; >> Opened a new command prompt >> >ij >> tried connecting to the jdb_classpath using the following syntax >> ij>connect 'jdbc:derby:/jdb_classpath'; >> >> ERROR XJ004: Database '/jdb_classpath' not found. >> >> As per the Doc >> >> as in example, this should have worked >> " >> >> * /jdbc:derby:/myDB/ >> >> Access /myDB/ (which is directly in a directory in the >> classpath) as a read-only database. >> >> " >> >> >> ij>connect 'jdbc:derby:classpath:jdb_classpath'; >> Connection successful. there is no other database with the same name >> in the classpath . >> Do I have to use the classpath subprotocol always? >> >> Many Thanks in Advance, >> Geetha > Hi Geetha, > > You are reading the 10.8 docs. The documentation in this area was > cleaned up in later releases. The failing example was removed from > that topic in the Developer's Guide. Please consult the corresponding > topic in the 10.10 version of the Developer's Guide: > http://db.apache.org/derby/docs/10.10/devguide/index.html > > Hope this helps, > -Rick --------------060607060200030806090904 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks very much Rick , that explains the failing case.
I am using the 10.8 jdbc driver so wondered if its supposed to work .

-Geetha
On 21/06/2013 13:44, Rick Hillegas wrote:
On 6/20/13 4:08 PM, Geetha Attili wrote:
Hi ,
I am trying to connect to a JavaDB Database  on Classpath , I tried various things as given in the doc, but I feel the behaviour is very inconsistent or may be I am doing some silly mistake.

In a Command prompt
> cd D:\DerbyDemo
>ij
ij version 10.8
//created a sample database jdb_classpath
ij>connect 'jdbc:derby:jdb_classpath;create=true;';
//created a sample Table
ij>create table mytable(id numeric);
//Disconnected from the jdb_classpath database
ij>disconnect;


I have then Set the Classpath to include D:\DerbyDemo ;
Opened a new command prompt
>ij
 tried connecting to the jdb_classpath using the following syntax
ij>connect 'jdbc:derby:/jdb_classpath';

ERROR XJ004: Database '/jdb_classpath' not found.

As per the Doc <http://docs.oracle.com/javadb/10.8.1.2/devguide/rdevdvlp22102.html>  as in example, this should have worked
"

    * /jdbc:derby:/myDB/

      Access /myDB/ (which is directly in a directory in the
      classpath) as a read-only database.

      "


ij>connect 'jdbc:derby:classpath:jdb_classpath';
Connection successful. there is no other database with the same name in the classpath .
Do I have to use the classpath  subprotocol always?

Many Thanks in Advance,
Geetha
Hi Geetha,

You are reading the 10.8 docs. The documentation in this area was cleaned up in later releases. The failing example was removed from that topic in the Developer's Guide. Please consult the corresponding topic in the 10.10 version of the Developer's Guide: http://db.apache.org/derby/docs/10.10/devguide/index.html

Hope this helps,
-Rick

--------------060607060200030806090904--