Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: java.lang.StackOverflowError

  1. #1
    Join Date
    Jun 2013
    Posts
    24

    Default java.lang.StackOverflowError

    I have a very simple transformation that uses regex to modify text in a forum database. It modifies bbcode. The transformation is a Table Input, then a Replace in String using Regex, then an Update.

    The search is "\[quote="(.+?)":.+?\]((.|\s)+?)\[\/quote:.+?]". The Replace with is "(quote=$1)$2(/quote)" except with square brackets, which if I use here bbcode gets transformed.

    When I run the transformation it manages to update exactly 1 record and then stops. The log is:

    Unexpected Error
    java.lang.StackOverflowError

    then a very long list of the following repeating over and over

    at java.util.regex.Pattern$GroupTail.match(Pattern.java.4227)
    at java.util.regex.Pattern$BranchConn.match(Pattern.java.4078)
    at java.util.regex.Pattern$CharProperty.match(Pattern.java.3345)
    at java.util.regex.Pattern$Branch.match(Pattern.java.4114)
    at java.util.regex.Pattern$GroupHead.match(Pattern.java.4168)
    at java.util.regex.Pattern$LazyLoop.match(Pattern.java.4357)

    Version 5.0.1 Stable on OS X.
    Last edited by RobBrandt; 04-09-2014 at 02:07 AM.

  2. #2
    Join Date
    Sep 2013
    Posts
    235

    Default

    http://bit.ly/1lPGHpY (pay attention to Stack Overflow guys had same errors)
    check your regexp. Try to simplify it.
    At least your last bracket is not escaped
    +?]". Th
    I guess should be +?\]"
    Pay attention ( is a special symbols for regexp.

  3. #3
    Join Date
    Jun 2013
    Posts
    24

    Default

    Thanks. I escaped the final bracket but I still get the errors. I am really not sure how I can simpify it. Here's the problem I am trying to solve:

    http://regex101.com/r/bI4sJ7

    It simplifies the bbcode, and includes newlines in the quoted text.

  4. #4
    Join Date
    Jun 2013
    Posts
    24

    Default

    Still looking for help here...

    I tried increasing memory and stack to far larger values, but there's no difference, still processing just 1 row before it stops. Here's what I set in Spoon.bat

    if "%PENTAHO_DI_JAVA_OPTIONS%"=="" set PENTAHO_DI_JAVA_OPTIONS="-Xmx1024m" "-Xss64m" "-XX:MaxPermSize=256m"

  5. #5
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Is a short-cut solution acceptable?

    Name:  RIS.jpg
Views: 79
Size:  19.6 KB
    So long, and thanks for all the fish.

  6. #6
    Join Date
    Jun 2013
    Posts
    24

    Default

    Hi. Late last night I took a similar approach of breaking the "big" replace into pieces, making the open tag replace a different step than the close tag repalce. The quoted text is just ignored. That does seem to be working. Yours is even simpler, but may be too global. I'll have to test it. But thanks, either way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.