Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error : The script submitted for processing evaluated in the ScriptEngine with errors and could not be processed. Check the script submitted for syntax errors or other problems and then resubmit. : java.util.NoSuchElementException #117

Open
zytsai opened this issue Jul 23, 2019 · 8 comments

Comments

@zytsai
Copy link

zytsai commented Jul 23, 2019

I installed exakat on MAC using the documentation on exakat.readthedocs.io and get the following error message:

array (
'stackTrace' => 'java.util.NoSuchElementException
at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.next(DefaultTraversal.java:208)
at java_util_Iterator$next.call(Unknown Source)
at Script8$_run_closure1.doCall(Script8.groovy:3)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
at groovy.lang.Closure.call(Closure.java:405)
at groovy.lang.Closure.call(Closure.java:421)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3540)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3525)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3492)
at org.codehaus.groovy.runtime.dgm$86.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:244)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
at Script8$_run_closure2.doCall(Script8.groovy:10)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
at groovy.lang.Closure.call(Closure.java:405)
at groovy.lang.Closure.call(Closure.java:421)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForLine(DefaultGroovyMethods.java:5937)
at org.codehaus.groovy.runtime.IOGroovyMethods.eachLine(IOGroovyMethods.java:457)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.eachLine(ResourceGroovyMethods.java:270)
at org.codehaus.groovy.runtime.ResourceGroovyMethods.eachLine(ResourceGroovyMethods.java:236)
at org.codehaus.groovy.runtime.dgm$993.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:244)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
at Script8.run(Script8.groovy:6)
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:674)
at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:376)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:266)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
',
'exceptions' =>
array (
0 => 'java.util.NoSuchElementException',
),
)

@exakat
Copy link
Owner

exakat commented Jul 25, 2019

Can you find the java process running gremlin, and kill it, then restart.

ps aux | grep gremlin kill -9 <insert PID> php exakat.phar project -p <your project>

@rotemreiss
Copy link

rotemreiss commented Aug 5, 2019

I'm having the same issue on my Mac as well.
I'm using Docker to run Exakat docker run -it --rm -w /src -v $(pwd):/src -e JAVA_OPTIONS="-Xms32m -Xmx2g" --entrypoint "/usr/src/exakat/exakat.phar" exakat/exakat:latest project -v .

I tried multiple times and I am getting the same error each time, although it does work for a single file project that I've created as a test.

Update: It worked after reducing the amount of code.

@philippechevieux
Copy link

Killing the java process running gremlin seem to work for me. I've try @exakat solution and run analyze of this project :

I will test it now on a real project.

@philippechevieux
Copy link

Never mind i still have this issue :

Error : The script submitted for processing evaluated in the ScriptEngine with errors and could not be processed. Check the script submitted for syntax errors or other problems and then resubmit. : 

 ===================  SERVER TRACE  ========================= 
array (
  'stackTrace' => 'java.util.NoSuchElementException
        at org.apache.tinkerpop.gremlin.process.traversal.util.DefaultTraversal.next(DefaultTraversal.java:208)
        at java_util_Iterator$next.call(Unknown Source)
        at Script8$_run_closure1.doCall(Script8.groovy:3)
        at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
        at groovy.lang.Closure.call(Closure.java:405)
        at groovy.lang.Closure.call(Closure.java:421)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3540)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3525)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3492)
        at org.codehaus.groovy.runtime.dgm$86.invoke(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:244)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
        at Script8$_run_closure2.doCall(Script8.groovy:10)
        at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:101)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
        at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1041)
        at groovy.lang.Closure.call(Closure.java:405)
        at groovy.lang.Closure.call(Closure.java:421)
        at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForLine(DefaultGroovyMethods.java:5937)
        at org.codehaus.groovy.runtime.IOGroovyMethods.eachLine(IOGroovyMethods.java:457)
        at org.codehaus.groovy.runtime.ResourceGroovyMethods.eachLine(ResourceGroovyMethods.java:270)
        at org.codehaus.groovy.runtime.ResourceGroovyMethods.eachLine(ResourceGroovyMethods.java:236)
        at org.codehaus.groovy.runtime.dgm$993.invoke(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:244)
        at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:115)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
        at Script8.run(Script8.groovy:6)
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:674)
        at org.apache.tinkerpop.gremlin.groovy.jsr223.GremlinGroovyScriptEngine.eval(GremlinGroovyScriptEngine.java:376)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
        at org.apache.tinkerpop.gremlin.groovy.engine.GremlinExecutor.lambda$eval$0(GremlinExecutor.java:266)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
',
  'exceptions' => 
  array (
    0 => 'java.util.NoSuchElementException',
  ),
)
 ============================================================ 
 
on file phar:///Users/casolutions/Documents/analysequalite/php/bin/exakat/exakat.phar/vendor/brightzone/gremlin-php/src/Connection.php
on line 847

I've already reinstall exakat + tinkergraph and kill gremlin process but still not working

@stevenscg
Copy link

stevenscg commented Aug 15, 2019

I'm having the same issue as @philippechevieux with the same (or very similar) configuration. The project is fairly small and I have include_dirs[] = /src/ to limit the scope of the run to my project's source code directory.

Verbose output:

docker run -it --rm -e JAVA_OPTIONS="-Xms64m -Xmx2g" -w /src -v $(pwd):/src exakat/exakat:latest exakat project -v
Cleaning project
Cleaning project service
Removed 0 files
Recreating database
Search for external libraries
Processing files
'Updating service/config.cache
Running project 'service'
Running the following analysis : Security
Producing the following reports : Text
Running files
Check composer
Searching for files
Found 51 files.
Check short tag (normal pass)
Check short tag (with directive activated)
Short tag OK
Removed 1 duplicates files
Check config files
Done
Cleaning DB
Restart gremlin server
start gremlin server 3.4.x
started gremlin server
Restarted in 9 rounds
started [141] in 4,505.41 ms
Loading with \Exakat\Loader\SplitGraphson
Init finalize===============================================================>-] 98.04% 00:00:00

Error : The script submitted for processing evaluated in the ScriptEngine with errors and could not be processed. Check the script submitted for syntax errors or other problems and then resubmit. : 

 ===================  SERVER TRACE  ========================= 

....

From within the container a few minutes after launch:

docker exec -it eb2b02d29e79 /bin/sh
# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1 17.6  5.5 267520 113288 pts/0   Ss+  17:41   0:27 php /usr/local/bin/exakat project -v
root       127  0.0  0.0      0     0 pts/0    Z+   17:42   0:00 [gremlin-server.] <defunct>
root       141 11.2 25.0 5733892 513464 pts/0  Sl+  17:42   0:13 java -Dlog4j.configuration=file:/usr/src/exakat/tinkerg
root      4821  2.0  0.0   4276   712 pts/1    Ss   17:44   0:00 /bin/sh
root      4879  0.0  0.0   4276   740 pts/0    S+   17:44   0:00 sh -c /usr/local/bin/php -l '/src/vendor/psy/psysh/src/
root      4880  0.0  0.1  36632  2836 pts/1    R+   17:44   0:00 ps aux

I'm not familiar with gremlin, but it looks like it might be dead here.

@philippechevieux
Copy link

Any update about this issue ?

@philippechevieux
Copy link

The only solution for me was to downgrade exakat to the last working version available on my computer (1.5.8 - 19 Dec 2018)

@Maskhe
Copy link

Maskhe commented Jun 1, 2021

kill the java process works for me!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants