Reg : Over Laping Exception

Thursday, 28 August 2014 · 6 messages · last reply 29 Aug 2014
C
Chandrasekhar28 Aug 2014 14:40 #
Dear Team We are getting the below exception wen xquery executing.Please do the needful
                                    org.basex.core.BaseXException: Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk at mailman.uni-konstanz.de
Version: BaseX 7.9
Java: Oracle Corporation, 1.7.0_07
OS: Windows 7, x86
Stack Trace:
java.nio.channels.OverlappingFileLockException
    at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
    at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
    at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1017)
    at org.basex.io.random.TableDiskAccess.lck(TableDiskAccess.java:188)
    at org.basex.io.random.TableDiskAccess.sharedLock(TableDiskAccess.java:175)
    at org.basex.io.random.TableDiskAccess.<init>(TableDiskAccess.java:88)
    at org.basex.data.DiskData.init(DiskData.java:122)
    at org.basex.data.DiskData.<init>(DiskData.java:92)
    at org.basex.core.cmd.Open.open(Open.java:68)
    at org.basex.query.QueryResources.open(QueryResources.java:263)
The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.
CG
Christian Grün28 Aug 2014 15:09 #
Dear Chandrasehkar, this error message can usually be derived to an unorthodox way of using our APIs, or mixing direct and server-side access to BaseX. Could you please give us more feedback on how the error was triggered? Best, Christian
Quoted text · Chandrasekhar · 37 lines
On Thu, Aug 28, 2014 at 2:40 PM, Chandrasekhar <chandrasekhar.r at intense.in> wrote: > Dear Team > > We are getting the below exception wen xquery > executing.Please do the needful > > > org.basex.core.BaseXException: Improper > use? Potential bug? Your feedback is welcome: > Contact: basex-talk at mailman.uni-konstanz.de > Version: BaseX 7.9 > Java: Oracle Corporation, 1.7.0_07 > OS: Windows 7, x86 > Stack Trace: > java.nio.channels.OverlappingFileLockException > at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) > at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152) > at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1017) > at org.basex.io.random.TableDiskAccess.lck(TableDiskAccess.java:188) > at > org.basex.io.random.TableDiskAccess.sharedLock(TableDiskAccess.java:175) > at org.basex.io.random.TableDiskAccess.<init>(TableDiskAccess.java:88) > at org.basex.data.DiskData.init(DiskData.java:122) > at org.basex.data.DiskData.<init>(DiskData.java:92) > at org.basex.core.cmd.Open.open(Open.java:68) > at org.basex.query.QueryResources.open(QueryResources.java:263) > > > The information contained in this e-mail and any accompanying documents may > contain information that is confidential or otherwise protected from > disclosure. If you are not the intended recipient of this message, or if > this message has been addressed to you in error, please immediately alert > the sender by reply e-mail and then delete this message, including any > attachments. Any dissemination, distribution or other use of the contents of > this message by anyone other than the intended recipient is strictly > prohibited.
C
Chandrasekhar28 Aug 2014 15:32 #
Dear Team When i querying on same collection at same time(multiple hits) i am getting this probelm.To run the query we are using the below steps.
                        Context context = new Context();
                         context.globalopts.set(GlobalOptions.DBPATH,"DBPATH");
                         String result = new XQuery(query).execute(context);
                         context.close();
