Error on parsing query Found invalid ) character

366 views
Skip to first unread message

Meerkatzenwildschwein

unread,
Oct 9, 2012, 10:33:19 AM10/9/12
to orient-...@googlegroups.com
 I get the following exception with orientdb-1.2.0-20121009.123419-75. Seems the closing brace in the string is interpreted.

Exception in thread "AWT-EventQueue-0" com.orientechnologies.orient.core.exception.OQueryParsingException: Error on parsing query at position #65: Error on parsing query
Query:  ( basePath.toLowerCase() <> '/home/guru/e-books/111/test (foo)') order by  author asc
----------------------------------------------------------------------^
    at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.text(OSQLPredicate.java:86)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilter.<init>(OSQLFilter.java:41)
    at com.orientechnologies.orient.core.sql.OSQLEngine.parseCondition(OSQLEngine.java:279)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:133)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.parse(OCommandExecutorSQLSelect.java:79)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:48)
    at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.parse(OCommandExecutorSQLDelegate.java:33)
    at com.orientechnologies.orient.core.storage.OStorageEmbedded.command(OStorageEmbedded.java:77)

    at com.orientechnologies.orient.core.sql.query.OSQLQuery.run(OSQLQuery.java:69)
    at com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run(OSQLSynchQuery.java:78)
    at com.orientechnologies.orient.core.query.OQueryAbstract.execute(OQueryAbstract.java:32)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.query(ODatabaseRecordAbstract.java:397)

    at com.orientechnologies.orient.core.db.ODatabaseRecordWrapperAbstract.query(ODatabaseRecordWrapperAbstract.java:178)
    at com.orientechnologies.orient.object.db.ODatabasePojoAbstract.query(ODatabasePojoAbstract.java:218)
    at org.rr.jeborker.db.ODocumentMapper.getNextDocuments(ODocumentMapper.java:53)
    at org.rr.jeborker.db.ODocumentMapper.getDocuments(ODocumentMapper.java:47)
    at org.rr.jeborker.db.ODocumentMapper.size(ODocumentMapper.java:112)
    at java.util.AbstractList$Itr.hasNext(AbstractList.java:339)
    at org.rr.commons.collection.IteratorList.copyIterator(IteratorList.java:257)

    at org.rr.commons.collection.IteratorList.size(IteratorList.java:213)
    at org.rr.commons.collection.CompoundList.size(CompoundList.java:170)
    at org.rr.jeborker.gui.model.EbookPropertyDBTableModel.getRowCount(EbookPropertyDBTableModel.java:87)
    at javax.swing.JTable.getRowCount(JTable.java:2631)
    at javax.swing.plaf.basic.BasicTableUI.createTableSize(BasicTableUI.java:1646)
    at javax.swing.plaf.basic.BasicTableUI.getPreferredSize(BasicTableUI.java:1687)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1634)
    at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)

    at java.awt.Container.layout(Container.java:1419)
    at java.awt.Container.doLayout(Container.java:1408)
    at java.awt.Container.validateTree(Container.java:1505)
    at java.awt.Container.validate(Container.java:1478)
    at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:670)
    at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1635)

    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
    at java.awt.EventQueue.access$000(EventQueue.java:84)
    at java.awt.EventQueue$1.run(EventQueue.java:607)
    at java.awt.EventQueue$1.run(EventQueue.java:605)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: com.orientechnologies.orient.core.exception.OSerializationException: Found invalid ) character. Ensure it is opened and closed correctly.
    at com.orientechnologies.orient.core.serialization.serializer.OStringSerializerHelper.parse(OStringSerializerHelper.java:216)
    at com.orientechnologies.orient.core.serialization.serializer.OStringSerializerHelper.smartSplit(OStringSerializerHelper.java:161)
    at com.orientechnologies.orient.core.serialization.serializer.OStringSerializerHelper.smartSplit(OStringSerializerHelper.java:153)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterItemAbstract.<init>(OSQLFilterItemAbstract.java:51)
    at com.orientechnologies.orient.core.sql.filter.OSQLFilterItemField.<init>(OSQLFilterItemField.java:38)
    at com.orientechnologies.orient.core.sql.OSQLHelper.parseValue(OSQLHelper.java:191)
    at com.orientechnologies.orient.core.sql.OSQLHelper.parseValue(OSQLHelper.java:169)
    at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditionItem(OSQLPredicate.java:318)
    at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractCondition(OSQLPredicate.java:164)
    at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditions(OSQLPredicate.java:112)
    at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditionItem(OSQLPredicate.java:249)
    at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractCondition(OSQLPredicate.java:145)
    at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.extractConditions(OSQLPredicate.java:112)
    at com.orientechnologies.orient.core.sql.filter.OSQLPredicate.text(OSQLPredicate.java:78)
    ... 46 more

