Caused by: java.lang.ClassNotFoundException: org.thymeleaf.dialect.IExpressionEnhancingDialect - thymeleaf

I am running jhipster application as JavaApplication, but I'm receiving error message. I have tried with all the solutions, but unable to run the application successfully. I also searched for the class IExpressionEnhancingDialectin in jar thymeleaf-extras-springsecurity4.2.1.2.RELEASE.jar, but couldn't find it.
Can anyone please help me with this?
Thanks in advance.

Adding this in the pom file worked for me:
<properties>
<thymeleaf.version>3.0.2.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.1.1</thymeleaf-layout-dialect.version>
</properties>
Taken from the most rated answer here:
Spring Boot and Thymeleaf 3.0.0.RELEASE integration

Related

I cannot deploy a war file with Glassfish

I'm now trying to upload a war file to a local Glassfish server. But I'm always getting this message:
GUI internal error: Archive Path is NULL
I read some users who had the same problem and the suggested solution was to change the content of a file named uploadFrame.jsf.
I couldn't even find that file. Can anyone help me out on this?
Thanks a lot.
Have same problem (v 5.0).
Only autodeploy works: move EAR/WAR to glassfish5/glassfish/domains/domain1/autodeploy folder.
I was getting the same issue with GUI internal error: Archive Path is NULL. With the last version of Glassfish 5.0.1, but after change my server to stable version glassfish.-5.0. The issue is solved successfully. I Hope you solve your problem with the version of glassfish.
Here's a solution that can be found on the web. You edit the "uploadFrame.jsf" file in the Glassfish "console-common.jar".
The original line of code in "uploadFrame.jsf":
<sun:form id="form">
The new line of code:
<sun:form id="form" enctype="multipart/form-data">
Remember to stop and restart your Glassfish Server after the change has been made. More detailed information is in these links below:
From "Glassfish Issues" on Github
A Step-By-Step Video On YouTube

Grails ClassPath Error, when update to 3.2.1

After upgrading from 3.1.12 to 3.2.1 I get the following error:
Error:
ClassPathScanner - The application defines a Groovy source using the default package. Please move all Groovy sources into a package.
Caused by: java.lang.ClassNotFoundException: org.grails.datastore.gorm.plugin.support.ConfigSupport
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
The message seems clear, but I cannot find any source which don't have a package.
Can any body help me either with a solution or an idea how to debug it.
Thanks
It's probably BootStrap.groovy (under grails-app/init) or UrlMappings.groovy (under grails-app/controllers)
I had same error as OP #Torsten.
Per #Burt Beckwith's suggestion, ran grails console and ctx.grailApplication..... . It showed Bootstrap. So I moved Bootstrap.groovy from grails-app/init folder to grails-app/init/my/package/name folder where Application.groovy was.
When re-ran grails run-app the ClassPathScanner.... error is gone !
Thanks OP and Burt Beckwith to post question and answer. It helped me.
PS: I wanted to add comment to Burt BeckWith's answer, but I don't have enough reputation yet.

Add-on giving NoClassDefFoundError in Vaadin

I came across this add-on that converts the screencontent into a PDF file. However, when I add these lines of code:
PdfFromComponent factory = new PdfFromComponent();
factory.export(contentcity);
I get this error message:
'javax.servlet.ServletException: com.vaadin.server.ServiceException:
java.lang.NoClassDefFoundError: com/itextpdf/text/DocumentException'
with root cause: 'com.vaadin.server.ServiceException:
java.lang.NoClassDefFoundError: com/itextpdf/text/DocumentException'
I Already added the jar file into the library and compiled the widgetset but the error persists. Can someone briefly explain me how to deal with this?
You need to add the following Maven dependency to your project:
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.6</version>
</dependency>
For some strange reason the author does not ship a pom file within his addon, so he could not mark this as a dependency.
Unfortunately, the JVM throws a NoClassDefFoundError also when there is more than one version of a class. It could be that you have more than one iText JAR in your classpath. Check if the add-on you are using includes the iText JAR and double-check that you are not including the JAR more than once.

Grails hangs on command line

I just downloaded Grails 2.0.1.
Created a new project and then tried adding the mysql connector as per the documentation but Grails hangs at command prompt without any message. I tried to execute in verbose and stacktrace mode but it prints nothing.
I tried cleaning and re-executing but all the grails commands are getting stuck.
They don't print anything beyond "configuring classpath" message .
Please help.
Thanks
Cleaning .ivy cache helps
$HOME/.grails/ivy-cache
Had the same problem on grails 2.0.4.
The cause was one of the repos not responding and grails waits for it to timeout.
Setting log "verbose" in BuildConfig.groovy helped me find which repository caused the problem.
Try to add --offline to te command
$ grails clean --offline
worked for me, as I was stuck on configuring classpath due to unresolved dependencies.

Ant: Logging via Log4j

My issue is to make ant logging in the way I need. So that I decided to use Log4j. As I has read from this article I set the ANT_OPTS:
set ANT_OPTS=-Dlog4j.debug -Dlog4j.configuration=file:///d:/ant_dir/lib/log4j.xml
When I try to execute the build.xml by the command:
D:/ant_dir>ant -listener org.apache.tools.ant.listener.Log4jListener
I catch an error: Class org.apache.tools.ant.listener.Log4jListener could not be loaded because of an invalid dependency.
The log4j.jar and log4j.xml are located in the ANT_HOME/lib directory.
I have been searching for a tutorial but found nothing.
Can somebody, please, help me with an advice or give a useful link?
Well, I found a solution. The problem was in log4j.jar. This file was corrupted. I have changed it and everithing is working now.

Resources