I have previously also encountered a StackOverflowError in a VisitListener.
The reason was that the VisitListener in some situations would always call
VisitContext#queryPart(QueryPart) to replace a given QueryPart with another
one. This basically resulted in an endless recursion. So the VisitListener
must take care to avoid such situations.

Hope this helps,
Knut

On Thu, Aug 8, 2019 at 12:53 AM P R <[email protected]> wrote:

> The jOOQ version is 3.11.11 and here's a small section of the stack trace
> showing the toString() call.
>
> Exception in thread "main" java.lang.StackOverflowError
>     at
> org.jooq.impl.DefaultRenderContext.visit0(DefaultRenderContext.java:509)
>     at org.jooq.impl.AbstractContext.visit0(AbstractContext.java:446)
>     at org.jooq.impl.AbstractContext.visit(AbstractContext.java:207)
>     at org.jooq.impl.SchemaImpl.accept(SchemaImpl.java:119)
>     at
> org.jooq.impl.DefaultRenderContext.visit0(DefaultRenderContext.java:509)
>     at org.jooq.impl.AbstractContext.visit0(AbstractContext.java:446)
>     at org.jooq.impl.AbstractContext.visit(AbstractContext.java:207)
>     at org.jooq.impl.TableImpl.accept0(TableImpl.java:245)
>     at org.jooq.impl.TableImpl.accept(TableImpl.java:232)
>     at org.jooq.impl.AbstractContext.visit0(AbstractContext.java:446)
>     at org.jooq.impl.AbstractContext.visit(AbstractContext.java:207)
>     at
> org.jooq.impl.DefaultDSLContext.renderInlined(DefaultDSLContext.java:712)
>     at org.jooq.impl.AbstractQueryPart.toString(AbstractQueryPart.java:172)
>     at java.lang.String.valueOf(String.java:2994)
>     at java.io.PrintStream.println(PrintStream.java:821)
>     :
>     :
>     at com.el.db.sql.CustomerIdFilter.visitEnd(CustomerIdFilter.java:182)
>     at org.jooq.impl.AbstractContext.end(AbstractContext.java:288)
>     at org.jooq.impl.AbstractContext.visit(AbstractContext.java:211)
>     at
> org.jooq.impl.DefaultDSLContext.renderInlined(DefaultDSLContext.java:712)
>     at org.jooq.impl.AbstractQueryPart.toString
> (AbstractQueryPart.java:172)
>     at java.lang.String.valueOf(String.java:2994)
>     at java.io.PrintStream.println(PrintStream.java:821)
>     at com.el.db.sql.CustomerIdFilter.visitEnd(CustomerIdFilter.java:182)
>     at org.jooq.impl.AbstractContext.end(AbstractContext.java:288)
>     at org.jooq.impl.AbstractContext.visit(AbstractContext.java:211)
>
> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jooq-user/9fe7d630-a812-4bf4-8c29-3bbde5634af3%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/9fe7d630-a812-4bf4-8c29-3bbde5634af3%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAFx%3DKgfPPOW29dZ%2BNEzqCtyDfLEgyWmDZf%2Bo0V05PXo8Vg%3Dh0w%40mail.gmail.com.

Reply via email to