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

Andy Seaborne commented on JENA-2019:
-------------------------------------

Which exceptions do you get for the failures?

It is safer to build a consistent cut of the code. Both external dependencies 
(via the parent POM) and internal code have changed between 3.17.0 and 4.0.0 
(3.18.0 has been renamed).

A quick build is:

`mvn clean install -Pdev` 

The project is moving to a minimum of Java11.
I doubt Java version makes a difference. 
We build with JDK 11,14,15,16,17 (output Java11 class files) on a regular 
basis. https://ci-builds.apache.org/job/Jena/

You can get development builds from:
{noformat}
        <repository>
          <id>apache.snapshots</id>
          <name>Apache Snapshot Repository</name>
          <url>https://repository.apache.org/snapshots</url>
          <releases><enabled>false</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
{noformat}


> Rule$ParserException in Jena rules when string literal equals to open 
> parenthesis
> ---------------------------------------------------------------------------------
>
>                 Key: JENA-2019
>                 URL: https://issues.apache.org/jira/browse/JENA-2019
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 3.16.0, Jena 3.17.0
>         Environment: _> java -version_
> openjdk version "1.8.0_232"
> OpenJDK Runtime Environment (build 1.8.0_232-BellSoft-b10)
> OpenJDK 64-Bit Server VM (build 25.232-b10, mixed mode)
> Windows 8.1
>            Reporter: rdfman
>            Assignee: Andy Seaborne
>            Priority: Major
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> I have some [Jena 
> rules|https://jena.apache.org/documentation/inference/#RULEsyntax] and I 
> {color:#172b4d}need {color}to test a string literal in them:
> {code:java}
> @prefix my: <http://test/expressions#> .
> # Rule including string "("
> [(?a my:text "(") -> ]      # fails for '(' is single quotes too
> {code}
> And a call to 
> {code:java}
> List<Rule> rules = Rule.rulesFromURL(my_rules_path)
> {code}
> throws:
> {noformat}
> Exception in thread "main" 
> org.apache.jena.reasoner.rulesys.Rule$ParserException: Expected ')' at end of 
> clause, found ]
> At '[ ( ?a my:text " ( " ) -> ] '
>         at 
> org.apache.jena.reasoner.rulesys.Rule$Parser.parseNodeList(Rule.java:987)
>         at 
> org.apache.jena.reasoner.rulesys.Rule$Parser.parseNode(Rule.java:906)
>         at 
> org.apache.jena.reasoner.rulesys.Rule$Parser.parseNodeList(Rule.java:983)
>         at 
> org.apache.jena.reasoner.rulesys.Rule$Parser.parseClause(Rule.java:998)
>         at 
> org.apache.jena.reasoner.rulesys.Rule$Parser.doParseRule(Rule.java:1057)
>         at 
> org.apache.jena.reasoner.rulesys.Rule$Parser.parseRule(Rule.java:1030)
>         at org.apache.jena.reasoner.rulesys.Rule.parseRules(Rule.java:666)
>         at org.apache.jena.reasoner.rulesys.Rule.rulesFromURL(Rule.java:515)
>         at org.apache.jena.reasoner.rulesys.Rule.rulesFromURL(Rule.java:526)
>         at ru.vstu.Main.runReasoning(Main.java:64){noformat}
> This crash happens if the string is exactly equal to *"("* (the use of double 
> quotes or single quotes does not matter). Escaping also with backslash *"\ 
> ("* does not help.
>  Changing the original string from *"("* to *"()"* , *"(("* , *"-("* or *")"* 
> eliminates the exception (but this is not what i want).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to