Uploaded image for project: 'Engineering'
  1. Engineering
  2. ENG-8437

regex parsing error when executing jdbcdemo in docs with java6/jdbc

    XMLWordPrintable

    Details

    • Team Backlog:
      ECO team
    • Sprint:
      ECO 28, ECO 29

      Description

      With java 6/v5.2.2/client jdbc code from http://docs.voltdb.com/UsingVoltDB/ProgLangjdbc.php#Progjdbcconnect, users will receive the error below. There are no issues using java 7.

      1. ERROR:
        java -classpath /tmp/pz/voltdb-ent-5.2.2/voltdb/voltdbclient-5.2.2.jar:/tmp/pz/voltdb-ent-5.2.2/lib/*jar:./ JdbcDemo
        Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.voltdb.jdbc.JDBC4Statement$VoltSQL.parseSQL(JDBC4Statement.java:209)
        at org.voltdb.jdbc.JDBC4Statement.executeQuery(JDBC4Statement.java:461)
        at JdbcDemo.main(JdbcDemo.java:15)
        Caused by: java.util.regex.PatternSyntaxException: Look-behind group does not have an obvious maximum length near index 40
        \A\s*alter\s+(??<parenttype>[a-z][a-z]))\s+(??<parentname>[\w$]))(?:\s(?:alter\s+(??<childtype>[a-z][a-z]))\s+(??<childname>[\w$]))))?\s(?:rename)\s+(?:to).*\z
        ^
        at java.util.regex.Pattern.error(Pattern.java:1730)
        at java.util.regex.Pattern.group0(Pattern.java:2505)
        at java.util.regex.Pattern.sequence(Pattern.java:1823)
        at java.util.regex.Pattern.expr(Pattern.java:1769)
        at java.util.regex.Pattern.group0(Pattern.java:2476)
        at java.util.regex.Pattern.sequence(Pattern.java:1823)
        at java.util.regex.Pattern.expr(Pattern.java:1769)
        at java.util.regex.Pattern.compile(Pattern.java:1477)
        at java.util.regex.Pattern.<init>(Pattern.java:1150)
        at java.util.regex.Pattern.compile(Pattern.java:864)
        at org.voltdb.parser.SQLPatternPartElement.compile(SQLPatternPartElement.java:166)
        at org.voltdb.parser.SQLLexer.<clinit>(SQLLexer.java:131)
        ... 3 more
      1. reproducer
      2. get volt 5.2.2
      3. on server
        /tmp/pz/voltdb-ent-5.3/doc/tutorials/helloworld$ ./run.sh
        /tmp/pz/voltdb-ent-5.3/doc/tutorials/helloworld$ ./run.sh init
        /tmp/pz/voltdb-ent-5.3/doc/tutorials/helloworld$ ./run.sh client
      4. on client server (i ran on volt3d) - build and run jdbcdemo client
      5. copy and paste code to from docs link to JdbcDemo.java
        /usr/lib/jvm/java-1.6.0-openjdk.x86_64/bin/javac JdbcDemo.java
        /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java -classpath /voltdb-ent-5.2.2/voltdb/voltdbclient-5.2.2.jar:/voltdb-ent-5.2.2/lib/*jar:./ JdbcDemo

        Attachments

          Activity

            People

            Assignee:
            mjames Manju James
            Reporter:
            pzhao peter zhao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support