Xquery through the PERL (or Java) API

Wednesday, 30 March 2011 · 12 messages
IV
Isidro Vila Verde30 Mar 2011 16:39 #
Dear all, I have a very strange situation when invoking this xquery
declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01";
declare option output:method "xml";

let $col := collection('invoiceDB')
let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279']
return $invoice
When invoked from GUI it returns the right XML element, but the same query invoked through the perl (or java) API it returns a null result. Bellow is the perl (andf java version) code. What is more strange is that it works for any other value of node saf:InvoiceNo/text(). It just doesn't work for the value 279. In collection invoice DB each saf:Invoice is a single document and the invoiceNo/text()='279' is the "last" document. The collection was just created from a input directory and no other operations was performed on it. Can you help please? I am using the last Basex 6.6 version on ubuntu with java-6-sun. I came to this error when I was in a process to identify why a update operation through the perl API corrupted the database while the same upadate query works fine when invoked from GUI. So, my problem is not exactly this one but I can go any further without resolving this. I notice, on page https://github.com/BaseXdb/BaseX, there is no API version not the last basex 6.6. Should I go back to the version 6.5? Thanks in advance for your help Isidro
------------------Perl Version-----------------------------
#!/usr/bin/perl
use strict;
use lib qw|/var/www/serprest/perl/3rd-party|;
use BaseXClient;
use warnings;