Luca Garulli

unread,
Oct 10, 2012, 9:01:54 AM10/10/12
to orient-...@googlegroups.com
Hi,
please can you post here the original query?

Lvc@


--
 
 
 

Meerkatzenwildschwein

unread,
Oct 10, 2012, 2:12:39 PM10/10/12
to orient-...@googlegroups.com
select * from EbookPropertyItem WHERE ( basePath.toLowerCase() <> '/home/guru/e-books/111/test noch eine kopie2 (kopie)') order by  author asc

Luca Garulli

unread,
Oct 10, 2012, 5:21:57 PM10/10/12
to orient-...@googlegroups.com
Hi,
that is bug: the sql parser has been improved but sometimes suffer of these problem: add a space before the last ")"

select * from EbookPropertyItem WHERE ( basePath.toLowerCase() <> '/home/guru/e-books/111/test noch eine kopie2 (kopie)' ) order by  author asc

Lvc@

On 10 October 2012 20:12, Meerkatzenwildschwein <fox_m...@kurzepost.de> wrote:
select * from EbookPropertyItem WHERE ( basePath.toLowerCase() <> '/home/guru/e-books/111/test noch eine kopie2 (kopie)') order by  author asc

--
 
 
 

Meerkatzenwildschwein

unread,
Oct 11, 2012, 7:30:58 AM10/11/12
to orient-...@googlegroups.com
I've changed this as you described. Now it works. Thanks!

Shishya

unread,
Feb 18, 2014, 8:25:19 AM2/18/14
to orient-...@googlegroups.com
Luca,

even though I add a space after the ), I get the same error.
Any workarounds please

regards

Luca Garulli

unread,
Feb 18, 2014, 8:29:14 AM2/18/14
to orient-database
What query?

Lvc@


--
 
---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

prabhat

unread,
Feb 18, 2014, 8:32:14 AM2/18/14
to orient-...@googlegroups.com
This query works fine in console, but fails in bulk

