Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6839533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:43:48+00:00 2026-05-26T23:43:48+00:00

while running following code : def v1=[]; def p=[]; v.as(‘x’) .except(v1).sideEffect{v1.add(it)} // step 1

  • 0

while running following code :

def v1=[];
def p=[];
 v.as('x')
    .except(v1).sideEffect{v1.add(it)}  // step 1
    .outE('priority').inV               // step 2
    .except(p).sideEffect{p.add(it)}    // step 3
    .inE('priority').outV               // step 4
    .loop('x'){true} >> -1;             // step 5
return [vertices:v1, priorities:p];

m getting this error :

"exception": "java.lang.StackOverflowError",
    "stacktrace": [
        "java.lang.reflect.InvocationTargetException.(InvocationTargetException.java:72)",
        "sun.reflect.GeneratedMethodAccessor259.invoke(Unknown Source)",
        "sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)",
        "java.lang.reflect.Method.invoke(Method.java:616)",
        "org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)",
        "groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)",
        "org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)",
        "groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:883)",
        "groovy.lang.Closure.call(Closure.java:410)",
        "org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:3392)",
        "org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2188)",
        "org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:2205)",
        "org.codehaus.groovy.runtime.dgm$77.invoke(Unknown Source)",

There is more stack trace .

Please suggest why this error is coming .

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:43:48+00:00Added an answer on May 26, 2026 at 11:43 pm

    I don’t see anything obvious as to why this query is giving you a stack overflow. However, looking at your stack trace, I believe (though not certain), that your problem is with your return statement. You might want to decompose your query into smaller chunks to see where the problem is occurring.

    Sidenote: here is a tip to make your query more concise:

    .outE('priority').inV  --write as--> out('priority')
    

    If the only thing you are reasoning on on an edge is the label, then you can simply jump between vertices and not touch edges.

    Finally, note that Gremlin 1.4, will provide “emit” functionality with the loop() step. In this way, you don’t need to sideEffect{} save elements during a loop into a list, you can simply emit them lazily. Thus, it will be easier to say, “return all things I touch as I loop down this branch.”

    Apologies for no direct solution….

    Marko.

    http://markorodriguez.com

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Linear layout initialized. While running program, i am using following code
I am using the following code. While running in localhost it gives correctly the
Below is an exception I encountered while running the immediately following code: The source
Consider that thread 1 is running following code: while (true) { synchronized (this) {
While running the following code i am getting the error java.lang.OutOfMemoryException : java heap
I am getting the following error while running my MVC application, which uses the
I am getting he following Exception while running my Quartz Schdular program. Below is
hi i am getting the following exception while running my application and my applicationContext.xml
How to hide cmd window while running a batch file? I use the following
I have the following code: def show @game = $site.new_game_of_type(params[:id]) @game.start end def update_game_time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.