eval {
     my $session = Session->new("localhost", 1984, "serprest",
".prest,ser");

     my $q = q|
         declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01";
         declare option output:method "xml";

             let $col := collection('invoiceDB')
             let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279']
             return $invoice
     |;
     my $query = $session->query($q);
     $query->init();
     print $query->execute();
     print $query->info();
     $query->close();
     $session->close();
};
# print exception print qq|<error>$@</error>| if $@; ------------------Java Version----------------------------- import java.io.IOException;
public final class QueryTeste {
   public static void main(final String[] args) {
     try {
     BaseXClient session =
       new BaseXClient("localhost", 1984, "serprest", ".prest,ser");

     try {
       String input = "declare namespace
saf=\"urn:OECD:StandardAuditFile-Tax:PT_1.00_01\";"
             + "declare option output:method \"xml\";"
             + "let $col := collection('invoiceDB')"
             + "let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() =
'279']"
             + "return $invoice";
       BaseXClient.Query query = session.query(input);
       System.out.print(query.init());
       while(query.more()) {
         System.out.println(query.next());
       }
       System.out.print(query.close());
     } catch(IOException ex) {
       ex.printStackTrace();
     }
     session.close();
     } catch(IOException ex) {
     ex.printStackTrace();
     }
   }
}
-----------------------------------------------
--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 110330-0, 30-03-2011 Tested on: 30-03-2011 15:39:30 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com
AW
Andreas Weiler30 Mar 2011 16:45 #
Dear Isidro, as a quick help, you could have a look at the log files on the server, they are located in your BaseXData folder (.logs). Here you can check if the query did arrive correctly at the server. -- Andreas
Quoted text · Isidro Vila Verde · 112 lines
Am 30.03.2011 um 16:39 schrieb Isidro Vila Verde: > Dear all, > > I have a very strange situation when invoking this xquery > > declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; > declare option output:method "xml"; > > let $col := collection('invoiceDB') > let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279'] > return $invoice > > When invoked from GUI it returns the right XML element, but the same query invoked through the perl (or java) API it returns a null result. > > Bellow is the perl (andf java version) code. What is more strange is that it works for any other value of node saf:InvoiceNo/text(). It just doesn't work for the value 279. > > In collection invoice DB each saf:Invoice is a single document and the invoiceNo/text()='279' is the "last" document. The collection was just created from a input directory and no other operations was performed on it. > > Can you help please? > > I am using the last Basex 6.6 version on ubuntu with java-6-sun. > > I came to this error when I was in a process to identify why a update operation through the perl API corrupted the database while the same upadate query works fine when invoked from GUI. > So, my problem is not exactly this one but I can go any further without resolving this. > > I notice, on page https://github.com/BaseXdb/BaseX, there is no API version not the last basex 6.6. Should I go back to the version 6.5? > > > Thanks in advance for your help > > Isidro > > ------------------Perl Version----------------------------- > #!/usr/bin/perl > use strict; > use lib qw|/var/www/serprest/perl/3rd-party|; > use BaseXClient; > use warnings; > > eval { > my $session = Session->new("localhost", 1984, "serprest", ".prest,ser"); > > my $q = q| > declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; > declare option output:method "xml"; > > let $col := collection('invoiceDB') > let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279'] > return $invoice > |; > my $query = $session->query($q); > $query->init(); > print $query->execute(); > print $query->info(); > $query->close(); > $session->close(); > }; > > # print exception > print qq|<error>$@</error>| if $@; > > > ------------------Java Version----------------------------- > import java.io.IOException; > > public final class QueryTeste { > public static void main(final String[] args) { > try { > BaseXClient session = > new BaseXClient("localhost", 1984, "serprest", ".prest,ser"); > > try { > String input = "declare namespace saf=\"urn:OECD:StandardAuditFile-Tax:PT_1.00_01\";" > + "declare option output:method \"xml\";" > + "let $col := collection('invoiceDB')" > + "let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279']" > + "return $invoice"; > BaseXClient.Query query = session.query(input); > System.out.print(query.init()); > while(query.more()) { > System.out.println(query.next()); > } > System.out.print(query.close()); > } catch(IOException ex) { > ex.printStackTrace(); > } > session.close(); > } catch(IOException ex) { > ex.printStackTrace(); > } > } > } > ----------------------------------------------- > > > > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 15:39:30 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
AW
Andreas Weiler30 Mar 2011 16:56 #
Forwarding to mailing list. Anfang der weitergeleiteten E-Mail:
Quoted text · Andreas Weiler · 169 lines
> Von: Isidro Vila Verde <jvverde at gmail.com> > Datum: 30. März 2011 16:54:37 MESZ > An: Andreas Weiler <andreas.weiler at uni-konstanz.de> > Betreff: Re: [basex-talk] Xquery through the PERL (or Java) API > > Dear Andreas, > > Thank you for you quick answer~. I didn't know about logs. It is in fact a great help, but for presente it seems the query is correctly received. > This is what I got > > 07:50:25.999 [127.0.0.1:39722] LOGIN serprest OK > 07:50:26.193 [127.0.0.1:39722] QUERY(0) declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; declare option output:method "xml"; let $col := collection('invoiceDB') let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279'] return $invoice OK > 07:50:26.193 [127.0.0.1:39722] QUERY(0) OK > 07:50:26.307 [127.0.0.1:39722] INIT(0) OK > 07:50:26.319 [127.0.0.1:39722] EXEC(0) OK > 07:50:26.320 [127.0.0.1:39722] INFO(0) OK > 07:50:26.320 [127.0.0.1:39722] CLOSE(0) OK > 07:50:26.347 [127.0.0.1:39722] LOGOUT serprest OK > > Regards > > Isidro > > Em 30-03-2011 15:45, Andreas Weiler escreveu: >> Dear Isidro, >> >> as a quick help, you could have a look at the log files on the server, they are located >> in your BaseXData folder (.logs). >> >> Here you can check if the query did arrive correctly at the server. >> >> -- Andreas >> >> Am 30.03.2011 um 16:39 schrieb Isidro Vila Verde: >> >>> Dear all, >>> >>> I have a very strange situation when invoking this xquery >>> >>> declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >>> declare option output:method "xml"; >>> >>> let $col := collection('invoiceDB') >>> let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279'] >>> return $invoice >>> >>> When invoked from GUI it returns the right XML element, but the same query invoked through the perl (or java) API it returns a null result. >>> >>> Bellow is the perl (andf java version) code. What is more strange is that it works for any other value of node saf:InvoiceNo/text(). It just doesn't work for the value 279. >>> >>> In collection invoice DB each saf:Invoice is a single document and the invoiceNo/text()='279' is the "last" document. The collection was just created from a input directory and no other operations was performed on it. >>> >>> Can you help please? >>> >>> I am using the last Basex 6.6 version on ubuntu with java-6-sun. >>> >>> I came to this error when I was in a process to identify why a update operation through the perl API corrupted the database while the same upadate query works fine when invoked from GUI. >>> So, my problem is not exactly this one but I can go any further without resolving this. >>> >>> I notice, on page https://github.com/BaseXdb/BaseX, there is no API version not the last basex 6.6. Should I go back to the version 6.5? >>> >>> >>> Thanks in advance for your help >>> >>> Isidro >>> >>> ------------------Perl Version----------------------------- >>> #!/usr/bin/perl >>> use strict; >>> use lib qw|/var/www/serprest/perl/3rd-party|; >>> use BaseXClient; >>> use warnings; >>> >>> eval { >>> my $session = Session->new("localhost", 1984, "serprest", ".prest,ser"); >>> >>> my $q = q| >>> declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >>> declare option output:method "xml"; >>> >>> let $col := collection('invoiceDB') >>> let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279'] >>> return $invoice >>> |; >>> my $query = $session->query($q); >>> $query->init(); >>> print $query->execute(); >>> print $query->info(); >>> $query->close(); >>> $session->close(); >>> }; >>> >>> # print exception >>> print qq|<error>$@</error>| if $@; >>> >>> >>> ------------------Java Version----------------------------- >>> import java.io.IOException; >>> >>> public final class QueryTeste { >>> public static void main(final String[] args) { >>> try { >>> BaseXClient session = >>> new BaseXClient("localhost", 1984, "serprest", ".prest,ser"); >>> >>> try { >>> String input = "declare namespace saf=\"urn:OECD:StandardAuditFile-Tax:PT_1.00_01\";" >>> + "declare option output:method \"xml\";" >>> + "let $col := collection('invoiceDB')" >>> + "let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279']" >>> + "return $invoice"; >>> BaseXClient.Query query = session.query(input); >>> System.out.print(query.init()); >>> while(query.more()) { >>> System.out.println(query.next()); >>> } >>> System.out.print(query.close()); >>> } catch(IOException ex) { >>> ex.printStackTrace(); >>> } >>> session.close(); >>> } catch(IOException ex) { >>> ex.printStackTrace(); >>> } >>> } >>> } >>> ----------------------------------------------- >>> >>> >>> >>> >>> >>> >>> --- >>> avast! Antivirus: Outbound message clean. >>> Virus Database (VPS): 110330-0, 30-03-2011 >>> Tested on: 30-03-2011 15:39:30 >>> avast! - copyright (c) 1988-2011 AVAST Software. >>> http://www.avast.com >>> >>> >>> >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >> >> --- >> avast! Antivirus: Inbound message clean. >> Virus Database (VPS): 110330-0, 30-03-2011 >> Tested on: 30-03-2011 15:47:51 >> avast! - copyright (c) 1988-2011 AVAST Software. >> http://www.avast.com >> >> >> > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 15:54:40 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > >
IV
Isidro Vila Verde30 Mar 2011 17:06 #
Sorry and Thank you. I just reply and forgot to change the destination address. Isidro Em 30-03-2011 15:56, Andreas Weiler escreveu:
Quoted text · Andreas Weiler · 219 lines
> Forwarding to mailing list. > > Anfang der weitergeleiteten E-Mail: > >> *Von: *Isidro Vila Verde <jvverde at gmail.com <mailto:jvverde at gmail.com>> >> *Datum: *30. März 2011 16:54:37 MESZ >> *An: *Andreas Weiler <andreas.weiler at uni-konstanz.de >> <mailto:andreas.weiler at uni-konstanz.de>> >> *Betreff: **Re: [basex-talk] Xquery through the PERL (or Java) API* >> >> Dear Andreas, >> >> Thank you for you quick answer~. I didn't know about logs. It is in >> fact a great help, but for presente it seems the query is correctly >> received. >> This is what I got >> >> 07:50:25.999 [127.0.0.1:39722] LOGIN serprest OK >> 07:50:26.193 [127.0.0.1:39722] QUERY(0) declare >> namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >> declare option output:method "xml"; let $col := >> collection('invoiceDB') let $invoice := >> $col/saf:Invoice[saf:InvoiceNo/text() = '279'] return >> $invoice OK >> 07:50:26.193 [127.0.0.1:39722] QUERY(0) OK >> 07:50:26.307 [127.0.0.1:39722] INIT(0) OK >> 07:50:26.319 [127.0.0.1:39722] EXEC(0) OK >> 07:50:26.320 [127.0.0.1:39722] INFO(0) OK >> 07:50:26.320 [127.0.0.1:39722] CLOSE(0) OK >> 07:50:26.347 [127.0.0.1:39722] LOGOUT serprest OK >> >> Regards >> >> Isidro >> >> Em 30-03-2011 15:45, Andreas Weiler escreveu: >>> Dear Isidro, >>> >>> as a quick help, you could have a look at the log files on the >>> server, they are located >>> in your BaseXData folder (.logs). >>> >>> Here you can check if the query did arrive correctly at the server. >>> >>> -- Andreas >>> >>> Am 30.03.2011 um 16:39 schrieb Isidro Vila Verde: >>> >>>> Dear all, >>>> >>>> I have a very strange situation when invoking this xquery >>>> >>>> declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >>>> declare option output:method "xml"; >>>> >>>> let $col := collection('invoiceDB') >>>> let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279'] >>>> return $invoice >>>> >>>> When invoked from GUI it returns the right XML element, but the >>>> same query invoked through the perl (or java) API it returns a null >>>> result. >>>> >>>> Bellow is the perl (andf java version) code. What is more strange >>>> is that it works for any other value of node saf:InvoiceNo/text(). >>>> It just doesn't work for the value 279. >>>> >>>> In collection invoice DB each saf:Invoice is a single document and >>>> the invoiceNo/text()='279' is the "last" document. The collection >>>> was just created from a input directory and no other operations was >>>> performed on it. >>>> >>>> Can you help please? >>>> >>>> I am using the last Basex 6.6 version on ubuntu with java-6-sun. >>>> >>>> I came to this error when I was in a process to identify why a >>>> update operation through the perl API corrupted the database while >>>> the same upadate query works fine when invoked from GUI. >>>> So, my problem is not exactly this one but I can go any further >>>> without resolving this. >>>> >>>> I notice, on page https://github.com/BaseXdb/BaseX, there is no API >>>> version not the last basex 6.6. Should I go back to the version 6.5? >>>> >>>> >>>> Thanks in advance for your help >>>> >>>> Isidro >>>> >>>> ------------------Perl Version----------------------------- >>>> #!/usr/bin/perl >>>> use strict; >>>> use lib qw|/var/www/serprest/perl/3rd-party|; >>>> use BaseXClient; >>>> use warnings; >>>> >>>> eval { >>>> my $session = Session->new("localhost", 1984, "serprest", >>>> ".prest,ser"); >>>> >>>> my $q = q| >>>> declare namespace >>>> saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >>>> declare option output:method "xml"; >>>> >>>> let $col := collection('invoiceDB') >>>> let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = >>>> '279'] >>>> return $invoice >>>> |; >>>> my $query = $session->query($q); >>>> $query->init(); >>>> print $query->execute(); >>>> print $query->info(); >>>> $query->close(); >>>> $session->close(); >>>> }; >>>> >>>> # print exception >>>> print qq|<error>$@</error>| if $@; >>>> >>>> >>>> ------------------Java Version----------------------------- >>>> import java.io.IOException; >>>> >>>> public final class QueryTeste { >>>> public static void main(final String[] args) { >>>> try { >>>> BaseXClient session = >>>> new BaseXClient("localhost", 1984, "serprest", ".prest,ser"); >>>> >>>> try { >>>> String input = "declare namespace >>>> saf=\"urn:OECD:StandardAuditFile-Tax:PT_1.00_01\";" >>>> + "declare option output:method \"xml\";" >>>> + "let $col := collection('invoiceDB')" >>>> + "let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() >>>> = '279']" >>>> + "return $invoice"; >>>> BaseXClient.Query query = session.query(input); >>>> System.out.print(query.init()); >>>> while(query.more()) { >>>> System.out.println(query.next()); >>>> } >>>> System.out.print(query.close()); >>>> } catch(IOException ex) { >>>> ex.printStackTrace(); >>>> } >>>> session.close(); >>>> } catch(IOException ex) { >>>> ex.printStackTrace(); >>>> } >>>> } >>>> } >>>> ----------------------------------------------- >>>> >>>> >>>> >>>> >>>> >>>> >>>> --- >>>> avast! Antivirus: Outbound message clean. >>>> Virus Database (VPS): 110330-0, 30-03-2011 >>>> Tested on: 30-03-2011 15:39:30 >>>> avast! - copyright (c) 1988-2011 AVAST Software. >>>> http://www.avast.com >>>> >>>> >>>> >>>> _______________________________________________ >>>> BaseX-Talk mailing list >>>> BaseX-Talk at mailman.uni-konstanz.de >>>> <mailto:BaseX-Talk at mailman.uni-konstanz.de> >>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >>> >>> --- >>> avast! Antivirus: Inbound message clean. >>> Virus Database (VPS): 110330-0, 30-03-2011 >>> Tested on: 30-03-2011 15:47:51 >>> avast! - copyright (c) 1988-2011 AVAST Software. >>> http://www.avast.com >>> >>> >>> >> >> >> >> --- >> avast! Antivirus: Outbound message clean. >> Virus Database (VPS): 110330-0, 30-03-2011 >> Tested on: 30-03-2011 15:54:40 >> avast! - copyright (c) 1988-2011 AVAST Software. >> http://www.avast.com >> >> >> > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > > > > --- > avast! Antivirus: Inbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 15:56:44 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > > >
--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 110330-0, 30-03-2011 Tested on: 30-03-2011 16:06:19 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com
IV
Isidro Vila Verde30 Mar 2011 17:22 #
Sorry!!! I am been in a process of focus in little details that I missed the most obvious: reboot the server. I just did that and (this) the problem disappear. I am going now to check if the update problem stills or also go disappear. Sorry the noise on the channel. Just a question. The GUI doesn't use the server to access to the DB? Isidro Em 30-03-2011 15:54, Isidro Vila Verde escreveu:
Quoted text · Isidro Vila Verde · 198 lines
> Dear Andreas, > > Thank you for you quick answer~. I didn't know about logs. It is in > fact a great help, but for presente it seems the query is correctly > received. > This is what I got > > 07:50:25.999 [127.0.0.1:39722] LOGIN serprest OK > 07:50:26.193 [127.0.0.1:39722] QUERY(0) declare > namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; > declare option output:method "xml"; let $col := > collection('invoiceDB') let $invoice := > $col/saf:Invoice[saf:InvoiceNo/text() = '279'] return > $invoice OK > 07:50:26.193 [127.0.0.1:39722] QUERY(0) OK > 07:50:26.307 [127.0.0.1:39722] INIT(0) OK > 07:50:26.319 [127.0.0.1:39722] EXEC(0) OK > 07:50:26.320 [127.0.0.1:39722] INFO(0) OK > 07:50:26.320 [127.0.0.1:39722] CLOSE(0) OK > 07:50:26.347 [127.0.0.1:39722] LOGOUT serprest OK > > Regards > > Isidro > > Em 30-03-2011 15:45, Andreas Weiler escreveu: >> Dear Isidro, >> >> as a quick help, you could have a look at the log files on the >> server, they are located >> in your BaseXData folder (.logs). >> >> Here you can check if the query did arrive correctly at the server. >> >> -- Andreas >> >> Am 30.03.2011 um 16:39 schrieb Isidro Vila Verde: >> >>> Dear all, >>> >>> I have a very strange situation when invoking this xquery >>> >>> declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >>> declare option output:method "xml"; >>> >>> let $col := collection('invoiceDB') >>> let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = '279'] >>> return $invoice >>> >>> When invoked from GUI it returns the right XML element, but the same >>> query invoked through the perl (or java) API it returns a null result. >>> >>> Bellow is the perl (andf java version) code. What is more strange is >>> that it works for any other value of node saf:InvoiceNo/text(). It >>> just doesn't work for the value 279. >>> >>> In collection invoice DB each saf:Invoice is a single document and >>> the invoiceNo/text()='279' is the "last" document. The collection >>> was just created from a input directory and no other operations was >>> performed on it. >>> >>> Can you help please? >>> >>> I am using the last Basex 6.6 version on ubuntu with java-6-sun. >>> >>> I came to this error when I was in a process to identify why a >>> update operation through the perl API corrupted the database while >>> the same upadate query works fine when invoked from GUI. >>> So, my problem is not exactly this one but I can go any further >>> without resolving this. >>> >>> I notice, on page https://github.com/BaseXdb/BaseX, there is no API >>> version not the last basex 6.6. Should I go back to the version 6.5? >>> >>> >>> Thanks in advance for your help >>> >>> Isidro >>> >>> ------------------Perl Version----------------------------- >>> #!/usr/bin/perl >>> use strict; >>> use lib qw|/var/www/serprest/perl/3rd-party|; >>> use BaseXClient; >>> use warnings; >>> >>> eval { >>> my $session = Session->new("localhost", 1984, "serprest", >>> ".prest,ser"); >>> >>> my $q = q| >>> declare namespace >>> saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >>> declare option output:method "xml"; >>> >>> let $col := collection('invoiceDB') >>> let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() = >>> '279'] >>> return $invoice >>> |; >>> my $query = $session->query($q); >>> $query->init(); >>> print $query->execute(); >>> print $query->info(); >>> $query->close(); >>> $session->close(); >>> }; >>> >>> # print exception >>> print qq|<error>$@</error>| if $@; >>> >>> >>> ------------------Java Version----------------------------- >>> import java.io.IOException; >>> >>> public final class QueryTeste { >>> public static void main(final String[] args) { >>> try { >>> BaseXClient session = >>> new BaseXClient("localhost", 1984, "serprest", ".prest,ser"); >>> >>> try { >>> String input = "declare namespace >>> saf=\"urn:OECD:StandardAuditFile-Tax:PT_1.00_01\";" >>> + "declare option output:method \"xml\";" >>> + "let $col := collection('invoiceDB')" >>> + "let $invoice := $col/saf:Invoice[saf:InvoiceNo/text() >>> = '279']" >>> + "return $invoice"; >>> BaseXClient.Query query = session.query(input); >>> System.out.print(query.init()); >>> while(query.more()) { >>> System.out.println(query.next()); >>> } >>> System.out.print(query.close()); >>> } catch(IOException ex) { >>> ex.printStackTrace(); >>> } >>> session.close(); >>> } catch(IOException ex) { >>> ex.printStackTrace(); >>> } >>> } >>> } >>> ----------------------------------------------- >>> >>> >>> >>> >>> >>> >>> --- >>> avast! Antivirus: Outbound message clean. >>> Virus Database (VPS): 110330-0, 30-03-2011 >>> Tested on: 30-03-2011 15:39:30 >>> avast! - copyright (c) 1988-2011 AVAST Software. >>> http://www.avast.com >>> >>> >>> >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >> >> --- >> avast! Antivirus: Inbound message clean. >> Virus Database (VPS): 110330-0, 30-03-2011 >> Tested on: 30-03-2011 15:47:51 >> avast! - copyright (c) 1988-2011 AVAST Software. >> http://www.avast.com >> >> >> > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 15:54:40 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > > > > > --- > avast! Antivirus: Inbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 16:16:17 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > >
--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 110330-0, 30-03-2011 Tested on: 30-03-2011 16:22:03 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com
AH
Alexander Holupirek30 Mar 2011 17:26 #
Hi Isidro,
Quoted text · Isidro Vila Verde · 2 lines
On 30.03.2011, at 17:22, Isidro Vila Verde wrote: > Just a question. The GUI doesn't use the server to access to the DB?
that's right. The GUI is a standalone version of BaseX and does not use client/server communication. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Alexander Holupirek |-- http://www.informatik.uni-konstanz.de/~holupire |-- Database & Information Systems Group, U Konstanz `-- Room E 209, 0049 7531 88 4449 (phone) 3577 (fax)
IV
Isidro Vila Verde30 Mar 2011 18:11 #
Hi again, This is my (original) problem. If I try to run a xquery update from GUI and then try to get the modified XML element everything is ok. But if a run the same xquery from a perl script and then go to the GUI, to get the modified XML element I get this error: ------------------------------Error obtained, in GUI, after run the update query from a perl script--------------------------- Query: import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; declare option output:omit-xml-declaration "no"; declare option output:method "xml"; m:getInvoiceSumary(xs:string('279')) Error: Possible bug? Your feedback is welcome: Contact: basex-talk at mailman.uni-konstanz.de Version: BaseX 6.6 Java: Sun Microsystems Inc., 1.6.0_20 OS: Linux, amd64 Stack Trace: java.lang.IndexOutOfBoundsException java.io.RandomAccessFile.readBytes(Native Method) java.io.RandomAccessFile.read(RandomAccessFile.java:355) java.io.RandomAccessFile.readFully(RandomAccessFile.java:414) org.basex.io.DataAccess.cursor(DataAccess.java:225) org.basex.io.DataAccess.readToken(DataAccess.java:147) org.basex.data.DiskData.txt(DiskData.java:213) org.basex.data.DiskData.text(DiskData.java:181) org.basex.data.Data.atom(Data.java:241) org.basex.query.item.DBNode.atom(DBNode.java:84) org.basex.query.item.Str.eq(Str.java:77) org.basex.query.item.ANode.eq(ANode.java:73) org.basex.query.expr.CmpV$Op$5.e(CmpV.java:80) org.basex.query.expr.CmpG.eval(CmpG.java:232) org.basex.query.expr.CmpG.item(CmpG.java:181) org.basex.query.expr.CmpG.item(CmpG.java:1) org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:85) org.basex.query.expr.ParseExpr.test(ParseExpr.java:98) org.basex.query.expr.Preds.preds(Preds.java:99) org.basex.query.path.IterStep$1.next(IterStep.java:49) org.basex.query.path.AxisPath.iter(AxisPath.java:438) org.basex.query.path.AxisPath.iter(AxisPath.java:408) org.basex.query.QueryContext.iter(QueryContext.java:330) org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) org.basex.query.expr.Let$1.next(Let.java:94) org.basex.query.expr.FLWR$1.next(FLWR.java:62) org.basex.query.iter.Iter.finish(Iter.java:65) org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) org.basex.query.expr.Func.iter(Func.java:99) org.basex.query.QueryContext.iter(QueryContext.java:330) org.basex.query.expr.FuncCall.iter(FuncCall.java:80) org.basex.query.QueryContext.iter(QueryContext.java:330) org.basex.query.QueryContext.iter(QueryContext.java:295) org.basex.query.QueryContext.eval(QueryContext.java:253) org.basex.query.QueryProcessor.execute(QueryProcessor.java:113) org.basex.core.cmd.AQuery.query(AQuery.java:83) org.basex.core.cmd.XQuery.run(XQuery.java:22) org.basex.core.Command.run(Command.java:292) org.basex.core.Command.exec(Command.java:274) org.basex.core.Command.execute(Command.java:67) org.basex.gui.GUI.exec(GUI.java:390) org.basex.gui.GUI$5.run(GUI.java:351)
------------This is the query which throws the above error message
-------------------------
import module namespace m = "http://serprest.pt/invoice/xqm" at
"http://localhost/xq/m.xqm";
         declare option output:omit-xml-declaration "no";
         declare option output:method "xml";

       m:getInvoiceSumary(xs:string('279'))

-------------This is the update query, as invoked from
GUI------------------------
import module namespace m = "http://serprest.pt/invoice/xqm" at
"http://localhost/xq/m.xqm";
         declare option output:omit-xml-declaration "no";
         declare option output:method "xml";

           m:invoiceUpdate(<saf:Invoice
             xmlns:spi="http://serprest.pt/invoice1"
             xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
             xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01">
<saf:InvoiceNo>279</saf:InvoiceNo>
<saf:InvoiceDate>2011-01-27</saf:InvoiceDate>
<saf:InvoiceType>Factura</saf:InvoiceType>
<!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate-->
<saf:CustomerID>555561</saf:CustomerID>
<spi:PayDateExpected>2011-02-27</spi:PayDateExpected>
<spi:PayDate></spi:PayDate>
<spi:ReceiptID></spi:ReceiptID>
<spi:Status>Iniciada</spi:Status>
</saf:Invoice>)
-------------This is the PERL script with the same update query. Run this script is the the source of problem------------------------ #!/usr/bin/perl use strict; use lib qw|/var/www/serprest/perl/3rd-party|; use BaseXClient; use warnings;
eval {
     my $session = Session->new("localhost", 1984, "serprest",
".prest,ser");

     my $q = q|
         import module namespace m = "http://serprest.pt/invoice/xqm" at
"http://localhost/xq/m.xqm";
         declare option output:omit-xml-declaration "no";
         declare option output:method "xml";

           m:invoiceUpdate(<saf:Invoice
             xmlns:spi="http://serprest.pt/invoice1"
             xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
             xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01">
<saf:InvoiceNo>279</saf:InvoiceNo>
<saf:InvoiceDate>2011-01-27</saf:InvoiceDate>
<saf:InvoiceType>Factura</saf:InvoiceType>
<!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate-->
<saf:CustomerID>555561</saf:CustomerID>
<spi:PayDateExpected>2011-02-27</spi:PayDateExpected>
<spi:PayDate></spi:PayDate>
<spi:ReceiptID></spi:ReceiptID>
<spi:Status>Iniciada</spi:Status>
</saf:Invoice>)

     |;
     my $query = $session->query($q);
     $query->init();
     print $query->execute();
     print $query->info();
     $query->close();
     $session->close();
};
# print exception print qq|<error>$@</error>| if $@;
-----------------This is module which implement the two functions used
in the above queries-------------------
module namespace x = "http://serprest.pt/invoice/xqm";
declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01";
declare namespace spi="http://serprest.pt/invoice1";
declare namespace fx="http://www.basex.org/file";
declare variable $x:col := collection('invoiceDB');

