Closed kjdudley-ucla closed 1 year ago
Some further testing - when running this on Wildfly 28.0.1, the Preview fails and the "Next" button is greyed out. But when running this on Tomcat 10.1.9, the preview still fails, but there's no errors in the log and the "Download" button appears and the export works. Both are running Java 17.
Any clue what could be going wrong with just Wildfly?
@kjdudley-ucla
The above errors on Wildfly likely indicate that the dynamicreports
(and jasperreports
) dependencies are somehow missing or not accessible in the deployment.
Our demo which uses Spring Boot (which itself uses a embedded Tomcat) is running without any problems.
Could you create a minimal reproducible example (a GitHub repo would be best) so that we can review the problem in depth?
I see exactly the same Error in my Spring Boot Application
It requires ECJ dependency for build Java file from .jar.
Check with:
<!-- https://mvnrepository.com/artifact/org.eclipse.jdt.core.compiler/ecj -->
<dependency>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>4.6.1</version>
</dependency>
@AB-xdev in my spring boot vaadin app i don't see preview for any kind of export and in the logs are no errors. In your example, the preview only works for PDF, CSV, HTML and TEXT for others it's "Unable to preview" and there's no errors in the log and the "Download" button works.
Thank you guys for the comments but I still need a "minimal reproducible example" as mentioned above otherwise I can't reproduce it.
It requires ECJ dependency ...
Check with:
org.eclipse.jdt.core.compiler:ecj:4.6.1
This Eclipse Compiler is from 2016, deprecated and definitely can't compile Java 17 code as required here.
In your example, the preview only works for PDF, CSV, HTML and TEXT for others it's "Unable to preview"
Yes because that's what the browser can display. A browser can't e.g. display PPTX files.
Thank you guys for the comments but I still need a "minimal reproducible example" as mentioned above otherwise I can't reproduce it.
It requires ECJ dependency ...
I modified the Maven Compiler so that it uses ECJ and it works without any problems:
Check with:
org.eclipse.jdt.core.compiler:ecj:4.6.1
This Eclipse Compiler is from 2016, deprecated and definitely can't compile Java 17 code as required here.
In your example, the preview only works for PDF, CSV, HTML and TEXT for others it's "Unable to preview"
Yes because that's what the browser can display. A browser can't e.g. display PPTX files.
generally your vaadin-grid-exporter-demo work ok when you run it by mvn ... when you build jar and run java -jar ... is error like in first post when I add to my app and demo
<dependency>
<groupId>org.eclipse.jdt</groupId>
<artifactId>ecj</artifactId>
<version>3.21.0</version>
</dependency>
all works ok.
I hadn't preview for pdf because when app have spring security set X-Frame-Options=DENY by default. When i changed it to SAMEORIGIN all works fine now. :):):)
Thank you for the information, I was able to reproduce the issue now by simply downloading our JAR file from the build workflow and executing it. Weird that everything works fine inside the IDE...
The problem is caused by the fact that jasperreports seems to require the ecj Dependency (however not when running from the IDE...), which we excluded because https://community.jaspersoft.com/wiki/jasperreports-library-v6-requirements says
One of the following for report compilation, depending on the report compiler used:
- Eclipse JDT Java Compiler (recommended) http://www.eclipse.org/jdt/
- JDK 1.4 or higher ...
However as seen in our tests the default JDK compiler works without problems but when you compile it as a JAR... well than not anymore.
I will revert the exclusion which should fix the problem.
PS: The underlying problem with shipping a compiler will be fixed by https://github.com/TIBCOSoftware/jasperreports/issues/203
Seems to be unable to find some xdev and jasper packages? Any advice?