Francesco Puglierin | 6 Jan 2008 22:01
Picon

SE3007 error

Greetings.  Seems like I need your help again!
I've got Sedna installed on my laptop (a quite powerful machine, with
2 GB of ram) and I'm trying to use the Sedna Java API to query a DB
from my program code (OS: XP sp2).
The DB consists in a single, huge XML file (let's say ~500MB, it's a
Wikipedia dump), and it's used locally.
A simple query like "for $i in
document(\"itwikiAB.xml\")/mediawiki/page return $i/title/text()"
works perfectly, but when I try to use some simple functions like
fn:concat() after a while I get the error below:

ru.ispras.sedna.driver.DriverException: SEDNA Message: ERROR SE3007
Failed to recieve a message.java.net.SocketException: Connection reset

This, for example, was just obtained with the query "for $i in
document(\"itwikiAB.xml\")/mediawiki/page return
fn:concat($i/title/text(),$i/revision/text/text())"...
but the error will appear even with something as simple as "for $i in
document(\"itwikiAB.xml\")/mediawiki/page return
fn:concat($i/revision/text/node(),\"READYSTRING\")"

Any suggestions??  fn:concat(\"READYSTRING1\",\"READYSTRING2\") seems
to run without problems.
I don't think I have problems in my WinSock, the system maximum
contemporary connections # is already maxed out... I really don't know
what to do.

Thank you very much in advance, and a late happy new year.

Francesco Puglierin
(Continue reading)

Ivan Shcheklein | 7 Jan 2008 00:56
Picon

Re: SE3007 error

Hi Francesco,

I need a bit more information to try to reproduce this bug:

1. What exact version of Sedna do you use?
2. Can you provide us with a part of your XML contained a few "page" elements?
3. Please send me result for the following query:

fn:max(
    for $i in document(\"itwikiAB.xml\")/mediawiki/page
    return fn:string-length($i/revision/text/text()))

Ivan Shcheklein,
Sedna Team

Ivan Shcheklein | 7 Jan 2008 13:34
Picon

Re: Storing |Large Binary Files

Hi Amir,

If you want to store binary document (image, video and so on), I think, the only way is to create byte[] array as you described.

Anyway, if you use XML:DB API it is better also to ask Charles Foster ( http://www.cfoster.net/contact) this question.

Ivan Shcheklein,
Sedna Team

2007/12/31, Amir.Rafique-6H/+AS+3KLhWk0Htik3J/w@public.gmane.org <Amir.Rafique-6H/+AS+3KLhWk0Htik3J/w@public.gmane.org>:
Hi all

Is there any other way to store Binary in Sedna except the one given below
(converting it to binary[]).

BinaryResource resource =
                        (BinaryResource) collection.createResource (
                                    document.getId(), BinaryResource.
RESOURCE_TYPE);

in = document.getStream();
byte[] b = new byte[in.available()];
in.read(b);
resource.setContent(b);



Regards
~Amir Rafique
Sr. Software Engineer
NetSol Technologies Ltd
Lahore Pakistan.
Tel: +92 42 111 44 88 00 Ext. 229


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Nicolas Jeanmonod | 8 Jan 2008 11:54
Picon
Picon

Get Engine Name


Hello All,

I am using Sedna to query my data and XMLSpy to debug my queries. The
problem I am facing is that some functions cannot be the same in both
environments. So I wrote a little function called GetEngineName that
gets the engine name currently executing the query. Unfortunately this
function is not robust at all and I would like to know if you have a
better implementation to propose.

See the code below.

Regards,

Nicolas

xquery version "1.0";

(: *************************************************************** :)
(: local:GetEngineName -                                           :)
(: *************************************************************** :)
declare function local:GetEngineName() as xs:string?
{
	(: This is a trick to execute the XQuery in XMLSpy and Sedna  
	   without changing anything to the code. If the query can 
	   see an existing file in the file system we are in XMLSpy 
	   if not we are in Sedna. :)
	   
    let $EngineName :=
		if( doc-available( './card_test_summary.xml' ) )then
			( "XML_SPY" )
		else
			( "SEDNA" )
	return
		$EngineName
};

(: *************************************************************** :)
(: Main                                                            :)
(: *************************************************************** :)
<root>
{	
    let $EngineName := local:GetEngineName()

    let $MyCollection :=
    if( $EngineName = "XML_SPY" )then
        collection( "./crate_collection.xml" )
    else if( $EngineName = "SEDNA" )then
        collection( "pdr_collection" )
    else
        collection( )
		    
	return( <a>{ $EngineName }</a>, <a>{ $MyCollection }</a> ) 
}
</root>

Charles Foster | 8 Jan 2008 22:24
Gravatar

Sedna XML:DB 1.2 RC1 Released

Sedna XML:DB API version 1.2, Release Candidate 1 has been released.

Included in this version are four new XML:DB Collection Services

ModuleManagementService
-----------------------

Allows the Sedna XML:DB user to store, remove and list current XQuery
modules within the Database. This Service allows the API user to store
their own XQuery variables and functions in the Database, which can be
used by all subsequent queries.

IndexManagementService
----------------------

Allows the API user to create, remove and list current value indexes
within the Sedna XML Database.

UserManagementService
---------------------

Allows the API user to add, remove and alter Database users and their
individual Privileges.

RoleManagementService
---------------------

Allows the API user to add, delete, list and and modify roles within the
database. Roles can be granted to multiple users, so changing privileges
for multiple users at once can become easier instead of changing
privileges for each user individually

Privileges Management
---------------------

The API user is now able to manage Privileges for both Users and Roles,
this includes things like whether granting particular users to query a
collection, document. Whether they can create new documents, new users, do
updates, or even inserts, etc.

Additional Improvements
-----------------------

Socket communication performance has been improved and there are even more
memory usage reductions, the library is now ideal as part of either a
thin-client solution or as part a web application.

And finally, the Sedna LOAD statement now accepts common URL formats,
including http://, ftp://, file://, jar://, etc, as well as reading from
the local disk. This method of storing XML Documents and XQuery Modules
actually streams the resource from its location to the database instead of
downloading the whole thing to memory first, this allows the API user to
easily store enourmous XML files of an unrestricted size into the
database, without ever having to download the whole XML document locally
first.

Summary Of Whats New in 1.2 RC1
-------------------------------

New: Support for Index configutation, with IndexManagementService
New: XQuery Module Support, added Service ModuleManagementService
New: Support for Role configuration, with RoleManagementService
New: Support for User configuration, with UserManagementService
New: Support for Privileges configuration on users and roles
Improved: Statement LOAD can now retrieve http://, ftp:// and more
Improved: Socket communication speed improved
Improved: Many memory usage reductions
Fixed: Unused default Services did not appear in getServices()
Fixed: SAX Method broke content with XML syntax in character data
Updated: XML:DB API Reference, now includes all proprietary classes

Check out the Sedna XML:DB API today:

http://www.cfoster.net/sedna

The Sedna XML:DB is available to run on a Java 1.4.x Virtual Machine.
However another version is available which will work on Java 1.1 and J2ME
environments, this alternative version has already been tested on Symbian
OS with UIQ and Series 60 interfaces, the Microsoft JVM, Mac OS's JVM and
the GNU GCJ. If you are interested in using this version in your project,
please get in touch with me.

Happy New Year,

Charles Foster

Maria Grineva | 9 Jan 2008 10:25

Re: Get Engine Name

Hi Nicolas,

in Sedna we don't have any special XQuery function implementation for this purpose. But possibly that can be useful.

But I think your implementation is quite acceptable for now, what do you mean it is not robust?

Best regards,

Maria
Sedna team

2008/1/8, Nicolas Jeanmonod <Nicolas.Jeanmonod-vJEk5272eHo@public.gmane.org>:

Hello All,

I am using Sedna to query my data and XMLSpy to debug my queries. The
problem I am facing is that some functions cannot be the same in both
environments. So I wrote a little function called GetEngineName that
gets the engine name currently executing the query. Unfortunately this
function is not robust at all and I would like to know if you have a
better implementation to propose.

See the code below.

Regards,

Nicolas


xquery version "1.0";

(: *************************************************************** :)
(: local:GetEngineName -                                           :)
(: *************************************************************** :)
declare function local:GetEngineName() as xs:string?
{
        (: This is a trick to execute the XQuery in XMLSpy and Sedna
           without changing anything to the code. If the query can
           see an existing file in the file system we are in XMLSpy
           if not we are in Sedna. :)

    let $EngineName :=
                if( doc-available( './card_test_summary.xml' ) )then
                        ( "XML_SPY" )
                else
                        ( "SEDNA" )
        return
                $EngineName
};

(: *************************************************************** :)
(: Main                                                            :)
(: *************************************************************** :)
<root>
{
    let $EngineName := local:GetEngineName()

    let $MyCollection :=
    if( $EngineName = "XML_SPY" )then
        collection( "./crate_collection.xml" )
    else if( $EngineName = "SEDNA" )then
        collection( "pdr_collection" )
    else
        collection( )

        return( <a>{ $EngineName }</a>, <a>{ $MyCollection }</a> )
}
</root>



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Maria Grineva | 9 Jan 2008 10:27

Re: Sedna XML:DB 1.2 RC1 Released

Thank you for the great work, Charles!

Sedna team

2008/1/9, Charles Foster <charles-huu879ivjHnR7s880joybQ@public.gmane.org>:
Sedna XML:DB API version 1.2, Release Candidate 1 has been released.

Included in this version are four new XML:DB Collection Services

ModuleManagementService
-----------------------

Allows the Sedna XML:DB user to store, remove and list current XQuery
modules within the Database. This Service allows the API user to store
their own XQuery variables and functions in the Database, which can be
used by all subsequent queries.

IndexManagementService
----------------------

Allows the API user to create, remove and list current value indexes
within the Sedna XML Database.

UserManagementService
---------------------

Allows the API user to add, remove and alter Database users and their
individual Privileges.

RoleManagementService
---------------------

Allows the API user to add, delete, list and and modify roles within the
database. Roles can be granted to multiple users, so changing privileges
for multiple users at once can become easier instead of changing
privileges for each user individually

Privileges Management
---------------------

The API user is now able to manage Privileges for both Users and Roles,
this includes things like whether granting particular users to query a
collection, document. Whether they can create new documents, new users, do
updates, or even inserts, etc.

Additional Improvements
-----------------------

Socket communication performance has been improved and there are even more
memory usage reductions, the library is now ideal as part of either a
thin-client solution or as part a web application.

And finally, the Sedna LOAD statement now accepts common URL formats,
including http://, ftp://, file://, jar://, etc, as well as reading from
the local disk. This method of storing XML Documents and XQuery Modules
actually streams the resource from its location to the database instead of
downloading the whole thing to memory first, this allows the API user to
easily store enourmous XML files of an unrestricted size into the
database, without ever having to download the whole XML document locally
first.

Summary Of Whats New in 1.2 RC1
-------------------------------

New: Support for Index configutation, with IndexManagementService
New: XQuery Module Support, added Service ModuleManagementService
New: Support for Role configuration, with RoleManagementService
New: Support for User configuration, with UserManagementService
New: Support for Privileges configuration on users and roles
Improved: Statement LOAD can now retrieve http://, ftp:// and more
Improved: Socket communication speed improved
Improved: Many memory usage reductions
Fixed: Unused default Services did not appear in getServices()
Fixed: SAX Method broke content with XML syntax in character data
Updated: XML:DB API Reference, now includes all proprietary classes

Check out the Sedna XML:DB API today:

http://www.cfoster.net/sedna

The Sedna XML:DB is available to run on a Java 1.4.x Virtual Machine.
However another version is available which will work on Java 1.1 and J2ME
environments, this alternative version has already been tested on Symbian
OS with UIQ and Series 60 interfaces, the Microsoft JVM, Mac OS's JVM and
the GNU GCJ. If you are interested in using this version in your project,
please get in touch with me.

Happy New Year,

Charles Foster


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Maxim Grinev | 10 Jan 2008 11:59

Re: Features status

Hi Steve,

welcome back to Sedna.

As concerns the features, now BLOBs are supported in XML:DB API by Charles Foster
http://www.cfoster.net/sedna

We have not got down to other features yet. Live backups is one of the next features in our to-do list. We are not planning to support automatic index usage in nearest future.

Best regards,
Maxim Grinev
Sedna team

---------- Forwarded message ----------
From: Steve Howe <howesteve-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: 17.12.2007 9:20
Subject: [Sedna-discussion] Features status
To: sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org

Hello all,

I've been a bit away from Sedna due to overloaded work schedule, now I intend
to update the Python adapter to work with the latest Sedna version.

Also I would like to know the status of the following features (if they
intended, planned, developing, implemented, etc.):

- Live backups
- Automatic index usage
- Binary resources (BLOBs) storage
- More modest resources usage by the daemons

By the way, it's nice to see how far it has come. Congrats to the whole team!

--
Best Regards,
Steve Howe

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Sedna-discussion mailing list
Sedna-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/sedna-discussion

Ivan Shcheklein | 12 Jan 2008 06:50
Picon

Re: Get Engine Name

Hi Nicolas,

In Sedna there are a number of metadata documents (e.g. $version, see also documentation for the details).
Thus function fn:doc-available("$version") in Sedna returns "true".
Also you can use this system document to get Sedna version/build.
Hope it helps.

P.S. Please use the latest build available from our site.

Ivan Shcheklein,
Sedna Team

Ivan Shcheklein | 12 Jan 2008 06:50
Picon

Re: SE3007 error

Hi Francesco,

Thank you for your bug report. We have fixed this bug.
The latest build is available for download from our site.

Ivan Shcheklein,
Sedna Team


2008/1/7, Francesco Puglierin < barabba-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
Hi!  Thank you for the quick answer.

Installed Sedna latest version (2.2).  Downloaded the latest itwiki
xml dump ( http://download.wikimedia.org/itwiki/20071215/itwiki-20071215-pages-articles.xml.bz2
), the problem is still arising, around the 196kth analyzed node.
The result of the query you asked for is 2138156063.

Francesco Puglierin

On Jan 7, 2008 12:56 AM, Ivan Shcheklein < vano_msu-JGs/UdohzUI@public.gmane.org> wrote:
> Hi Francesco,
>
> I need a bit more information to try to reproduce this bug:
>
> 1. What exact version of Sedna do you use?
> 2. Can you provide us with a part of your XML contained a few "page"
> elements?
> 3. Please send me result for the following query:
>
> fn:max(
>
>     for $i in document(\"itwikiAB.xml\")/mediawiki/page
>     return fn:string-length($i/revision/text/text()))
>
> Ivan Shcheklein,
> Sedna Team
>
>


Gmane