INSERT INTO US_simplified_data (patent_id, national_class, title, status, time_stamp, kind, iso_date, ipc_version, inventors, international_class, further_national_class, further_international_class, date, country, citations, assignees, applicants, abstract) VALUES ('06428505','604 80','In-line IV drug delivery pack with controllable dilution','not found','1028592000','B1','2002-08-06T00:00:00Z','7','[ { \"city\" : \"Napa\", \"first_name\" : \"Michael A.\", \"last_name\" : \"Taylor\", \"name\" : \"Michael A. Taylor\", \"country\" : \"not found\", \"pincode\" : \"not found\", \"state\" : \"CA\" } ]','A61M  514','[ \"604 83\", \"604 85\" ]','[]','20020806','US','[ { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Iversen et al.\", \"patent_id\" : \"3276458\", \"date\" : \"19661000\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Huppen\", \"patent_id\" : \"3517816\", \"date\" : \"19700600\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Herrmann\", \"patent_id\" : \"3730349\", \"date\" : \"19730500\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Akcasu\", \"patent_id\" : \"4070289\", \"date\" : \"19780100\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Harris, Jr.\", \"patent_id\" : \"4160727\", \"date\" : \"19790700\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Keil\", \"patent_id\" : \"4231872\", \"date\" : \"19801100\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Berry, III et al.\", \"patent_id\" : \"4280912\", \"date\" : \"19810700\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Hart\", \"patent_id\" : \"4396383\", \"date\" : \"19830800\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Lyons\", \"patent_id\" : \"4458733\", \"date\" : \"19840700\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Kaufman\", \"patent_id\" : \"4484920\", \"date\" : \"19841100\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Bohman et al.\", \"patent_id\" : \"4507114\", \"date\" : \"19850300\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Theeuwes\", \"patent_id\" : \"4511351\", \"date\" : \"19850400\", \"class\" : \"604246\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Wolfe et al.\", \"patent_id\" : \"4533348\", \"date\" : \"19850800\", \"class\" : \"137268\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Geller\", \"patent_id\" : \"4534757\", \"date\" : \"19850800\", \"class\" : \"604126\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Moss\", \"patent_id\" : \"4576603\", \"date\" : \"19860300\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Makinen et al.\", \"patent_id\" : \"4648978\", \"date\" : \"19870300\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Berglund et al.\", \"patent_id\" : \"4695272\", \"date\" : \"19870900\", \"class\" : \"604252\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Matsuzaki et al.\", \"patent_id\" : \"4698153\", \"date\" : \"19871000\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Hambleton et al.\", \"patent_id\" : \"4784763\", \"date\" : \"19881100\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Trasen\", \"patent_id\" : \"4810388\", \"date\" : \"19890300\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Taylor et al.\", \"patent_id\" : \"4871463\", \"date\" : \"19891000\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Sumnitsch\", \"patent_id\" : \"4903717\", \"date\" : \"19900200\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Ikeda\", \"patent_id\" : \"4994056\", \"date\" : \"19910200\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Bosko et al.\", \"patent_id\" : \"5004535\", \"date\" : \"19910400\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Jha et al.\", \"patent_id\" : \"5032265\", \"date\" : \"19910700\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Marius et al.\", \"patent_id\" : \"5059317\", \"date\" : \"19911000\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"McElveen, Jr. et al.\", \"patent_id\" : \"5163922\", \"date\" : \"19921100\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Taylor\", \"patent_id\" : \"5259954\", \"date\" : \"19931100\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Berglund\", \"patent_id\" : \"5395323\", \"date\" : \"19950300\", \"class\" : \"604 84\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Morris\", \"patent_id\" : \"5429603\", \"date\" : \"19950700\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"O\'Neil et al.\", \"patent_id\" : \"5637087\", \"date\" : \"19970600\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Michaels, Jr.\", \"patent_id\" : \"5685846\", \"date\" : \"19971100\", \"class\" : \"not found\" }, { \"kind\" : \"A\", \"country\" : \"not found\", \"inventor_name\" : \"Taylor\", \"patent_id\" : \"5725777\", \"date\" : \"19980300\", \"class\" : \"210232\" } ]','[ { \"city\" : \"Napa\", \"name\" : \"PrisMedical Corporation\", \"country\" : \"not found\" } ]','[]','An in-line drug delivery pack that connects in-line with an intravenous  line and allows for the mixing of diluent with a drug reagent to be delivered to the patient. An internal drug bed bypass mechanism is tailored to apportion diluent flow between the bypass and the drug bed. The apportionment is selected to achieve a solution concentration suitable for IV administration as the dried reagent is dissolved. Thus, both dissolution and precisely tailored dilution are performed in the same simple device.' )

Prabhat Kumar Singh



--
 
---
You received this message because you are subscribed to a topic in the Google Groups "OrientDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orient-database/N33PMS9uzAc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orient-databa...@googlegroups.com.

Luca Garulli

unread,
Feb 18, 2014, 8:59:18 AM2/18/14
to orient-database
Hi,
sorry it's pretty unreadeable. You should check if any ) is missing somewhere.

Lvc@

