dbTalk Databases Forums  

Neither preload nor openContainer commands work from command line (I)

comp.databases.berkeley-db comp.databases.berkeley-db


Discuss Neither preload nor openContainer commands work from command line (I) in the comp.databases.berkeley-db forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JC
 
Posts: n/a

Default Neither preload nor openContainer commands work from command line (I) - 11-22-2005 , 11:24 AM






Hello everybody,

1) FOREWORD:
I am newbie to Berkeley XML DB;i have just successfully install it (*)
under Windows XPPro and i was able to create a XML container from
command line as the following log shows:[*]Berkeley DB 4.4.16 and Berkeley XML DB 2.2.8 just installed

{
dbxml> createContainer myFirstBerkeleyXMLTestDB.dbxml d validate
Creating document storage container, with validation

dbxml> putDocument job1 Doc1.xml f
Document added, name = job1

dbxml> putDocument job2 Doc1.xml f
Document added, name = job2

dbxml> removeDocument job2
Document deleted, name = job2

dbxml> putDocument job2 Doc2.xml f
Document added, name = job2

dbxml> get job1
1 documents found
}
....whereas all XML documents and target *.dbxml DB are found/stored in
same folder.

2) Then i exited the dbxml command line with quit but then i was not
able to open or preload the newly created container:

{

dbxml> quit

D:\Temp>dbxml

dbxml> preload myFirstBerkeleyXMLTestDB.dbxml
stdin:1: preload failed, Error: Db:pen: No such file or directory

dbxml> openContainer myFirstBerkeleyXMLTestDB.dbxml
stdin:2: openContainer failed, Error: Db:pen: No such file or
directory

dbxml>

}

3) QUESTION: What am i doing wrong? How can i load an existing XML DB
(Container)?

Thank you in advance.

Best regards,

JC (São Paulo/Brazil).


Reply With Quote
  #2  
Old   
Ron
 
Posts: n/a

Default Re: Neither preload nor openContainer commands work from command line (I) - 11-23-2005 , 09:35 AM






Hi,

I think the problem is keeping track of the patch where you invoke
dbxml and
The syntax to specify an absolute path. The following worked for me on
windows:

dbxml> createcontainer c:/dbxmlenv/sample.dbxml d validate
Creating document storage container, with validation

dbxml> putDocument fruit Apples.xml f
Document added, name = fruit

dbxml> putDocument fruit1 Apricot.xml f
Document added, name = fruit1

dbxml> get fruit
1 documents found

dbxml> print
<?xml version="1.0"?>
<product>
<category>fruits</category>
<item>Apples</item>
<inventory>
<sku>Applfrui1q6lpq</sku>
<price>1.10</price>
<inventory>535</inventory>
</inventory>
<vendor>Off the Vine</vendor>
</product>

dbxml> quit

C:\BDBTEST\dbxml-2.2.8\bin\debug>dbxml -h c:/dbxmlenv/sample.dbxml

dbxml> get fruit
stdin:1: getDocuments failed, There is no default container

dbxml> quit

C:\BDBTEST\dbxml-2.2.8\bin\debug>dbxml -h c:/dbxmlenv

dbxml> opencontainer sample.dbxml

dbxml> getdocuments
2 documents found

dbxml>quit

Ron


Reply With Quote
  #3  
Old   
JC
 
Posts: n/a

Default Re: Neither preload nor openContainer commands work from command line (I) - 11-25-2005 , 12:59 PM



Hi Ron,

1) Thank you for writting. Somehow the fact that during the creation of
the container
you specify the absolute path enable to open it afterwards but i
suppose this is a BUG,
isn't it.
2) Basically what i can conclude (thank to your input) is the
following:
a) If you create the containder without specifying the absolute path
(e.g. "t1.dbxml d validate") then it will be impossible to open it
afterwards (quiting dbxml and invoking it again) even if you invoke
dbxml from same folder and even if you specify also the absolute path
of the container.
b) If you create the container specifying the absolute path (e.g.
"createcontainer c:/dbxmlenv/t2.dbxml d validate") you will be able
not only to
open it afterwards but also to move or copy it to other folder without
problem provided you specify the absolute path properly. Example: i
created a container t2.dbxml at c:/dbxmlenv and was able to open there
and as a copy in other folder as follows:

D:\Temp>dbxml

dbxml> opencontainer c:/dbxmlenv/t2.dbxml

dbxml> get job2
1 documents found


dbxml> quit

D:\Temp>dbxml

dbxml> opencontainer c:/dbxmlenv/TEST/t2.dbxml

dbxml> get job2
1 documents found

3) So, if you agree we should report this as a BUG; how do i do that?

Thank you again!

Best regards,

Juan Carlos.



Ron wrote:
Quote:
Hi,

I think the problem is keeping track of the patch where you invoke
dbxml and
The syntax to specify an absolute path. The following worked for me on
windows:

dbxml> createcontainer c:/dbxmlenv/sample.dbxml d validate
Creating document storage container, with validation

dbxml> putDocument fruit Apples.xml f
Document added, name = fruit

dbxml> putDocument fruit1 Apricot.xml f
Document added, name = fruit1

dbxml> get fruit
1 documents found

dbxml> print
?xml version="1.0"?
product
category>fruits</category
item>Apples</item
inventory
sku>Applfrui1q6lpq</sku
price>1.10</price
inventory>535</inventory
/inventory
vendor>Off the Vine</vendor
/product

dbxml> quit

C:\BDBTEST\dbxml-2.2.8\bin\debug>dbxml -h c:/dbxmlenv/sample.dbxml

dbxml> get fruit
stdin:1: getDocuments failed, There is no default container

dbxml> quit

C:\BDBTEST\dbxml-2.2.8\bin\debug>dbxml -h c:/dbxmlenv

dbxml> opencontainer sample.dbxml

dbxml> getdocuments
2 documents found

dbxml>quit

Ron


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.