[... some stuff deleted here ...]
declare function x:getInvoiceSumary($invoiceNo as xs:string) as node()? {
     let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text()=$invoiceNo]
     return
         if ($invoice/saf:Line) then
             copy $c := $invoice
             modify delete node $c/saf:Line
             return $c
         else
             $invoice
};
[... some stuff deleted here ...]
declare updating function x:invoiceUpdate($newInvoice as node()){
     let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text() =
$newInvoice/saf:InvoiceNo/text()]
     for $p in $newInvoice/*
     let $target := $invoice/*[name() = name($p)][last()]
     return
         if ($target) then
             replace node $target with $p
         else
             insert node $p as last into $invoice
};
-------------This is the log----------------------- 08:34:22.513 [127.0.0.1:48542] QUERY(0) import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; declare option output:omit-xml-declaration "no"; declare option output:method "xml"; m:invoiceUpdate(<saf:Invoice xmlns:spi="http://serprest.pt/invoice1" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> <saf:InvoiceNo>279</saf:InvoiceNo> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> <saf:InvoiceType>Factura</saf:InvoiceType> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> <saf:CustomerID>555561</saf:CustomerID> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> <spi:PayDate></spi:PayDate> <spi:ReceiptID></spi:ReceiptID> <spi:Status>Iniciada</spi:Status> </saf:Invoice>) OK 08:34:22.523 [127.0.0.1:48542] QUERY(0) OK 08:34:22.611 [127.0.0.1:48542] INIT(0) OK 08:34:22.612 [127.0.0.1:48542] EXEC(0) OK 08:34:22.613 [127.0.0.1:48542] INFO(0) OK 08:34:22.613 [127.0.0.1:48542] CLOSE(0) OK 08:34:22.615 [127.0.0.1:48542] LOGOUT serprest OK ------------------------------------------------------ If I run the m:getInvoiceSumary(xs:string('279')) again it runs without any error message but it returns a empty result. If I close and open the GUI again the result still be a empty result and if I try to open the DB I get a popup message saying: "Could not execute OPEN invoiceDB: java.lang.IndexOutOfBoundsException" Any help/glue is welcome. Thanks Isidro --- avast! Antivirus: Outbound message clean. Virus Database (VPS): 110330-0, 30-03-2011 Tested on: 30-03-2011 17:11:11 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com
AW
Andreas Weiler30 Mar 2011 19:17 #
Hi Isidro, you have to reopen the database in the GUI. -- Andreas
Quoted text · Isidro Vila Verde · 208 lines
Am 30.03.2011 um 18:11 schrieb Isidro Vila Verde: > Hi again, > > This is my (original) problem. > > If I try to run a xquery update from GUI and then try to get the modified XML element everything is ok. > > But if a run the same xquery from a perl script and then go to the GUI, to get the modified XML element I get this error: > > > ------------------------------Error obtained, in GUI, after run the update query from a perl script--------------------------- > Query: import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; > declare option output:omit-xml-declaration "no"; > declare option output:method "xml"; > > m:getInvoiceSumary(xs:string('279')) > Error: Possible bug? Your feedback is welcome: > Contact: basex-talk at mailman.uni-konstanz.de > Version: BaseX 6.6 > Java: Sun Microsystems Inc., 1.6.0_20 > OS: Linux, amd64 > Stack Trace: > java.lang.IndexOutOfBoundsException > java.io.RandomAccessFile.readBytes(Native Method) > java.io.RandomAccessFile.read(RandomAccessFile.java:355) > java.io.RandomAccessFile.readFully(RandomAccessFile.java:414) > org.basex.io.DataAccess.cursor(DataAccess.java:225) > org.basex.io.DataAccess.readToken(DataAccess.java:147) > org.basex.data.DiskData.txt(DiskData.java:213) > org.basex.data.DiskData.text(DiskData.java:181) > org.basex.data.Data.atom(Data.java:241) > org.basex.query.item.DBNode.atom(DBNode.java:84) > org.basex.query.item.Str.eq(Str.java:77) > org.basex.query.item.ANode.eq(ANode.java:73) > org.basex.query.expr.CmpV$Op$5.e(CmpV.java:80) > org.basex.query.expr.CmpG.eval(CmpG.java:232) > org.basex.query.expr.CmpG.item(CmpG.java:181) > org.basex.query.expr.CmpG.item(CmpG.java:1) > org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:85) > org.basex.query.expr.ParseExpr.test(ParseExpr.java:98) > org.basex.query.expr.Preds.preds(Preds.java:99) > org.basex.query.path.IterStep$1.next(IterStep.java:49) > org.basex.query.path.AxisPath.iter(AxisPath.java:438) > org.basex.query.path.AxisPath.iter(AxisPath.java:408) > org.basex.query.QueryContext.iter(QueryContext.java:330) > org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) > org.basex.query.expr.Let$1.next(Let.java:94) > org.basex.query.expr.FLWR$1.next(FLWR.java:62) > org.basex.query.iter.Iter.finish(Iter.java:65) > org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) > org.basex.query.expr.Func.iter(Func.java:99) > org.basex.query.QueryContext.iter(QueryContext.java:330) > org.basex.query.expr.FuncCall.iter(FuncCall.java:80) > org.basex.query.QueryContext.iter(QueryContext.java:330) > org.basex.query.QueryContext.iter(QueryContext.java:295) > org.basex.query.QueryContext.eval(QueryContext.java:253) > org.basex.query.QueryProcessor.execute(QueryProcessor.java:113) > org.basex.core.cmd.AQuery.query(AQuery.java:83) > org.basex.core.cmd.XQuery.run(XQuery.java:22) > org.basex.core.Command.run(Command.java:292) > org.basex.core.Command.exec(Command.java:274) > org.basex.core.Command.execute(Command.java:67) > org.basex.gui.GUI.exec(GUI.java:390) > org.basex.gui.GUI$5.run(GUI.java:351) > > > > ------------This is the query which throws the above error message ------------------------- > import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; > declare option output:omit-xml-declaration "no"; > declare option output:method "xml"; > > m:getInvoiceSumary(xs:string('279')) > > > > -------------This is the update query, as invoked from GUI------------------------ > import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; > declare option output:omit-xml-declaration "no"; > declare option output:method "xml"; > > m:invoiceUpdate(<saf:Invoice > xmlns:spi="http://serprest.pt/invoice1" > xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" > xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> > <saf:InvoiceNo>279</saf:InvoiceNo> > <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> > <saf:InvoiceType>Factura</saf:InvoiceType> > <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> > <saf:CustomerID>555561</saf:CustomerID> > <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> > <spi:PayDate></spi:PayDate> > <spi:ReceiptID></spi:ReceiptID> > <spi:Status>Iniciada</spi:Status> > </saf:Invoice>) > > > -------------This is the PERL script with the same update query. Run this script is the the source of problem------------------------ > #!/usr/bin/perl > use strict; > use lib qw|/var/www/serprest/perl/3rd-party|; > use BaseXClient; > use warnings; > > eval { > my $session = Session->new("localhost", 1984, "serprest", ".prest,ser"); > > my $q = q| > import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; > declare option output:omit-xml-declaration "no"; > declare option output:method "xml"; > > m:invoiceUpdate(<saf:Invoice > xmlns:spi="http://serprest.pt/invoice1" > xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" > xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> > <saf:InvoiceNo>279</saf:InvoiceNo> > <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> > <saf:InvoiceType>Factura</saf:InvoiceType> > <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> > <saf:CustomerID>555561</saf:CustomerID> > <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> > <spi:PayDate></spi:PayDate> > <spi:ReceiptID></spi:ReceiptID> > <spi:Status>Iniciada</spi:Status> > </saf:Invoice>) > > |; > my $query = $session->query($q); > $query->init(); > print $query->execute(); > print $query->info(); > $query->close(); > $session->close(); > }; > > # print exception > print qq|<error>$@</error>| if $@; > > > -----------------This is module which implement the two functions used in the above queries------------------- > module namespace x = "http://serprest.pt/invoice/xqm"; > declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; > declare namespace spi="http://serprest.pt/invoice1"; > declare namespace fx="http://www.basex.org/file"; > declare variable $x:col := collection('invoiceDB'); > > [... some stuff deleted here ...] > declare function x:getInvoiceSumary($invoiceNo as xs:string) as node()? { > let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text()=$invoiceNo] > return > if ($invoice/saf:Line) then > copy $c := $invoice > modify delete node $c/saf:Line > return $c > else > $invoice > }; > [... some stuff deleted here ...] > declare updating function x:invoiceUpdate($newInvoice as node()){ > let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text() = $newInvoice/saf:InvoiceNo/text()] > for $p in $newInvoice/* > let $target := $invoice/*[name() = name($p)][last()] > return > if ($target) then > replace node $target with $p > else > insert node $p as last into $invoice > }; > > -------------This is the log----------------------- > 08:34:22.513 [127.0.0.1:48542] QUERY(0) import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; declare option output:omit-xml-declaration "no"; declare option output:method "xml"; m:invoiceUpdate(<saf:Invoice xmlns:spi="http://serprest.pt/invoice1" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> <saf:InvoiceNo>279</saf:InvoiceNo> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> <saf:InvoiceType>Factura</saf:InvoiceType> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> <saf:CustomerID>555561</saf:CustomerID> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> <spi:PayDate></spi:PayDate> <spi:ReceiptID></spi:ReceiptID> <spi:Status>Iniciada</spi:Status> </saf:Invoice>) OK > 08:34:22.523 [127.0.0.1:48542] QUERY(0) OK > 08:34:22.611 [127.0.0.1:48542] INIT(0) OK > 08:34:22.612 [127.0.0.1:48542] EXEC(0) OK > 08:34:22.613 [127.0.0.1:48542] INFO(0) OK > 08:34:22.613 [127.0.0.1:48542] CLOSE(0) OK > 08:34:22.615 [127.0.0.1:48542] LOGOUT serprest OK > > ------------------------------------------------------ > > If I run the m:getInvoiceSumary(xs:string('279')) again it runs without any error message but it returns a empty result. > If I close and open the GUI again the result still be a empty result and if I try to open the DB I get a popup message saying: > "Could not execute OPEN invoiceDB: > java.lang.IndexOutOfBoundsException" > > > Any help/glue is welcome. > > Thanks > > Isidro > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 17:11:11 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
IV
Isidro Vila Verde30 Mar 2011 19:28 #
Andreas, If I do that I get the following message: "Could not execute OPEN invoiceDB: java.lang.IndexOutOfBoundsException" And if I run the perl script again I get this: "Not expected (Data Access out of bounds [pre:17508, indexSize:70, access:70> 69]). at /var/www/serprest/perl/3rd-party/BaseXClient.pm line 195" I really don't know how to workaround this. Thanks Isidro Em 30-03-2011 18:17, Andreas Weiler escreveu:
Quoted text · Andreas Weiler · 226 lines
> Hi Isidro, > > you have to reopen the database in the GUI. > > -- Andreas > > Am 30.03.2011 um 18:11 schrieb Isidro Vila Verde: > >> Hi again, >> >> This is my (original) problem. >> >> If I try to run a xquery update from GUI and then try to get the modified XML element everything is ok. >> >> But if a run the same xquery from a perl script and then go to the GUI, to get the modified XML element I get this error: >> >> >> ------------------------------Error obtained, in GUI, after run the update query from a perl script--------------------------- >> Query: import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >> declare option output:omit-xml-declaration "no"; >> declare option output:method "xml"; >> >> m:getInvoiceSumary(xs:string('279')) >> Error: Possible bug? Your feedback is welcome: >> Contact: basex-talk at mailman.uni-konstanz.de >> Version: BaseX 6.6 >> Java: Sun Microsystems Inc., 1.6.0_20 >> OS: Linux, amd64 >> Stack Trace: >> java.lang.IndexOutOfBoundsException >> java.io.RandomAccessFile.readBytes(Native Method) >> java.io.RandomAccessFile.read(RandomAccessFile.java:355) >> java.io.RandomAccessFile.readFully(RandomAccessFile.java:414) >> org.basex.io.DataAccess.cursor(DataAccess.java:225) >> org.basex.io.DataAccess.readToken(DataAccess.java:147) >> org.basex.data.DiskData.txt(DiskData.java:213) >> org.basex.data.DiskData.text(DiskData.java:181) >> org.basex.data.Data.atom(Data.java:241) >> org.basex.query.item.DBNode.atom(DBNode.java:84) >> org.basex.query.item.Str.eq(Str.java:77) >> org.basex.query.item.ANode.eq(ANode.java:73) >> org.basex.query.expr.CmpV$Op$5.e(CmpV.java:80) >> org.basex.query.expr.CmpG.eval(CmpG.java:232) >> org.basex.query.expr.CmpG.item(CmpG.java:181) >> org.basex.query.expr.CmpG.item(CmpG.java:1) >> org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:85) >> org.basex.query.expr.ParseExpr.test(ParseExpr.java:98) >> org.basex.query.expr.Preds.preds(Preds.java:99) >> org.basex.query.path.IterStep$1.next(IterStep.java:49) >> org.basex.query.path.AxisPath.iter(AxisPath.java:438) >> org.basex.query.path.AxisPath.iter(AxisPath.java:408) >> org.basex.query.QueryContext.iter(QueryContext.java:330) >> org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) >> org.basex.query.expr.Let$1.next(Let.java:94) >> org.basex.query.expr.FLWR$1.next(FLWR.java:62) >> org.basex.query.iter.Iter.finish(Iter.java:65) >> org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) >> org.basex.query.expr.Func.iter(Func.java:99) >> org.basex.query.QueryContext.iter(QueryContext.java:330) >> org.basex.query.expr.FuncCall.iter(FuncCall.java:80) >> org.basex.query.QueryContext.iter(QueryContext.java:330) >> org.basex.query.QueryContext.iter(QueryContext.java:295) >> org.basex.query.QueryContext.eval(QueryContext.java:253) >> org.basex.query.QueryProcessor.execute(QueryProcessor.java:113) >> org.basex.core.cmd.AQuery.query(AQuery.java:83) >> org.basex.core.cmd.XQuery.run(XQuery.java:22) >> org.basex.core.Command.run(Command.java:292) >> org.basex.core.Command.exec(Command.java:274) >> org.basex.core.Command.execute(Command.java:67) >> org.basex.gui.GUI.exec(GUI.java:390) >> org.basex.gui.GUI$5.run(GUI.java:351) >> >> >> >> ------------This is the query which throws the above error message ------------------------- >> import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >> declare option output:omit-xml-declaration "no"; >> declare option output:method "xml"; >> >> m:getInvoiceSumary(xs:string('279')) >> >> >> >> -------------This is the update query, as invoked from GUI------------------------ >> import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >> declare option output:omit-xml-declaration "no"; >> declare option output:method "xml"; >> >> m:invoiceUpdate(<saf:Invoice >> xmlns:spi="http://serprest.pt/invoice1" >> xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" >> xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> >> <saf:InvoiceNo>279</saf:InvoiceNo> >> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> >> <saf:InvoiceType>Factura</saf:InvoiceType> >> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> >> <saf:CustomerID>555561</saf:CustomerID> >> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> >> <spi:PayDate></spi:PayDate> >> <spi:ReceiptID></spi:ReceiptID> >> <spi:Status>Iniciada</spi:Status> >> </saf:Invoice>) >> >> >> -------------This is the PERL script with the same update query. Run this script is the the source of problem------------------------ >> #!/usr/bin/perl >> use strict; >> use lib qw|/var/www/serprest/perl/3rd-party|; >> use BaseXClient; >> use warnings; >> >> eval { >> my $session = Session->new("localhost", 1984, "serprest", ".prest,ser"); >> >> my $q = q| >> import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >> declare option output:omit-xml-declaration "no"; >> declare option output:method "xml"; >> >> m:invoiceUpdate(<saf:Invoice >> xmlns:spi="http://serprest.pt/invoice1" >> xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" >> xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> >> <saf:InvoiceNo>279</saf:InvoiceNo> >> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> >> <saf:InvoiceType>Factura</saf:InvoiceType> >> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> >> <saf:CustomerID>555561</saf:CustomerID> >> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> >> <spi:PayDate></spi:PayDate> >> <spi:ReceiptID></spi:ReceiptID> >> <spi:Status>Iniciada</spi:Status> >> </saf:Invoice>) >> >> |; >> my $query = $session->query($q); >> $query->init(); >> print $query->execute(); >> print $query->info(); >> $query->close(); >> $session->close(); >> }; >> >> # print exception >> print qq|<error>$@</error>| if $@; >> >> >> -----------------This is module which implement the two functions used in the above queries------------------- >> module namespace x = "http://serprest.pt/invoice/xqm"; >> declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >> declare namespace spi="http://serprest.pt/invoice1"; >> declare namespace fx="http://www.basex.org/file"; >> declare variable $x:col := collection('invoiceDB'); >> >> [... some stuff deleted here ...] >> declare function x:getInvoiceSumary($invoiceNo as xs:string) as node()? { >> let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text()=$invoiceNo] >> return >> if ($invoice/saf:Line) then >> copy $c := $invoice >> modify delete node $c/saf:Line >> return $c >> else >> $invoice >> }; >> [... some stuff deleted here ...] >> declare updating function x:invoiceUpdate($newInvoice as node()){ >> let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text() = $newInvoice/saf:InvoiceNo/text()] >> for $p in $newInvoice/* >> let $target := $invoice/*[name() = name($p)][last()] >> return >> if ($target) then >> replace node $target with $p >> else >> insert node $p as last into $invoice >> }; >> >> -------------This is the log----------------------- >> 08:34:22.513 [127.0.0.1:48542] QUERY(0) import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; declare option output:omit-xml-declaration "no"; declare option output:method "xml"; m:invoiceUpdate(<saf:Invoice xmlns:spi="http://serprest.pt/invoice1" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> <saf:InvoiceNo>279</saf:InvoiceNo> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> <saf:InvoiceType>Factura</saf:InvoiceType> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> <saf:CustomerID>555561</saf:CustomerID> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> <spi:PayDate></spi:PayDate> <spi:ReceiptID></spi:ReceiptID> <spi:Status>Iniciada</spi:Status> </saf:Invoice>) OK >> 08:34:22.523 [127.0.0.1:48542] QUERY(0) OK >> 08:34:22.611 [127.0.0.1:48542] INIT(0) OK >> 08:34:22.612 [127.0.0.1:48542] EXEC(0) OK >> 08:34:22.613 [127.0.0.1:48542] INFO(0) OK >> 08:34:22.613 [127.0.0.1:48542] CLOSE(0) OK >> 08:34:22.615 [127.0.0.1:48542] LOGOUT serprest OK >> >> ------------------------------------------------------ >> >> If I run the m:getInvoiceSumary(xs:string('279')) again it runs without any error message but it returns a empty result. >> If I close and open the GUI again the result still be a empty result and if I try to open the DB I get a popup message saying: >> "Could not execute OPEN invoiceDB: >> java.lang.IndexOutOfBoundsException" >> >> >> Any help/glue is welcome. >> >> Thanks >> >> Isidro >> >> >> >> --- >> avast! Antivirus: Outbound message clean. >> Virus Database (VPS): 110330-0, 30-03-2011 >> Tested on: 30-03-2011 17:11:11 >> avast! - copyright (c) 1988-2011 AVAST Software. >> http://www.avast.com >> >> >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > > --- > avast! Antivirus: Inbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 18:17:54 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > >
--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 110330-0, 30-03-2011 Tested on: 30-03-2011 18:28:25 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com
F
frans30 Mar 2011 19:53 #
Isidro, Do you run your Perl-script when the database is opened in the GUI? I suspect that will cause a corruption. So make sure that the database is closed in the GUI. Run your Perl-script. And then open the database in the GUI to check the results of your script. Regards, Frans Op 30 mrt 2011, om 19:28 heeft Isidro Vila Verde het volgende geschreven:
Quoted text · Isidro Vila Verde · 261 lines
> Andreas, > > If I do that I get the following message: > > "Could not execute OPEN invoiceDB: java.lang.IndexOutOfBoundsException" > > And if I run the perl script again I get this: > > "Not expected (Data Access out of bounds [pre:17508, indexSize:70, access:70> 69]). at /var/www/serprest/perl/3rd-party/BaseXClient.pm line 195" > > I really don't know how to workaround this. > > Thanks > > Isidro > > > > Em 30-03-2011 18:17, Andreas Weiler escreveu: >> Hi Isidro, >> >> you have to reopen the database in the GUI. >> >> -- Andreas >> >> Am 30.03.2011 um 18:11 schrieb Isidro Vila Verde: >> >>> Hi again, >>> >>> This is my (original) problem. >>> >>> If I try to run a xquery update from GUI and then try to get the modified XML element everything is ok. >>> >>> But if a run the same xquery from a perl script and then go to the GUI, to get the modified XML element I get this error: >>> >>> >>> ------------------------------Error obtained, in GUI, after run the update query from a perl script--------------------------- >>> Query: import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >>> declare option output:omit-xml-declaration "no"; >>> declare option output:method "xml"; >>> >>> m:getInvoiceSumary(xs:string('279')) >>> Error: Possible bug? Your feedback is welcome: >>> Contact: basex-talk at mailman.uni-konstanz.de >>> Version: BaseX 6.6 >>> Java: Sun Microsystems Inc., 1.6.0_20 >>> OS: Linux, amd64 >>> Stack Trace: >>> java.lang.IndexOutOfBoundsException >>> java.io.RandomAccessFile.readBytes(Native Method) >>> java.io.RandomAccessFile.read(RandomAccessFile.java:355) >>> java.io.RandomAccessFile.readFully(RandomAccessFile.java:414) >>> org.basex.io.DataAccess.cursor(DataAccess.java:225) >>> org.basex.io.DataAccess.readToken(DataAccess.java:147) >>> org.basex.data.DiskData.txt(DiskData.java:213) >>> org.basex.data.DiskData.text(DiskData.java:181) >>> org.basex.data.Data.atom(Data.java:241) >>> org.basex.query.item.DBNode.atom(DBNode.java:84) >>> org.basex.query.item.Str.eq(Str.java:77) >>> org.basex.query.item.ANode.eq(ANode.java:73) >>> org.basex.query.expr.CmpV$Op$5.e(CmpV.java:80) >>> org.basex.query.expr.CmpG.eval(CmpG.java:232) >>> org.basex.query.expr.CmpG.item(CmpG.java:181) >>> org.basex.query.expr.CmpG.item(CmpG.java:1) >>> org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:85) >>> org.basex.query.expr.ParseExpr.test(ParseExpr.java:98) >>> org.basex.query.expr.Preds.preds(Preds.java:99) >>> org.basex.query.path.IterStep$1.next(IterStep.java:49) >>> org.basex.query.path.AxisPath.iter(AxisPath.java:438) >>> org.basex.query.path.AxisPath.iter(AxisPath.java:408) >>> org.basex.query.QueryContext.iter(QueryContext.java:330) >>> org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) >>> org.basex.query.expr.Let$1.next(Let.java:94) >>> org.basex.query.expr.FLWR$1.next(FLWR.java:62) >>> org.basex.query.iter.Iter.finish(Iter.java:65) >>> org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) >>> org.basex.query.expr.Func.iter(Func.java:99) >>> org.basex.query.QueryContext.iter(QueryContext.java:330) >>> org.basex.query.expr.FuncCall.iter(FuncCall.java:80) >>> org.basex.query.QueryContext.iter(QueryContext.java:330) >>> org.basex.query.QueryContext.iter(QueryContext.java:295) >>> org.basex.query.QueryContext.eval(QueryContext.java:253) >>> org.basex.query.QueryProcessor.execute(QueryProcessor.java:113) >>> org.basex.core.cmd.AQuery.query(AQuery.java:83) >>> org.basex.core.cmd.XQuery.run(XQuery.java:22) >>> org.basex.core.Command.run(Command.java:292) >>> org.basex.core.Command.exec(Command.java:274) >>> org.basex.core.Command.execute(Command.java:67) >>> org.basex.gui.GUI.exec(GUI.java:390) >>> org.basex.gui.GUI$5.run(GUI.java:351) >>> >>> >>> >>> ------------This is the query which throws the above error message ------------------------- >>> import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >>> declare option output:omit-xml-declaration "no"; >>> declare option output:method "xml"; >>> >>> m:getInvoiceSumary(xs:string('279')) >>> >>> >>> >>> -------------This is the update query, as invoked from GUI------------------------ >>> import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >>> declare option output:omit-xml-declaration "no"; >>> declare option output:method "xml"; >>> >>> m:invoiceUpdate(<saf:Invoice >>> xmlns:spi="http://serprest.pt/invoice1" >>> xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" >>> xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> >>> <saf:InvoiceNo>279</saf:InvoiceNo> >>> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> >>> <saf:InvoiceType>Factura</saf:InvoiceType> >>> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> >>> <saf:CustomerID>555561</saf:CustomerID> >>> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> >>> <spi:PayDate></spi:PayDate> >>> <spi:ReceiptID></spi:ReceiptID> >>> <spi:Status>Iniciada</spi:Status> >>> </saf:Invoice>) >>> >>> >>> -------------This is the PERL script with the same update query. Run this script is the the source of problem------------------------ >>> #!/usr/bin/perl >>> use strict; >>> use lib qw|/var/www/serprest/perl/3rd-party|; >>> use BaseXClient; >>> use warnings; >>> >>> eval { >>> my $session = Session->new("localhost", 1984, "serprest", ".prest,ser"); >>> >>> my $q = q| >>> import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >>> declare option output:omit-xml-declaration "no"; >>> declare option output:method "xml"; >>> >>> m:invoiceUpdate(<saf:Invoice >>> xmlns:spi="http://serprest.pt/invoice1" >>> xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" >>> xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> >>> <saf:InvoiceNo>279</saf:InvoiceNo> >>> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> >>> <saf:InvoiceType>Factura</saf:InvoiceType> >>> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> >>> <saf:CustomerID>555561</saf:CustomerID> >>> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> >>> <spi:PayDate></spi:PayDate> >>> <spi:ReceiptID></spi:ReceiptID> >>> <spi:Status>Iniciada</spi:Status> >>> </saf:Invoice>) >>> >>> |; >>> my $query = $session->query($q); >>> $query->init(); >>> print $query->execute(); >>> print $query->info(); >>> $query->close(); >>> $session->close(); >>> }; >>> >>> # print exception >>> print qq|<error>$@</error>| if $@; >>> >>> >>> -----------------This is module which implement the two functions used in the above queries------------------- >>> module namespace x = "http://serprest.pt/invoice/xqm"; >>> declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >>> declare namespace spi="http://serprest.pt/invoice1"; >>> declare namespace fx="http://www.basex.org/file"; >>> declare variable $x:col := collection('invoiceDB'); >>> >>> [... some stuff deleted here ...] >>> declare function x:getInvoiceSumary($invoiceNo as xs:string) as node()? { >>> let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text()=$invoiceNo] >>> return >>> if ($invoice/saf:Line) then >>> copy $c := $invoice >>> modify delete node $c/saf:Line >>> return $c >>> else >>> $invoice >>> }; >>> [... some stuff deleted here ...] >>> declare updating function x:invoiceUpdate($newInvoice as node()){ >>> let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text() = $newInvoice/saf:InvoiceNo/text()] >>> for $p in $newInvoice/* >>> let $target := $invoice/*[name() = name($p)][last()] >>> return >>> if ($target) then >>> replace node $target with $p >>> else >>> insert node $p as last into $invoice >>> }; >>> >>> -------------This is the log----------------------- >>> 08:34:22.513 [127.0.0.1:48542] QUERY(0) import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; declare option output:omit-xml-declaration "no"; declare option output:method "xml"; m:invoiceUpdate(<saf:Invoice xmlns:spi="http://serprest.pt/invoice1" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> <saf:InvoiceNo>279</saf:InvoiceNo> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> <saf:InvoiceType>Factura</saf:InvoiceType> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> <saf:CustomerID>555561</saf:CustomerID> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> <spi:PayDate></spi:PayDate> <spi:ReceiptID></spi:ReceiptID> <spi:Status>Iniciada</spi:Status> </saf:Invoice>) OK >>> 08:34:22.523 [127.0.0.1:48542] QUERY(0) OK >>> 08:34:22.611 [127.0.0.1:48542] INIT(0) OK >>> 08:34:22.612 [127.0.0.1:48542] EXEC(0) OK >>> 08:34:22.613 [127.0.0.1:48542] INFO(0) OK >>> 08:34:22.613 [127.0.0.1:48542] CLOSE(0) OK >>> 08:34:22.615 [127.0.0.1:48542] LOGOUT serprest OK >>> >>> ------------------------------------------------------ >>> >>> If I run the m:getInvoiceSumary(xs:string('279')) again it runs without any error message but it returns a empty result. >>> If I close and open the GUI again the result still be a empty result and if I try to open the DB I get a popup message saying: >>> "Could not execute OPEN invoiceDB: >>> java.lang.IndexOutOfBoundsException" >>> >>> >>> Any help/glue is welcome. >>> >>> Thanks >>> >>> Isidro >>> >>> >>> >>> --- >>> avast! Antivirus: Outbound message clean. >>> Virus Database (VPS): 110330-0, 30-03-2011 >>> Tested on: 30-03-2011 17:11:11 >>> avast! - copyright (c) 1988-2011 AVAST Software. >>> http://www.avast.com >>> >>> >>> >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >> >> --- >> avast! Antivirus: Inbound message clean. >> Virus Database (VPS): 110330-0, 30-03-2011 >> Tested on: 30-03-2011 18:17:54 >> avast! - copyright (c) 1988-2011 AVAST Software. >> http://www.avast.com >> >> >> > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 18:28:25 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
IV
Isidro Vila Verde30 Mar 2011 19:57 #
Yes Andreas, In the last minutes I have been testing all my update queries while mantaining GUI closed and until now I don't find any problem. But I need to continue test it. Thank you. Isidro Em 30-03-2011 18:53, frans@planet escreveu:
Quoted text · frans · 279 lines
> Isidro, > > Do you run your Perl-script when the database is opened in the GUI? I suspect that will cause a corruption. So make sure that the database is closed in the GUI. Run your Perl-script. And then open the database in the GUI to check the results of your script. > > Regards, > Frans > > Op 30 mrt 2011, om 19:28 heeft Isidro Vila Verde het volgende geschreven: > >> Andreas, >> >> If I do that I get the following message: >> >> "Could not execute OPEN invoiceDB: java.lang.IndexOutOfBoundsException" >> >> And if I run the perl script again I get this: >> >> "Not expected (Data Access out of bounds [pre:17508, indexSize:70, access:70> 69]). at /var/www/serprest/perl/3rd-party/BaseXClient.pm line 195" >> >> I really don't know how to workaround this. >> >> Thanks >> >> Isidro >> >> >> >> Em 30-03-2011 18:17, Andreas Weiler escreveu: >>> Hi Isidro, >>> >>> you have to reopen the database in the GUI. >>> >>> -- Andreas >>> >>> Am 30.03.2011 um 18:11 schrieb Isidro Vila Verde: >>> >>>> Hi again, >>>> >>>> This is my (original) problem. >>>> >>>> If I try to run a xquery update from GUI and then try to get the modified XML element everything is ok. >>>> >>>> But if a run the same xquery from a perl script and then go to the GUI, to get the modified XML element I get this error: >>>> >>>> >>>> ------------------------------Error obtained, in GUI, after run the update query from a perl script--------------------------- >>>> Query: import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >>>> declare option output:omit-xml-declaration "no"; >>>> declare option output:method "xml"; >>>> >>>> m:getInvoiceSumary(xs:string('279')) >>>> Error: Possible bug? Your feedback is welcome: >>>> Contact: basex-talk at mailman.uni-konstanz.de >>>> Version: BaseX 6.6 >>>> Java: Sun Microsystems Inc., 1.6.0_20 >>>> OS: Linux, amd64 >>>> Stack Trace: >>>> java.lang.IndexOutOfBoundsException >>>> java.io.RandomAccessFile.readBytes(Native Method) >>>> java.io.RandomAccessFile.read(RandomAccessFile.java:355) >>>> java.io.RandomAccessFile.readFully(RandomAccessFile.java:414) >>>> org.basex.io.DataAccess.cursor(DataAccess.java:225) >>>> org.basex.io.DataAccess.readToken(DataAccess.java:147) >>>> org.basex.data.DiskData.txt(DiskData.java:213) >>>> org.basex.data.DiskData.text(DiskData.java:181) >>>> org.basex.data.Data.atom(Data.java:241) >>>> org.basex.query.item.DBNode.atom(DBNode.java:84) >>>> org.basex.query.item.Str.eq(Str.java:77) >>>> org.basex.query.item.ANode.eq(ANode.java:73) >>>> org.basex.query.expr.CmpV$Op$5.e(CmpV.java:80) >>>> org.basex.query.expr.CmpG.eval(CmpG.java:232) >>>> org.basex.query.expr.CmpG.item(CmpG.java:181) >>>> org.basex.query.expr.CmpG.item(CmpG.java:1) >>>> org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:85) >>>> org.basex.query.expr.ParseExpr.test(ParseExpr.java:98) >>>> org.basex.query.expr.Preds.preds(Preds.java:99) >>>> org.basex.query.path.IterStep$1.next(IterStep.java:49) >>>> org.basex.query.path.AxisPath.iter(AxisPath.java:438) >>>> org.basex.query.path.AxisPath.iter(AxisPath.java:408) >>>> org.basex.query.QueryContext.iter(QueryContext.java:330) >>>> org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) >>>> org.basex.query.expr.Let$1.next(Let.java:94) >>>> org.basex.query.expr.FLWR$1.next(FLWR.java:62) >>>> org.basex.query.iter.Iter.finish(Iter.java:65) >>>> org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) >>>> org.basex.query.expr.Func.iter(Func.java:99) >>>> org.basex.query.QueryContext.iter(QueryContext.java:330) >>>> org.basex.query.expr.FuncCall.iter(FuncCall.java:80) >>>> org.basex.query.QueryContext.iter(QueryContext.java:330) >>>> org.basex.query.QueryContext.iter(QueryContext.java:295) >>>> org.basex.query.QueryContext.eval(QueryContext.java:253) >>>> org.basex.query.QueryProcessor.execute(QueryProcessor.java:113) >>>> org.basex.core.cmd.AQuery.query(AQuery.java:83) >>>> org.basex.core.cmd.XQuery.run(XQuery.java:22) >>>> org.basex.core.Command.run(Command.java:292) >>>> org.basex.core.Command.exec(Command.java:274) >>>> org.basex.core.Command.execute(Command.java:67) >>>> org.basex.gui.GUI.exec(GUI.java:390) >>>> org.basex.gui.GUI$5.run(GUI.java:351) >>>> >>>> >>>> >>>> ------------This is the query which throws the above error message ------------------------- >>>> import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >>>> declare option output:omit-xml-declaration "no"; >>>> declare option output:method "xml"; >>>> >>>> m:getInvoiceSumary(xs:string('279')) >>>> >>>> >>>> >>>> -------------This is the update query, as invoked from GUI------------------------ >>>> import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >>>> declare option output:omit-xml-declaration "no"; >>>> declare option output:method "xml"; >>>> >>>> m:invoiceUpdate(<saf:Invoice >>>> xmlns:spi="http://serprest.pt/invoice1" >>>> xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" >>>> xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> >>>> <saf:InvoiceNo>279</saf:InvoiceNo> >>>> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> >>>> <saf:InvoiceType>Factura</saf:InvoiceType> >>>> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> >>>> <saf:CustomerID>555561</saf:CustomerID> >>>> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> >>>> <spi:PayDate></spi:PayDate> >>>> <spi:ReceiptID></spi:ReceiptID> >>>> <spi:Status>Iniciada</spi:Status> >>>> </saf:Invoice>) >>>> >>>> >>>> -------------This is the PERL script with the same update query. Run this script is the the source of problem------------------------ >>>> #!/usr/bin/perl >>>> use strict; >>>> use lib qw|/var/www/serprest/perl/3rd-party|; >>>> use BaseXClient; >>>> use warnings; >>>> >>>> eval { >>>> my $session = Session->new("localhost", 1984, "serprest", ".prest,ser"); >>>> >>>> my $q = q| >>>> import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >>>> declare option output:omit-xml-declaration "no"; >>>> declare option output:method "xml"; >>>> >>>> m:invoiceUpdate(<saf:Invoice >>>> xmlns:spi="http://serprest.pt/invoice1" >>>> xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" >>>> xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> >>>> <saf:InvoiceNo>279</saf:InvoiceNo> >>>> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> >>>> <saf:InvoiceType>Factura</saf:InvoiceType> >>>> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> >>>> <saf:CustomerID>555561</saf:CustomerID> >>>> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> >>>> <spi:PayDate></spi:PayDate> >>>> <spi:ReceiptID></spi:ReceiptID> >>>> <spi:Status>Iniciada</spi:Status> >>>> </saf:Invoice>) >>>> >>>> |; >>>> my $query = $session->query($q); >>>> $query->init(); >>>> print $query->execute(); >>>> print $query->info(); >>>> $query->close(); >>>> $session->close(); >>>> }; >>>> >>>> # print exception >>>> print qq|<error>$@</error>| if $@; >>>> >>>> >>>> -----------------This is module which implement the two functions used in the above queries------------------- >>>> module namespace x = "http://serprest.pt/invoice/xqm"; >>>> declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >>>> declare namespace spi="http://serprest.pt/invoice1"; >>>> declare namespace fx="http://www.basex.org/file"; >>>> declare variable $x:col := collection('invoiceDB'); >>>> >>>> [... some stuff deleted here ...] >>>> declare function x:getInvoiceSumary($invoiceNo as xs:string) as node()? { >>>> let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text()=$invoiceNo] >>>> return >>>> if ($invoice/saf:Line) then >>>> copy $c := $invoice >>>> modify delete node $c/saf:Line >>>> return $c >>>> else >>>> $invoice >>>> }; >>>> [... some stuff deleted here ...] >>>> declare updating function x:invoiceUpdate($newInvoice as node()){ >>>> let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text() = $newInvoice/saf:InvoiceNo/text()] >>>> for $p in $newInvoice/* >>>> let $target := $invoice/*[name() = name($p)][last()] >>>> return >>>> if ($target) then >>>> replace node $target with $p >>>> else >>>> insert node $p as last into $invoice >>>> }; >>>> >>>> -------------This is the log----------------------- >>>> 08:34:22.513 [127.0.0.1:48542] QUERY(0) import module namespace m = "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; declare option output:omit-xml-declaration "no"; declare option output:method "xml"; m:invoiceUpdate(<saf:Invoice xmlns:spi="http://serprest.pt/invoice1" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> <saf:InvoiceNo>279</saf:InvoiceNo> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> <saf:InvoiceType>Factura</saf:InvoiceType> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> <saf:CustomerID>555561</saf:CustomerID> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> <spi:PayDate></spi:PayDate> <spi:ReceiptID></spi:ReceiptID> <spi:Status>Iniciada</spi:Status> </saf:Invoice>) OK >>>> 08:34:22.523 [127.0.0.1:48542] QUERY(0) OK >>>> 08:34:22.611 [127.0.0.1:48542] INIT(0) OK >>>> 08:34:22.612 [127.0.0.1:48542] EXEC(0) OK >>>> 08:34:22.613 [127.0.0.1:48542] INFO(0) OK >>>> 08:34:22.613 [127.0.0.1:48542] CLOSE(0) OK >>>> 08:34:22.615 [127.0.0.1:48542] LOGOUT serprest OK >>>> >>>> ------------------------------------------------------ >>>> >>>> If I run the m:getInvoiceSumary(xs:string('279')) again it runs without any error message but it returns a empty result. >>>> If I close and open the GUI again the result still be a empty result and if I try to open the DB I get a popup message saying: >>>> "Could not execute OPEN invoiceDB: >>>> java.lang.IndexOutOfBoundsException" >>>> >>>> >>>> Any help/glue is welcome. >>>> >>>> Thanks >>>> >>>> Isidro >>>> >>>> >>>> >>>> --- >>>> avast! Antivirus: Outbound message clean. >>>> Virus Database (VPS): 110330-0, 30-03-2011 >>>> Tested on: 30-03-2011 17:11:11 >>>> avast! - copyright (c) 1988-2011 AVAST Software. >>>> http://www.avast.com >>>> >>>> >>>> >>>> _______________________________________________ >>>> BaseX-Talk mailing list >>>> BaseX-Talk at mailman.uni-konstanz.de >>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >>> --- >>> avast! Antivirus: Inbound message clean. >>> Virus Database (VPS): 110330-0, 30-03-2011 >>> Tested on: 30-03-2011 18:17:54 >>> avast! - copyright (c) 1988-2011 AVAST Software. >>> http://www.avast.com >>> >>> >>> >> >> >> --- >> avast! Antivirus: Outbound message clean. >> Virus Database (VPS): 110330-0, 30-03-2011 >> Tested on: 30-03-2011 18:28:25 >> avast! - copyright (c) 1988-2011 AVAST Software. >> http://www.avast.com >> >> >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > > --- > avast! Antivirus: Inbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 18:53:31 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > >
--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 110330-0, 30-03-2011 Tested on: 30-03-2011 18:57:06 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com
IV
Isidro Vila Verde30 Mar 2011 19:59 #
Sorry Frans, I should say: "Yes Frans" instead of "Yes Andreas" :-) Thank you for your suggestion, Frans. Regards Isidro Em 30-03-2011 18:57, Isidro Vila Verde escreveu:
Quoted text · Isidro Vila Verde · 356 lines
> Yes Andreas, > > In the last minutes I have been testing all my update queries while > mantaining GUI closed and until now I don't find any problem. > > But I need to continue test it. > > Thank you. > > Isidro > > Em 30-03-2011 18:53, frans@planet escreveu: >> Isidro, >> >> Do you run your Perl-script when the database is opened in the GUI? I >> suspect that will cause a corruption. So make sure that the database >> is closed in the GUI. Run your Perl-script. And then open the >> database in the GUI to check the results of your script. >> >> Regards, >> Frans >> >> Op 30 mrt 2011, om 19:28 heeft Isidro Vila Verde het volgende >> geschreven: >> >>> Andreas, >>> >>> If I do that I get the following message: >>> >>> "Could not execute OPEN invoiceDB: >>> java.lang.IndexOutOfBoundsException" >>> >>> And if I run the perl script again I get this: >>> >>> "Not expected (Data Access out of bounds [pre:17508, indexSize:70, >>> access:70> 69]). at >>> /var/www/serprest/perl/3rd-party/BaseXClient.pm line 195" >>> >>> I really don't know how to workaround this. >>> >>> Thanks >>> >>> Isidro >>> >>> >>> >>> Em 30-03-2011 18:17, Andreas Weiler escreveu: >>>> Hi Isidro, >>>> >>>> you have to reopen the database in the GUI. >>>> >>>> -- Andreas >>>> >>>> Am 30.03.2011 um 18:11 schrieb Isidro Vila Verde: >>>> >>>>> Hi again, >>>>> >>>>> This is my (original) problem. >>>>> >>>>> If I try to run a xquery update from GUI and then try to get the >>>>> modified XML element everything is ok. >>>>> >>>>> But if a run the same xquery from a perl script and then go to the >>>>> GUI, to get the modified XML element I get this error: >>>>> >>>>> >>>>> ------------------------------Error obtained, in GUI, after run >>>>> the update query from a perl script--------------------------- >>>>> Query: import module namespace m = >>>>> "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >>>>> declare option output:omit-xml-declaration "no"; >>>>> declare option output:method "xml"; >>>>> >>>>> m:getInvoiceSumary(xs:string('279')) >>>>> Error: Possible bug? Your feedback is welcome: >>>>> Contact: basex-talk at mailman.uni-konstanz.de >>>>> Version: BaseX 6.6 >>>>> Java: Sun Microsystems Inc., 1.6.0_20 >>>>> OS: Linux, amd64 >>>>> Stack Trace: >>>>> java.lang.IndexOutOfBoundsException >>>>> java.io.RandomAccessFile.readBytes(Native Method) >>>>> java.io.RandomAccessFile.read(RandomAccessFile.java:355) >>>>> java.io.RandomAccessFile.readFully(RandomAccessFile.java:414) >>>>> org.basex.io.DataAccess.cursor(DataAccess.java:225) >>>>> org.basex.io.DataAccess.readToken(DataAccess.java:147) >>>>> org.basex.data.DiskData.txt(DiskData.java:213) >>>>> org.basex.data.DiskData.text(DiskData.java:181) >>>>> org.basex.data.Data.atom(Data.java:241) >>>>> org.basex.query.item.DBNode.atom(DBNode.java:84) >>>>> org.basex.query.item.Str.eq(Str.java:77) >>>>> org.basex.query.item.ANode.eq(ANode.java:73) >>>>> org.basex.query.expr.CmpV$Op$5.e(CmpV.java:80) >>>>> org.basex.query.expr.CmpG.eval(CmpG.java:232) >>>>> org.basex.query.expr.CmpG.item(CmpG.java:181) >>>>> org.basex.query.expr.CmpG.item(CmpG.java:1) >>>>> org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:85) >>>>> org.basex.query.expr.ParseExpr.test(ParseExpr.java:98) >>>>> org.basex.query.expr.Preds.preds(Preds.java:99) >>>>> org.basex.query.path.IterStep$1.next(IterStep.java:49) >>>>> org.basex.query.path.AxisPath.iter(AxisPath.java:438) >>>>> org.basex.query.path.AxisPath.iter(AxisPath.java:408) >>>>> org.basex.query.QueryContext.iter(QueryContext.java:330) >>>>> org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) >>>>> org.basex.query.expr.Let$1.next(Let.java:94) >>>>> org.basex.query.expr.FLWR$1.next(FLWR.java:62) >>>>> org.basex.query.iter.Iter.finish(Iter.java:65) >>>>> org.basex.query.expr.ParseExpr.value(ParseExpr.java:76) >>>>> org.basex.query.expr.Func.iter(Func.java:99) >>>>> org.basex.query.QueryContext.iter(QueryContext.java:330) >>>>> org.basex.query.expr.FuncCall.iter(FuncCall.java:80) >>>>> org.basex.query.QueryContext.iter(QueryContext.java:330) >>>>> org.basex.query.QueryContext.iter(QueryContext.java:295) >>>>> org.basex.query.QueryContext.eval(QueryContext.java:253) >>>>> org.basex.query.QueryProcessor.execute(QueryProcessor.java:113) >>>>> org.basex.core.cmd.AQuery.query(AQuery.java:83) >>>>> org.basex.core.cmd.XQuery.run(XQuery.java:22) >>>>> org.basex.core.Command.run(Command.java:292) >>>>> org.basex.core.Command.exec(Command.java:274) >>>>> org.basex.core.Command.execute(Command.java:67) >>>>> org.basex.gui.GUI.exec(GUI.java:390) >>>>> org.basex.gui.GUI$5.run(GUI.java:351) >>>>> >>>>> >>>>> >>>>> ------------This is the query which throws the above error message >>>>> ------------------------- >>>>> import module namespace m = "http://serprest.pt/invoice/xqm" at >>>>> "http://localhost/xq/m.xqm"; >>>>> declare option output:omit-xml-declaration "no"; >>>>> declare option output:method "xml"; >>>>> >>>>> m:getInvoiceSumary(xs:string('279')) >>>>> >>>>> >>>>> >>>>> -------------This is the update query, as invoked from >>>>> GUI------------------------ >>>>> import module namespace m = "http://serprest.pt/invoice/xqm" at >>>>> "http://localhost/xq/m.xqm"; >>>>> declare option output:omit-xml-declaration "no"; >>>>> declare option output:method "xml"; >>>>> >>>>> m:invoiceUpdate(<saf:Invoice >>>>> xmlns:spi="http://serprest.pt/invoice1" >>>>> xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" >>>>> xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> >>>>> <saf:InvoiceNo>279</saf:InvoiceNo> >>>>> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> >>>>> <saf:InvoiceType>Factura</saf:InvoiceType> >>>>> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> >>>>> >>>>> <saf:CustomerID>555561</saf:CustomerID> >>>>> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> >>>>> <spi:PayDate></spi:PayDate> >>>>> <spi:ReceiptID></spi:ReceiptID> >>>>> <spi:Status>Iniciada</spi:Status> >>>>> </saf:Invoice>) >>>>> >>>>> >>>>> -------------This is the PERL script with the same update query. >>>>> Run this script is the the source of problem------------------------ >>>>> #!/usr/bin/perl >>>>> use strict; >>>>> use lib qw|/var/www/serprest/perl/3rd-party|; >>>>> use BaseXClient; >>>>> use warnings; >>>>> >>>>> eval { >>>>> my $session = Session->new("localhost", 1984, "serprest", >>>>> ".prest,ser"); >>>>> >>>>> my $q = q| >>>>> import module namespace m = >>>>> "http://serprest.pt/invoice/xqm" at "http://localhost/xq/m.xqm"; >>>>> declare option output:omit-xml-declaration "no"; >>>>> declare option output:method "xml"; >>>>> >>>>> m:invoiceUpdate(<saf:Invoice >>>>> xmlns:spi="http://serprest.pt/invoice1" >>>>> xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" >>>>> xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> >>>>> <saf:InvoiceNo>279</saf:InvoiceNo> >>>>> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> >>>>> <saf:InvoiceType>Factura</saf:InvoiceType> >>>>> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> >>>>> >>>>> <saf:CustomerID>555561</saf:CustomerID> >>>>> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> >>>>> <spi:PayDate></spi:PayDate> >>>>> <spi:ReceiptID></spi:ReceiptID> >>>>> <spi:Status>Iniciada</spi:Status> >>>>> </saf:Invoice>) >>>>> >>>>> |; >>>>> my $query = $session->query($q); >>>>> $query->init(); >>>>> print $query->execute(); >>>>> print $query->info(); >>>>> $query->close(); >>>>> $session->close(); >>>>> }; >>>>> >>>>> # print exception >>>>> print qq|<error>$@</error>| if $@; >>>>> >>>>> >>>>> -----------------This is module which implement the two functions >>>>> used in the above queries------------------- >>>>> module namespace x = "http://serprest.pt/invoice/xqm"; >>>>> declare namespace saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"; >>>>> declare namespace spi="http://serprest.pt/invoice1"; >>>>> declare namespace fx="http://www.basex.org/file"; >>>>> declare variable $x:col := collection('invoiceDB'); >>>>> >>>>> [... some stuff deleted here ...] >>>>> declare function x:getInvoiceSumary($invoiceNo as xs:string) as >>>>> node()? { >>>>> let $invoice := >>>>> $x:col/saf:Invoice[saf:InvoiceNo/text()=$invoiceNo] >>>>> return >>>>> if ($invoice/saf:Line) then >>>>> copy $c := $invoice >>>>> modify delete node $c/saf:Line >>>>> return $c >>>>> else >>>>> $invoice >>>>> }; >>>>> [... some stuff deleted here ...] >>>>> declare updating function x:invoiceUpdate($newInvoice as node()){ >>>>> let $invoice := $x:col/saf:Invoice[saf:InvoiceNo/text() = >>>>> $newInvoice/saf:InvoiceNo/text()] >>>>> for $p in $newInvoice/* >>>>> let $target := $invoice/*[name() = name($p)][last()] >>>>> return >>>>> if ($target) then >>>>> replace node $target with $p >>>>> else >>>>> insert node $p as last into $invoice >>>>> }; >>>>> >>>>> -------------This is the log----------------------- >>>>> 08:34:22.513 [127.0.0.1:48542] QUERY(0) import >>>>> module namespace m = "http://serprest.pt/invoice/xqm" at >>>>> "http://localhost/xq/m.xqm"; declare option >>>>> output:omit-xml-declaration "no"; declare option >>>>> output:method "xml"; m:invoiceUpdate(<saf:Invoice >>>>> xmlns:spi="http://serprest.pt/invoice1" xmlns:xsi = >>>>> "http://www.w3.org/2001/XMLSchema-instance" >>>>> xmlns:saf="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"> >>>>> <saf:InvoiceNo>279</saf:InvoiceNo> >>>>> <saf:InvoiceDate>2011-01-27</saf:InvoiceDate> >>>>> <saf:InvoiceType>Factura</saf:InvoiceType> >>>>> <!--saf:SystemEntryDate>2011-01-27T20:31:32.212Z</saf:SystemEntryDate--> >>>>> <saf:CustomerID>555561</saf:CustomerID> >>>>> <spi:PayDateExpected>2011-02-27</spi:PayDateExpected> >>>>> <spi:PayDate></spi:PayDate> <spi:ReceiptID></spi:ReceiptID> >>>>> <spi:Status>Iniciada</spi:Status> </saf:Invoice>) OK >>>>> 08:34:22.523 [127.0.0.1:48542] QUERY(0) OK >>>>> 08:34:22.611 [127.0.0.1:48542] INIT(0) OK >>>>> 08:34:22.612 [127.0.0.1:48542] EXEC(0) OK >>>>> 08:34:22.613 [127.0.0.1:48542] INFO(0) OK >>>>> 08:34:22.613 [127.0.0.1:48542] CLOSE(0) OK >>>>> 08:34:22.615 [127.0.0.1:48542] LOGOUT serprest OK >>>>> >>>>> ------------------------------------------------------ >>>>> >>>>> If I run the m:getInvoiceSumary(xs:string('279')) again it runs >>>>> without any error message but it returns a empty result. >>>>> If I close and open the GUI again the result still be a empty >>>>> result and if I try to open the DB I get a popup message saying: >>>>> "Could not execute OPEN invoiceDB: >>>>> java.lang.IndexOutOfBoundsException" >>>>> >>>>> >>>>> Any help/glue is welcome. >>>>> >>>>> Thanks >>>>> >>>>> Isidro >>>>> >>>>> >>>>> >>>>> --- >>>>> avast! Antivirus: Outbound message clean. >>>>> Virus Database (VPS): 110330-0, 30-03-2011 >>>>> Tested on: 30-03-2011 17:11:11 >>>>> avast! - copyright (c) 1988-2011 AVAST Software. >>>>> http://www.avast.com >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> BaseX-Talk mailing list >>>>> BaseX-Talk at mailman.uni-konstanz.de >>>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>>> >>>> --- >>>> avast! Antivirus: Inbound message clean. >>>> Virus Database (VPS): 110330-0, 30-03-2011 >>>> Tested on: 30-03-2011 18:17:54 >>>> avast! - copyright (c) 1988-2011 AVAST Software. >>>> http://www.avast.com >>>> >>>> >>>> >>> >>> >>> --- >>> avast! Antivirus: Outbound message clean. >>> Virus Database (VPS): 110330-0, 30-03-2011 >>> Tested on: 30-03-2011 18:28:25 >>> avast! - copyright (c) 1988-2011 AVAST Software. >>> http://www.avast.com >>> >>> >>> >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >> >> --- >> avast! Antivirus: Inbound message clean. >> Virus Database (VPS): 110330-0, 30-03-2011 >> Tested on: 30-03-2011 18:53:31 >> avast! - copyright (c) 1988-2011 AVAST Software. >> http://www.avast.com >> >> >> > > > > > --- > avast! Antivirus: Outbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 18:57:06 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > > > > > --- > avast! Antivirus: Inbound message clean. > Virus Database (VPS): 110330-0, 30-03-2011 > Tested on: 30-03-2011 18:57:55 > avast! - copyright (c) 1988-2011 AVAST Software. > http://www.avast.com > > >
--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 110330-0, 30-03-2011 Tested on: 30-03-2011 18:59:31 avast! - copyright (c) 1988-2011 AVAST Software. http://www.avast.com

⚡Generated with XQuery