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(a)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.