Trying to open an indexedDB database and I get this Error: Invalid argument: idb_cmp1 does not match existing comparator : leveldb.BytewiseComparator' - comparator

I'm trying to open an indexedDB database using Python and I get this error:
Error: Invalid argument: idb_cmp1 does not match existing comparator : leveldb.BytewiseComparator
It seems I have to implement a comparator, but I don't know how to. Is there another solution to this? Or another way to open/view the database?

Related

Cannot load the GraphML file I just saved

I'm using Gremlin Server.
I save the contents of the database in an XML file (GraphML) with this line:
g.io(path).write().iterate()
To load the file I use this line:
g.io(path).read().iterate();
And then I get this error:
connection.js:282
new ResponseError(util.format('Server error: %s (%d)', response.status.message, response.status.code), response.status));
^
ResponseError: Server error: For input string: "-2555865115" (500)
This error is coming from gremlin server.
If I search for this value in the XML file (-2555865115) and I remove the last character (-255586511) then the problem is solved.
Why this happens? How can I fix this issue? The database is always saving a file that I have to fix manually.
If I have to change something in the configuration files of Gremlin Server, can you please tell me which file to modify and how? because I never did that before.
I'm using Gremlin server in my local computer just for testing, without any changes.
EDIT:
I changed conf/tinkergraph-empty.properties to this:
gremlin.tinkergraph.vertexIdManager=ANY
gremlin.tinkergraph.edgeIdManager=ANY
gremlin.tinkergraph.vertexPropertyIdManager=ANY
I restarted, but I get the same error when loading the XML file.
Given that removing the last integer from your numerical value solved the problem, I'd speculate you're hitting a limit; specifically, the lowest value an integer can have.
In Java, that value is -2147483647, and that happens to be the language that the default implementation of Gremlin Server is written in. As such, it's likely that the deserialization process is failing while trying to interpret that value as an integer. Since the value is below the minimum value of an integer, and since the error message talks about it being an input string, Integer.parseInt("-2555865115") is probably the call that's failing behind the scenes.
If Gremlin is both serializing and de-serializing the data, it might be a bug in that implementation, and you might want to file an issue. In the mean time, consider implementing and registering a custom serializer to give yourself more control over how the IO process works.

Getting this error org.mule.runtime.api.store.ObjectAlreadyExistsException: Object already exists for the key

I am getting this error on cloudhub "org.mule.runtime.api.store.ObjectAlreadyExistsException: Object already exists for the key".
I am using object store in my application. Where I am checking if the value is available in object store and then store it only if it is not available. I have set the option to "Fail if present" as false, still seeing this error.
How to resolve this?
I observed that this issue is coming only when I am using two workers in cloudhub.
Thanks in advance.
Edited:
Using Object Store connector and mule 4.3.
I am checking in object store using Contains if value exists. If it does then Retrieving the value else Storing it to OS.
Error
Edit2:
ObjectStore in Cloudhub:
The error message indicates that the application is using the default persistent object store. For sharing to multiple workers you should instead use the _defaultUserObjectStore which is in memory. Details are in: https://docs.mulesoft.com/object-store/osv2-faq#how-are-object-store-entries-divided-among-workers
You can try this approach!
Use a retrieve connector and wrap it in Try block. And define it own error handling strategy, in which use store connector in On Error Continue block. What it will do is, first it will try to retrieve the values stored in Object Store. If the keys will be present, respective values will be fetched. If the key is not present, an error will occur which will be handled by the error handler and will store the key to object store.

Sqlite FTS5 initial token query syntax?

I have set up FTS5 (full-text search) with virtual tables in sqlite. MATCH queries are working except it always throws a syntax error on initial token queries.
For example: SELECT * FROM fts_article WHERE fts_article MATCH '^suo' throws
Error calling sqlite3_step (1: fts5: syntax error near "^") rs
I've tried all the syntax variations listed in the docs, getting the same error.
(In production code I will be using bound parameters, and I've tried it that way also.)
UPDATE: Some additional context: I am using the sqlite baked into libsqlcipher-ios.a from SQLCipher. And I am running my sql through FMDB. I have tried calling the sqlite api directly. In that case, the error seems to go away but I'm not seeing the results I expect. Still investigating ...

Querying Titan ElasticSearch backend via Rexster

I have Titan 0.3.2 running in embedded mode, and have been able to create and query ElasticSearch indexes via the Gremlin shell (see previous question). I am using the default configuration, which calls the ES index "search".
These searches return the correct nodes without error via the Gremlin shell:
g.query().has('my_label','abc').vertices()
g.query().has('my_label',CONTAINS,'abc').vertices()
However, if I attempt to run these same Gremlin queries via RexPro, Rexster sends back this error for the first query above:
java.util.concurrent.ExecutionException:
javax.script.ScriptException:
javax.script.ScriptException:
java.lang.IllegalArgumentException: Index is unknown or not configured: search
and this for the second:
java.util.concurrent.ExecutionException:
javax.script.ScriptException:
javax.script.ScriptException:
groovy.lang.MissingPropertyException: No such property: CONTAINS for class: Script3
Similarly, if I try to query on the indexed key via the REST API (GET):
http://localhost:8182/graphs/graph/vertices?key=my_key&value=abc
I receive the same error response:
{"message":"Index is unknown or not configured: search","error":"Index is unknown or not configured: search"}
Lastly, if I try to start with a clean database and run the index creation script through rexpro:
g.makeType().name("my_label").dataType(String.class).indexed("search", Vertex.class).unique(Direction.OUT).makePropertyKey();
I see the same unknown index error:
java.util.concurrent.ExecutionException:
javax.script.ScriptException:
javax.script.ScriptException:
java.lang.IllegalArgumentException: Index is unknown or not configured: search
So it seems that Rexster needs some additional information about the indexing backend, possibly in its configuration file (I am using the default one included with the installation). Anyone familiar with this issue? Happy to provide more information.
You might have a mix of things going on, but the main thing is that as of Titan 0.3.2, Rexster does not automatically import Titan classes, so you can't query with CONTAINS. You need to specify the full package name when doing so:
com.thinkaurelius.titan.core.attribute.Text.CONTAINS
I can't say for sure what else is wrong, but it looks like the elastic search index is not configured properly. That doesn't have much to do with the Rexster configuration file for Titan Server. It has more to do with the second argument you pass to titan.sh which contains Titan configuration information. Make sure that elastic search is properly configured as it is in this file shown here (default with the installation): https://github.com/thinkaurelius/titan/blob/master/config/titan-server-cassandra-es.properties

Querying a linked SQLite DB in SSMS

I'm trying to use a SQLite database a linked server in SSMS. I've managed to get the ODBC driver installed and a linked server created, but I can't seem to find a way to get queries to work. I think it's just a matter of not understanding the proper syntax for it. Here's what I've tried:
exec sp_tables_ex 'SQLITE'
This works as expected, showing all of the tables in the database.
select * from SQLITE.[default].dbo.TRANSLATION
Fails with this error message
Invalid use of schema or catalog for OLE DB provider "MSDASQL" for
linked server "SQLITE". A four-part name was supplied, but the
provider does not expose the necessary interfaces to use a catalog or
schema.
Taking a clue from that, I tried removing the schema:
select * from SQLITE.[default].TRANSLATION
But this gives me another error message:
Invalid object name 'SQLITE.default.TRANSLATION'.
Likewise, the following give the same error (with slight changes for the object name):
select * from SQLITE.[default].TRANSLATION
select * from SQLITE.dbo.TRANSLATION
select * from SQLITE.TRANSLATION
Any ideas? I'm not quite sure what to try from here.

Resources