JavaParserTool issueshttps://gitlab.ow2.org/decoder/javaparsertool/-/issues2022-03-02T07:33:42Zhttps://gitlab.ow2.org/decoder/javaparsertool/-/issues/6JavaParser generates invalid comments (then java does not compile)2022-03-02T07:33:42ZPierre-Yves GibelloJavaParser generates invalid comments (then java does not compile)A comment like this is valid in java:
```
// */
```
But JavaParser modifies the comment, and generates this:
```
/* */ */
```
And it is not a valid java comment: the class does not compile any more.A comment like this is valid in java:
```
// */
```
But JavaParser modifies the comment, and generates this:
```
/* */ */
```
And it is not a valid java comment: the class does not compile any more.https://gitlab.ow2.org/decoder/javaparsertool/-/issues/7JavaParser bad request Error 400 on production2022-02-23T06:41:23ZEduardo Martín IzquierdoJavaParser bad request Error 400 on productionHello,
I'm trying to parse the mythaistar, and this project was working for us a few months ago. I'm getting a 400 error on production, Could something have changed in the request parameters?
- Url: http://localhost:5001/decoder/javaA...Hello,
I'm trying to parse the mythaistar, and this project was working for us a few months ago. I'm getting a 400 error on production, Could something have changed in the request parameters?
- Url: http://localhost:5001/decoder/javaASTGenerator/mythaistar/java%2Fmtsj%2Fapi%2Fsrc%2Fmain%2Fjava%2Fcom%2Fdevonfw%2Fapplication%2Fmtsj%2Fbookingmanagement%2Fservice%2Fapi%2Frest%2FBookingmanagementRestService.java
- Headers:
'Content-type': 'application/json', 'Accept': 'application/json', 'key': 'eyJhbGciOiJIUzI1NiJ9.NjIwY2NiZDUwMDAy.bZ0ZgPtnJkknbQ7PB84DHyw9CW9KbBm4UuNX34wb2vE'
- Parameters:
'generate': 'all'
Thanks for helpingIgnacio MansanetIgnacio Mansanethttps://gitlab.ow2.org/decoder/javaparsertool/-/issues/8OpenJML analyzer randomly fails with HTTP error 5002022-02-23T06:39:28ZPierre-Yves GibelloOpenJML analyzer randomly fails with HTTP error 500When launched on a large bunch of java files ("select all" on a java project with about 800 files), some failures occur with 500 HTTP errors.
As an example:
![openjml_500](/uploads/a159d718c47a709f81fcce0785c95636/openjml_500.png)
The...When launched on a large bunch of java files ("select all" on a java project with about 800 files), some failures occur with 500 HTTP errors.
As an example:
![openjml_500](/uploads/a159d718c47a709f81fcce0785c95636/openjml_500.png)
The failure seems to occur randomly: on OW2 sat4j project (sat4j_ow2), I got 98 failures out of 791 files.
![failed_500](/uploads/d836c381f4faff5da332a70b4e01a928/failed_500.png)Ignacio MansanetIgnacio Mansanethttps://gitlab.ow2.org/decoder/javaparsertool/-/issues/9JavaParser whole project fails (and destroys project?)2022-02-24T16:15:41ZPierre-Yves GibelloJavaParser whole project fails (and destroys project?)I tried the JavaParser for whole project on a project called "sat4j_ow2" (obtained by cloning the sat4j project, at https://gitlab.ow2.org/sat4j/sat4j/).
Four tests, trying the 4 execution modes:
- "all" and "ast" modes ended with a HTT...I tried the JavaParser for whole project on a project called "sat4j_ow2" (obtained by cloning the sat4j project, at https://gitlab.ow2.org/sat4j/sat4j/).
Four tests, trying the 4 execution modes:
- "all" and "ast" modes ended with a HTTP 400 (after about 50 minutes), but with partial results (some files listed).
- "comments" mode ended with "Invocation Request Timeout" after 15 minutes.
- "annotations" mode ended with a HTTP 500 almost immediately, and the project got so seriously damaged that no artifact is accessible any more from the frontend (I attach a screenshot of the window... where one should see source code, documentation, logs...)
![project_destroyed](/uploads/1b839e6585da5639f688b74b0d39f498/project_destroyed.png)
I tried to connect to Mongo, the source code seems to be still there. So it is probably something about the project structure that got damaged...
For further testing, I created an equivalent project: ow2_javaparser_test (created with admin user). Feel free to use both for tests and information.https://gitlab.ow2.org/decoder/javaparsertool/-/issues/10classmodelxmi2jsontransformer fails with error HTTP 5002022-03-03T10:50:17ZPierre-Yves Gibelloclassmodelxmi2jsontransformer fails with error HTTP 500When executed on an UML file generated with Eclipse jar2uml import plugin, the tool fails with an error HTTP 500 (and no detail).
Attached, the UML file: [core.uml](/uploads/2a8a159feef72559c1be29c892356409/core.uml)When executed on an UML file generated with Eclipse jar2uml import plugin, the tool fails with an error HTTP 500 (and no detail).
Attached, the UML file: [core.uml](/uploads/2a8a159feef72559c1be29c892356409/core.uml)https://gitlab.ow2.org/decoder/javaparsertool/-/issues/11Crash in java code2022-03-03T10:49:13ZGaël de ChalendarCrash in java codeSince yesterday's commit fe8e901ea884f78e31e0d52afb709d3f93e94b8d, javaparsertool crashes with the following messages in logs:
```
* Serving Flask app 'restService.py' (lazy loading)
* Environment: development
* Debug mode: on
* Run...Since yesterday's commit fe8e901ea884f78e31e0d52afb709d3f93e94b8d, javaparsertool crashes with the following messages in logs:
```
* Serving Flask app 'restService.py' (lazy loading)
* Environment: development
* Debug mode: on
* Running on all addresses.
WARNING: This is a development server. Do not use it in a production deployment.
* Running on http://172.28.0.5:5001/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 138-326-457
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.UnsupportedClassVersionError: org/eclipse/jdt/core/dom/ASTNode has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at astextractor.ASTExtractor.parseString(ASTExtractor.java:35)
at astextractor.ASTExtractor.parseFile(ASTExtractor.java:95)
at astextractor.MainApp.main(MainApp.java:47)
... 5 more
mv: cannot stat 'Configurator_annotations.json': No such file or directory
java.io.FileNotFoundException: Configurator_annotations_temp.json (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.util.Scanner.<init>(Scanner.java:611)
at jml2json.main.FileSystemHelpers.readFileToString(FileSystemHelpers.java:42)
at jml2json.main.Main.main(Main.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.NullPointerException
at java.io.StringReader.<init>(StringReader.java:50)
at org.json.JSONTokener.<init>(JSONTokener.java:85)
at org.json.JSONArray.<init>(JSONArray.java:147)
at jml2json.main.Main.main(Main.java:64)
... 5 more
Traceback (most recent call last):
File "process.py", line 270, in <module>
resultsToAdd, resPutsAnswers, logMessages = processFile(document, fn, generate, resultsToAdd, resPutsAnswers, logMessages)
File "process.py", line 186, in processFile
logMessages = runASTAndJML2JSON(quote(fileName, safe=''), logMessages, document)
File "process.py", line 161, in runASTAndJML2JSON
data=loadFileContent(downloadedFileName+"_proc.java")
File "process.py", line 26, in loadFileContent
with open(fileName, 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'Configurator_proc.java'
172.28.0.9 - - [02/Mar/2022 08:50:10] "GET /decoder/javaASTGenerator/testj/Configurator.java?invocationID=fmjoieekisqdvuh&generate=all HTTP/1.1" 500 -
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.UnsupportedClassVersionError: org/eclipse/jdt/core/dom/ASTNode has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at astextractor.ASTExtractor.parseString(ASTExtractor.java:35)
at astextractor.ASTExtractor.parseFile(ASTExtractor.java:95)
at astextractor.MainApp.main(MainApp.java:47)
... 5 more
mv: cannot stat 'Configurator_annotations.json': No such file or directory
java.io.FileNotFoundException: Configurator_annotations_temp.json (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.util.Scanner.<init>(Scanner.java:611)
at jml2json.main.FileSystemHelpers.readFileToString(FileSystemHelpers.java:42)
at jml2json.main.Main.main(Main.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.NullPointerException
at java.io.StringReader.<init>(StringReader.java:50)
at org.json.JSONTokener.<init>(JSONTokener.java:85)
at org.json.JSONArray.<init>(JSONArray.java:147)
at jml2json.main.Main.main(Main.java:64)
... 5 more
Traceback (most recent call last):
File "process.py", line 270, in <module>
resultsToAdd, resPutsAnswers, logMessages = processFile(document, fn, generate, resultsToAdd, resPutsAnswers, logMessages)
File "process.py", line 186, in processFile
logMessages = runASTAndJML2JSON(quote(fileName, safe=''), logMessages, document)
File "process.py", line 161, in runASTAndJML2JSON
data=loadFileContent(downloadedFileName+"_proc.java")
File "process.py", line 26, in loadFileContent
with open(fileName, 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'Configurator_proc.java'
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2091, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2076, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/javaparser/restService.py", line 111, in runASTExtractor
f = open(output,'r')
FileNotFoundError: [Errno 2] No such file or directory: 'res_fmjoieekisqdvuh'
```Ignacio MansanetIgnacio Mansanet