prabhat

unread,
Feb 18, 2014, 9:02:09 AM2/18/14
to orient-...@googlegroups.com
No, Its all correct actually. There is all correct syntaxes. It works fine in studio. But gives this error in massiveinsert.


Prabhat Kumar Singh

Diego Martelli

unread,
Mar 24, 2014, 6:40:20 AM3/24/14
to orient-...@googlegroups.com
I have the same problem looking for ")" character in a text by gremlin in REST on 161 version.

g.V('@class', 'Comment').filter { it.text.contains(")")}.text


this is the full error: System.Exception: DB Error:InternalServerError. Msg:com.orientechnologies.orient.core.exception.OSerializationException: Found invalid ) character. Ensure it is opened and closed correctly.

Andrey Lomakin

unread,
Mar 24, 2014, 11:24:35 AM3/24/14
to orient-database
Hi,

I am working on this.


For more options, visit https://groups.google.com/d/optout.



--
Best regards,
Andrey Lomakin.

Orient Technologies
the Company behind OrientDB

Ravinder Payal

unread,
Sep 30, 2015, 1:14:39 PM9/30/15
to OrientDB
is the bug shorted out is that exist even now i am also getting the same problem.

The problem may occur when any user added parenthesis in their post that will be stored in orient db

Luigi Dell'Aquila

unread,
Oct 1, 2015, 12:58:54 AM10/1/15
to orient-...@googlegroups.com
Hi Ravinder,

I lost track of this, was it reported in the issue tracker?
If not, could you please create an issue specifying the OrientDB version where it still happens?

Thanks

Luigi

Alain

unread,
Oct 2, 2015, 4:44:39 AM10/2/15
to OrientDB
Hi Luigi,
I also noticed the problem and appended the bug https://github.com/orientechnologies/orientdb/issues/4996 with my case.

Thank you,

Luigi Dell'Aquila

unread,
Oct 2, 2015, 5:01:47 AM10/2/15
to orient-...@googlegroups.com
Hi Alain,

thanks a lot, I'll check it soon

Thanks

Luigi

Alain

unread,
Oct 14, 2015, 6:25:19 AM10/14/15
to OrientDB
Just fyi, I updated the bug with the result of my tests with version 2.1.3 and 2.1.4. The bug is still there (obviously since the bug is still opened).

Alain

unread,
Nov 16, 2015, 9:17:23 AM11/16/15
to OrientDB
Fyi, the bug is still existing in 2.1.5. Any plan on working on it soon ?

Thanks in advance.

Luigi Dell'Aquila

unread,
Nov 16, 2015, 6:42:54 PM11/16/15
to orient-...@googlegroups.com
Hi Alain,

a few days ago I fixed an issue that can be related to this, any chance to try 2.1.x branch?

Thanks

Luigi

Alain

unread,
Nov 17, 2015, 2:54:49 AM11/17/15
to OrientDB
Hi Luigi,
After a quick test, it seems the bug is fixed in the latest snapshot. I'm waiting for the next official release in order to run more comprehensive tests, but I feel confident.

Thank you for your feedback !

Alain

Alain

unread,
Nov 24, 2015, 9:38:04 AM11/24/15
to OrientDB
I suppose the fix was not included in version 2.1.6 (I still get the error with this version) ?

Alain

unread,
Jan 11, 2016, 3:53:18 AM1/11/16
to OrientDB
Hi Luigi, 
Any news related to this bug ?

Thanks,
Alain

Alain

unread,
Feb 8, 2016, 3:12:10 AM2/8/16
to OrientDB
Hi,
Months after reporting this bug, there is still no fix published.
The latest version (2.1.10) gives the following error:
com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command:

Please tell us if we can hope for a fix or we should look for a replacement for OrientDB.

Best regards,

Alain

unread,
Feb 16, 2016, 5:52:52 AM2/16/16
to OrientDB
Seems to be fixed in 2.1.11. Thank you !
Reply all
Reply to author
Forward
0 new messages