Thanks & Regards Chandra Sekhar
Quoted text · Christian Grün · 49 lines
From: Christian Grün <christian.gruen at gmail.com> Sent: Thursday, August 28, 2014 6:39 PM To: Chandrasekhar Cc: basex-talk at mailman.uni-konstanz.de Subject: Re: [basex-talk] Reg : Over Laping Exception Dear Chandrasehkar, this error message can usually be derived to an unorthodox way of using our APIs, or mixing direct and server-side access to BaseX. Could you please give us more feedback on how the error was triggered? Best, Christian On Thu, Aug 28, 2014 at 2:40 PM, Chandrasekhar <chandrasekhar.r at intense.in> wrote: > Dear Team > > We are getting the below exception wen xquery > executing.Please do the needful > > > org.basex.core.BaseXException: Improper > use? Potential bug? Your feedback is welcome: > Contact: basex-talk at mailman.uni-konstanz.de > Version: BaseX 7.9 > Java: Oracle Corporation, 1.7.0_07 > OS: Windows 7, x86 > Stack Trace: > java.nio.channels.OverlappingFileLockException > at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) > at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152) > at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1017) > at org.basex.io.random.TableDiskAccess.lck(TableDiskAccess.java:188) > at > org.basex.io.random.TableDiskAccess.sharedLock(TableDiskAccess.java:175) > at org.basex.io.random.TableDiskAccess.<init>(TableDiskAccess.java:88) > at org.basex.data.DiskData.init(DiskData.java:122) > at org.basex.data.DiskData.<init>(DiskData.java:92) > at org.basex.core.cmd.Open.open(Open.java:68) > at org.basex.query.QueryResources.open(QueryResources.java:263) > > > The information contained in this e-mail and any accompanying documents may > contain information that is confidential or otherwise protected from > disclosure. If you are not the intended recipient of this message, or if > this message has been addressed to you in error, please immediately alert > the sender by reply e-mail and then delete this message, including any > attachments. Any dissemination, distribution or other use of the contents of > this message by anyone other than the intended recipient is strictly > prohibited. The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.
CG
Christian Grün28 Aug 2014 16:03 #
Dear Chandra, Please use the client/server architecture of BaseX if you want to run multiple queries in parallel. After all, it's also possible to do multiple queries without a running server instance, but it's usually not possible to make it work without spending more time with the BaseX code. Please take your time and have a look at our documentation, it should give you some more instructions (e.g. [1,2,3]). All the best, Christian [1] http://docs.basex.org/wiki/Startup [2] http://docs.basex.org/wiki/Transactions [3] http://docs.basex.org/wiki/Clients
Quoted text · Chandrasekhar · 69 lines
On Thu, Aug 28, 2014 at 3:32 PM, Chandrasekhar <chandrasekhar.r at intense.in> wrote: > Dear Team > > When i querying on same collection at same time(multiple hits) i am getting this probelm.To run the query we are using the below steps. > > Context context = new Context(); > context.globalopts.set(GlobalOptions.DBPATH,"DBPATH"); > String result = new XQuery(query).execute(context); > context.close(); > > > Thanks & Regards > Chandra Sekhar > ________________________________________ > From: Christian Grün <christian.gruen at gmail.com> > Sent: Thursday, August 28, 2014 6:39 PM > To: Chandrasekhar > Cc: basex-talk at mailman.uni-konstanz.de > Subject: Re: [basex-talk] Reg : Over Laping Exception > > Dear Chandrasehkar, > > this error message can usually be derived to an unorthodox way of > using our APIs, or mixing direct and server-side access to BaseX. > Could you please give us more feedback on how the error was triggered? > > Best, > Christian > > > On Thu, Aug 28, 2014 at 2:40 PM, Chandrasekhar > <chandrasekhar.r at intense.in> wrote: >> Dear Team >> >> We are getting the below exception wen xquery >> executing.Please do the needful >> >> >> org.basex.core.BaseXException: Improper >> use? Potential bug? Your feedback is welcome: >> Contact: basex-talk at mailman.uni-konstanz.de >> Version: BaseX 7.9 >> Java: Oracle Corporation, 1.7.0_07 >> OS: Windows 7, x86 >> Stack Trace: >> java.nio.channels.OverlappingFileLockException >> at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) >> at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152) >> at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1017) >> at org.basex.io.random.TableDiskAccess.lck(TableDiskAccess.java:188) >> at >> org.basex.io.random.TableDiskAccess.sharedLock(TableDiskAccess.java:175) >> at org.basex.io.random.TableDiskAccess.<init>(TableDiskAccess.java:88) >> at org.basex.data.DiskData.init(DiskData.java:122) >> at org.basex.data.DiskData.<init>(DiskData.java:92) >> at org.basex.core.cmd.Open.open(Open.java:68) >> at org.basex.query.QueryResources.open(QueryResources.java:263) >> >> >> The information contained in this e-mail and any accompanying documents may >> contain information that is confidential or otherwise protected from >> disclosure. If you are not the intended recipient of this message, or if >> this message has been addressed to you in error, please immediately alert >> the sender by reply e-mail and then delete this message, including any >> attachments. Any dissemination, distribution or other use of the contents of >> this message by anyone other than the intended recipient is strictly >> prohibited. > The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.
C
Chandrasekhar29 Aug 2014 07:36 #
Dear Christian I gone through the links which you are given in below mail , i used GLOBAL LOCK(true) and PARALLEL(1) option in my code ,but i am getting same exception(overlapping file) . Dear Christian at this time i cant change it to the client server architecture,please do the needful. Thanks & Regards Chandra Sekhar
Quoted text · Christian Grün · 88 lines
From: Christian Grün <christian.gruen at gmail.com> Sent: Thursday, August 28, 2014 7:33 PM To: Chandrasekhar Cc: basex-talk at mailman.uni-konstanz.de Subject: Re: [basex-talk] Reg : Over Laping Exception Dear Chandra, Please use the client/server architecture of BaseX if you want to run multiple queries in parallel. After all, it's also possible to do multiple queries without a running server instance, but it's usually not possible to make it work without spending more time with the BaseX code. Please take your time and have a look at our documentation, it should give you some more instructions (e.g. [1,2,3]). All the best, Christian [1] http://docs.basex.org/wiki/Startup [2] http://docs.basex.org/wiki/Transactions [3] http://docs.basex.org/wiki/Clients On Thu, Aug 28, 2014 at 3:32 PM, Chandrasekhar <chandrasekhar.r at intense.in> wrote: > Dear Team > > When i querying on same collection at same time(multiple hits) i am getting this probelm.To run the query we are using the below steps. > > Context context = new Context(); > context.globalopts.set(GlobalOptions.DBPATH,"DBPATH"); > String result = new XQuery(query).execute(context); > context.close(); > > > Thanks & Regards > Chandra Sekhar > ________________________________________ > From: Christian Grün <christian.gruen at gmail.com> > Sent: Thursday, August 28, 2014 6:39 PM > To: Chandrasekhar > Cc: basex-talk at mailman.uni-konstanz.de > Subject: Re: [basex-talk] Reg : Over Laping Exception > > Dear Chandrasehkar, > > this error message can usually be derived to an unorthodox way of > using our APIs, or mixing direct and server-side access to BaseX. > Could you please give us more feedback on how the error was triggered? > > Best, > Christian > > > On Thu, Aug 28, 2014 at 2:40 PM, Chandrasekhar > <chandrasekhar.r at intense.in> wrote: >> Dear Team >> >> We are getting the below exception wen xquery >> executing.Please do the needful >> >> >> org.basex.core.BaseXException: Improper >> use? Potential bug? Your feedback is welcome: >> Contact: basex-talk at mailman.uni-konstanz.de >> Version: BaseX 7.9 >> Java: Oracle Corporation, 1.7.0_07 >> OS: Windows 7, x86 >> Stack Trace: >> java.nio.channels.OverlappingFileLockException >> at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) >> at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152) >> at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1017) >> at org.basex.io.random.TableDiskAccess.lck(TableDiskAccess.java:188) >> at >> org.basex.io.random.TableDiskAccess.sharedLock(TableDiskAccess.java:175) >> at org.basex.io.random.TableDiskAccess.<init>(TableDiskAccess.java:88) >> at org.basex.data.DiskData.init(DiskData.java:122) >> at org.basex.data.DiskData.<init>(DiskData.java:92) >> at org.basex.core.cmd.Open.open(Open.java:68) >> at org.basex.query.QueryResources.open(QueryResources.java:263) >> >> >> The information contained in this e-mail and any accompanying documents may >> contain information that is confidential or otherwise protected from >> disclosure. If you are not the intended recipient of this message, or if >> this message has been addressed to you in error, please immediately alert >> the sender by reply e-mail and then delete this message, including any >> attachments. Any dissemination, distribution or other use of the contents of >> this message by anyone other than the intended recipient is strictly >> prohibited. > The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.
CG
Christian Grün29 Aug 2014 12:21 #
Hi Chandra, as indicated in my last mail, you'll need to invest some more time with the BaseX sources. I assume you are creating several instances of the Context instance via the default constructor. Its documentation states that this is only allowed once in the lifetime of a project [1]. If you want to take this further, you could have a look into the ClientListener [2] or LocalSession [3] classes, which are passing on a central Context instance. You could also check out the JUnit testing code in the basex and basex-tests directories. Best, Christian [1] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/core/Context.java#L68 [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/server/ClientListener.java [3] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/api/client/LocalSession.java
Quoted text · Chandrasekhar · 108 lines
On Fri, Aug 29, 2014 at 7:36 AM, Chandrasekhar <chandrasekhar.r at intense.in> wrote: > Dear Christian > > I gone through the links which you are given in below mail , i used GLOBAL LOCK(true) and PARALLEL(1) option in my code ,but i am getting same exception(overlapping file) . > > Dear Christian at this time i cant change it to the client server architecture,please do the needful. > > Thanks & Regards > Chandra Sekhar > > > ________________________________________ > From: Christian Grün <christian.gruen at gmail.com> > Sent: Thursday, August 28, 2014 7:33 PM > To: Chandrasekhar > Cc: basex-talk at mailman.uni-konstanz.de > Subject: Re: [basex-talk] Reg : Over Laping Exception > > Dear Chandra, > > Please use the client/server architecture of BaseX if you want to run > multiple queries in parallel. After all, it's also possible to do > multiple queries without a running server instance, but it's usually > not possible to make it work without spending more time with the BaseX > code. > > Please take your time and have a look at our documentation, it should > give you some more instructions (e.g. [1,2,3]). > > All the best, > Christian > > [1] http://docs.basex.org/wiki/Startup > [2] http://docs.basex.org/wiki/Transactions > [3] http://docs.basex.org/wiki/Clients > > > On Thu, Aug 28, 2014 at 3:32 PM, Chandrasekhar > <chandrasekhar.r at intense.in> wrote: >> Dear Team >> >> When i querying on same collection at same time(multiple hits) i am getting this probelm.To run the query we are using the below steps. >> >> Context context = new Context(); >> context.globalopts.set(GlobalOptions.DBPATH,"DBPATH"); >> String result = new XQuery(query).execute(context); >> context.close(); >> >> >> Thanks & Regards >> Chandra Sekhar >> ________________________________________ >> From: Christian Grün <christian.gruen at gmail.com> >> Sent: Thursday, August 28, 2014 6:39 PM >> To: Chandrasekhar >> Cc: basex-talk at mailman.uni-konstanz.de >> Subject: Re: [basex-talk] Reg : Over Laping Exception >> >> Dear Chandrasehkar, >> >> this error message can usually be derived to an unorthodox way of >> using our APIs, or mixing direct and server-side access to BaseX. >> Could you please give us more feedback on how the error was triggered? >> >> Best, >> Christian >> >> >> On Thu, Aug 28, 2014 at 2:40 PM, Chandrasekhar >> <chandrasekhar.r at intense.in> wrote: >>> Dear Team >>> >>> We are getting the below exception wen xquery >>> executing.Please do the needful >>> >>> >>> org.basex.core.BaseXException: Improper >>> use? Potential bug? Your feedback is welcome: >>> Contact: basex-talk at mailman.uni-konstanz.de >>> Version: BaseX 7.9 >>> Java: Oracle Corporation, 1.7.0_07 >>> OS: Windows 7, x86 >>> Stack Trace: >>> java.nio.channels.OverlappingFileLockException >>> at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255) >>> at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152) >>> at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1017) >>> at org.basex.io.random.TableDiskAccess.lck(TableDiskAccess.java:188) >>> at >>> org.basex.io.random.TableDiskAccess.sharedLock(TableDiskAccess.java:175) >>> at org.basex.io.random.TableDiskAccess.<init>(TableDiskAccess.java:88) >>> at org.basex.data.DiskData.init(DiskData.java:122) >>> at org.basex.data.DiskData.<init>(DiskData.java:92) >>> at org.basex.core.cmd.Open.open(Open.java:68) >>> at org.basex.query.QueryResources.open(QueryResources.java:263) >>> >>> >>> The information contained in this e-mail and any accompanying documents may >>> contain information that is confidential or otherwise protected from >>> disclosure. If you are not the intended recipient of this message, or if >>> this message has been addressed to you in error, please immediately alert >>> the sender by reply e-mail and then delete this message, including any >>> attachments. Any dissemination, distribution or other use of the contents of >>> this message by anyone other than the intended recipient is strictly >>> prohibited. >> The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited. > The information contained in this e-mail and any accompanying documents may contain information that is confidential or otherwise protected from disclosure. If you are not the intended recipient of this message, or if this message has been addressed to you in error, please immediately alert the sender by reply e-mail and then delete this message, including any attachments. Any dissemination, distribution or other use of the contents of this message by anyone other than the intended recipient is strictly prohibited.

⚡Generated with XQuery