You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Jens Hübel (JIRA)" <ji...@apache.org> on 2017/11/17 14:22:00 UTC

[jira] [Commented] (CMIS-1051) OOM when parsing string with double quotes

    [ https://issues.apache.org/jira/browse/CMIS-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16257023#comment-16257023 ] 

Jens Hübel commented on CMIS-1051:
----------------------------------

Michael did you run your tests with Java 9?

I can reproduce the problem with Java9, an older version of opencmis with Java 7 passes your test.
The problem occurs in the ANTLR runtime, which might be incompatible with Java 9.

I guess the version of ANTLR is a bit outdated (2014). An update to ANTLR 4 would be a huge change as it implies a rewrite of the grammar. ANTLR4 is incompatible to ANTLR3. 

I will look a bit deeper and try to understand why it fails.

> OOM when parsing string with double quotes
> ------------------------------------------
>
>                 Key: CMIS-1051
>                 URL: https://issues.apache.org/jira/browse/CMIS-1051
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-server
>    Affects Versions: OpenCMIS 1.1.0
>            Reporter: Michael Brackx
>            Assignee: Jens Hübel
>
> parsing a query with an incorrect string literal using double quotes (") iso of single quotes (') leads to an OOM exception
> example query:
> {noformat}
> SELECT * FROM cmis:document WHERE cmis:name = "a"
> {noformat}
> testcase for TestParserStrict
> {noformat}
>     @Test
>     public void queryDoubleQuotes() throws Exception {
>         testParserFail("query", "SELECT * FROM cmis:document WHERE cmis:name = \"a\"");
>     }
> {noformat}
> stacktrace:
> {noformat}
> java.lang.OutOfMemoryError: Java heap space
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
> 	at org.apache.chemistry.opencmis.server.support.query.AbstractParserTest.execParser(AbstractParserTest.java:188)
> 	at org.apache.chemistry.opencmis.server.support.query.AbstractParserTest.testParserFail(AbstractParserTest.java:95)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)