Reg : NegativeArraySizeException
Thursday, 27 November 2014 · 5 messages · last reply 4 Dec 2014
C
Chandrasekhar27 Nov 2014 07:04 #
Dear Team
we are getting the below issue while opening database and replacing the file to the database.Please guide us to resolve the issue.
We are using below code to replace the file.
Context context = new Context();
LocalSession ls = new LocalSession(context);
ls.execute("OPEN DBNAME");
ls.replace("FILENAME",new FileInputStream("FILEPATH"));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: Sun Microsystems Inc., 1.6.0_30
OS: Linux, amd64
Stack Trace:
java.lang.NegativeArraySizeException
at org.basex.io.random.DataAccess.readBytes(DataAccess.java:216)
at org.basex.io.random.DataAccess.readToken(DataAccess.java:194)
at org.basex.io.random.DataAccess.readToken(DataAccess.java:185)
at org.basex.data.DiskData.txt(DiskData.java:267)
at org.basex.data.DiskData.text(DiskData.java:235)
at org.basex.index.resource.Docs.paths(Docs.java:106)
at org.basex.index.resource.Docs.docs(Docs.java:229)
at org.basex.index.resource.Resources.docs(Resources.java:120)
at org.basex.core.cmd.Replace.run(Replace.java:51)
at org.basex.core.Command.run(Command.java:329)
at org.basex.core.Command.execute(Command.java:94)
at org.basex.core.Command.execute(Command.java:117)
at org.basex.server.LocalSession.execute(LocalSession.java:96)
at org.basex.server.LocalSession.replace(LocalSession.java:80)
at com.in10s.collectioncreation.CRSXMLDBManager.createCollection(CRSXMLDBManager.java:183)
at com.in10s.collectioncreation.CRSCollectionCreator.main(CRSCollectionCreator.java:138)
at com.in10s.filewatcher.CRSFileWatcher.main(CRSFileWatcher.java:52)Thanks&Regards
ChandraSekhar
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
Chandrasekhar27 Nov 2014 13:47 #
Dear Team
we are getting the below issue while opening database and replacing the file to the database.Please guide us to resolve the issue.
We are using below code to replace the file.
Context context = new Context();
LocalSession ls = new LocalSession(context);
ls.execute("OPEN DBNAME");
ls.replace("FILENAME",new FileInputStream("FILEPATH"));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: Sun Microsystems Inc., 1.6.0_30
OS: Linux, amd64
Stack Trace:
java.lang.NegativeArraySizeException
at org.basex.io.random.DataAccess.readBytes(DataAccess.java:216)
at org.basex.io.random.DataAccess.readToken(DataAccess.java:194)
at org.basex.io.random.DataAccess.readToken(DataAccess.java:185)
at org.basex.data.DiskData.txt(DiskData.java:267)
at org.basex.data.DiskData.text(DiskData.java:235)
at org.basex.index.resource.Docs.paths(Docs.java:106)
at org.basex.index.resource.Docs.docs(Docs.java:229)
at org.basex.index.resource.Resources.docs(Resources.java:120)
at org.basex.core.cmd.Replace.run(Replace.java:51)
at org.basex.core.Command.run(Command.java:329)
at org.basex.core.Command.execute(Command.java:94)
at org.basex.core.Command.execute(Command.java:117)
at org.basex.server.LocalSession.execute(LocalSession.java:96)
at org.basex.server.LocalSession.replace(LocalSession.java:80)
at com.in10s.collectioncreation.CRSXMLDBManager.createCollection(CRSXMLDBManager.java:183)
at com.in10s.collectioncreation.CRSCollectionCreator.main(CRSCollectionCreator.java:138)
at com.in10s.filewatcher.CRSFileWatcher.main(CRSFileWatcher.java:52)Thanks&Regards
ChandraSekhar
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ün27 Nov 2014 13:53 #
Hi ChandraSekhar,
We have received your mail (see [1]). To guide you, we need more information. Do you have documents that allow us to reproduce the issue? Have you interrupted running update operations? What output does the BaseX INSPECT command give you?
Christian
[1] http://www.mail-archive.com/basex-talk%40mailman.uni-konstanz.de/
Quoted text · Chandrasekhar · 59 lines
On Thu, Nov 27, 2014 at 1:47 PM, Chandrasekhar <chandrasekhar.r at intense.in> wrote: > > Dear Team > > > we are getting the below issue while opening database and replacing the file to the database.Please guide us to resolve the issue. > > > We are using below code to replace the file. > > > > > > Context context = new Context(); > > LocalSession ls = new LocalSession(context); > > > ls.execute("OPEN DBNAME"); > ls.replace("FILENAME",new FileInputStream("FILEPATH")); > > > > > > > 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: Sun Microsystems Inc., 1.6.0_30 > OS: Linux, amd64 > Stack Trace: > java.lang.NegativeArraySizeException > at org.basex.io.random.DataAccess.readBytes(DataAccess.java:216) > at org.basex.io.random.DataAccess.readToken(DataAccess.java:194) > at org.basex.io.random.DataAccess.readToken(DataAccess.java:185) > at org.basex.data.DiskData.txt(DiskData.java:267) > at org.basex.data.DiskData.text(DiskData.java:235) > at org.basex.index.resource.Docs.paths(Docs.java:106) > at org.basex.index.resource.Docs.docs(Docs.java:229) > at org.basex.index.resource.Resources.docs(Resources.java:120) > at org.basex.core.cmd.Replace.run(Replace.java:51) > at org.basex.core.Command.run(Command.java:329) > at org.basex.core.Command.execute(Command.java:94) > at org.basex.core.Command.execute(Command.java:117) > at org.basex.server.LocalSession.execute(LocalSession.java:96) > at org.basex.server.LocalSession.replace(LocalSession.java:80) > at com.in10s.collectioncreation.CRSXMLDBManager.createCollection(CRSXMLDBManager.java:183) > at com.in10s.collectioncreation.CRSCollectionCreator.main(CRSCollectionCreator.java:138) > at com.in10s.filewatcher.CRSFileWatcher.main(CRSFileWatcher.java:52) > > > Thanks&Regards > > ChandraSekhar > > 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
Chandrasekhar4 Dec 2014 11:32 #
Dear Christian
After giving the i nspect command i got below message
Quoted text · Christian Grün · 1 line
> inspect
Checking main table (211178460 nodes):
- 0 invalid node kinds
- 0 invalid parent references
- 15 wrong parent/descendant relationships (pre: 60149343,.
Warning: Database is inconsistent.
'3860_Voice_NOVEMBER-14_Billed' inspected in 205991.48 ms.
How can i found the wrong wrong relationships from the collection,please guide me
Thanks&Regards
ChandraSekhar
________________________________________
Hi ChandraSekhar,
We have received your mail (see [1]). To guide you, we need more information. Do you have documents that allow us to reproduce the issue? Have you interrupted running update operations? What output does the BaseX INSPECT command give you?
Christian
[1] http://www.mail-archive.com/basex-talk%40mailman.uni-konstanz.de/
Quoted text · Chandrasekhar · 59 lines
On Thu, Nov 27, 2014 at 1:47 PM, Chandrasekhar <chandrasekhar.r at intense.in> wrote: > > Dear Team > > > we are getting the below issue while opening database and replacing the file to the database.Please guide us to resolve the issue. > > > We are using below code to replace the file. > > > > > > Context context = new Context(); > > LocalSession ls = new LocalSession(context); > > > ls.execute("OPEN DBNAME"); > ls.replace("FILENAME",new FileInputStream("FILEPATH")); > > > > > > > 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: Sun Microsystems Inc., 1.6.0_30 > OS: Linux, amd64 > Stack Trace: > java.lang.NegativeArraySizeException > at org.basex.io.random.DataAccess.readBytes(DataAccess.java:216) > at org.basex.io.random.DataAccess.readToken(DataAccess.java:194) > at org.basex.io.random.DataAccess.readToken(DataAccess.java:185) > at org.basex.data.DiskData.txt(DiskData.java:267) > at org.basex.data.DiskData.text(DiskData.java:235) > at org.basex.index.resource.Docs.paths(Docs.java:106) > at org.basex.index.resource.Docs.docs(Docs.java:229) > at org.basex.index.resource.Resources.docs(Resources.java:120) > at org.basex.core.cmd.Replace.run(Replace.java:51) > at org.basex.core.Command.run(Command.java:329) > at org.basex.core.Command.execute(Command.java:94) > at org.basex.core.Command.execute(Command.java:117) > at org.basex.server.LocalSession.execute(LocalSession.java:96) > at org.basex.server.LocalSession.replace(LocalSession.java:80) > at com.in10s.collectioncreation.CRSXMLDBManager.createCollection(CRSXMLDBManager.java:183) > at com.in10s.collectioncreation.CRSCollectionCreator.main(CRSCollectionCreator.java:138) > at com.in10s.filewatcher.CRSFileWatcher.main(CRSFileWatcher.java:52) > > > Thanks&Regards > > ChandraSekhar > > 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ün4 Dec 2014 12:45 #
Hi Chandra,
Quoted text · Chandrasekhar · 2 lines
> - 15 wrong parent/descendant relationships (pre: 60149343,. > Warning: Database is inconsistent.
This indicates that something must have got wrong during an update operation. Could it be that one of the running updates was interrupted in the past?
Quoted text · Chandrasekhar · 1 line
> How can i found the wrong wrong relationships from the collection,please guide me
You can try to export your database and check out the resulting files.
Best,
Christian
Quoted text · Chandrasekhar · 80 lines
> > > > Thanks&Regards > ChandraSekhar > > ________________________________________ > > Hi ChandraSekhar, > > We have received your mail (see [1]). To guide you, we need more > information. Do you have documents that allow us to reproduce the > issue? Have you interrupted running update operations? What output > does the BaseX INSPECT command give you? > > Christian > > [1] http://www.mail-archive.com/basex-talk%40mailman.uni-konstanz.de/ > > > On Thu, Nov 27, 2014 at 1:47 PM, Chandrasekhar > <chandrasekhar.r at intense.in> wrote: >> >> Dear Team >> >> >> we are getting the below issue while opening database and replacing the file to the database.Please guide us to resolve the issue. >> >> >> We are using below code to replace the file. >> >> >> >> >> >> Context context = new Context(); >> >> LocalSession ls = new LocalSession(context); >> >> >> ls.execute("OPEN DBNAME"); >> ls.replace("FILENAME",new FileInputStream("FILEPATH")); >> >> >> >> >> >> >> 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: Sun Microsystems Inc., 1.6.0_30 >> OS: Linux, amd64 >> Stack Trace: >> java.lang.NegativeArraySizeException >> at org.basex.io.random.DataAccess.readBytes(DataAccess.java:216) >> at org.basex.io.random.DataAccess.readToken(DataAccess.java:194) >> at org.basex.io.random.DataAccess.readToken(DataAccess.java:185) >> at org.basex.data.DiskData.txt(DiskData.java:267) >> at org.basex.data.DiskData.text(DiskData.java:235) >> at org.basex.index.resource.Docs.paths(Docs.java:106) >> at org.basex.index.resource.Docs.docs(Docs.java:229) >> at org.basex.index.resource.Resources.docs(Resources.java:120) >> at org.basex.core.cmd.Replace.run(Replace.java:51) >> at org.basex.core.Command.run(Command.java:329) >> at org.basex.core.Command.execute(Command.java:94) >> at org.basex.core.Command.execute(Command.java:117) >> at org.basex.server.LocalSession.execute(LocalSession.java:96) >> at org.basex.server.LocalSession.replace(LocalSession.java:80) >> at com.in10s.collectioncreation.CRSXMLDBManager.createCollection(CRSXMLDBManager.java:183) >> at com.in10s.collectioncreation.CRSCollectionCreator.main(CRSCollectionCreator.java:138) >> at com.in10s.filewatcher.CRSFileWatcher.main(CRSFileWatcher.java:52) >> >> >> Thanks&Regards >> >> ChandraSekhar >> >> 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.
Written for BaseX 7.9. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery