I am fairly new to grails and need help figuring out why I cannot run grails due to this error below:
grails> run-app
| Running application...
startup failed:
C:\DIR\grails-inventory\grails-app\controllers\harbor\AssetController.groovy: 3: unable to resolve class org.apache.jasper.compiler.Node.ParamsAction
# line 3, column 1.
import org.apache.jasper.compiler.Node.ParamsAction;
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> Compilation failed; see the compiler error output for details.
If I were to comment out that particular line in AssetController, grails will execute however the whole application will have NullPointer errors
Try to add this to Gradle dependencies:
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
// runtime 'mysql:mysql-connector-java:5.1.22'
compile 'tomcat:jasper-compiler:5.5.9'
}
You can find jasper for Grails 2.x:https://grails.org/plugin/jasper and plugins for Grails 3.x are here: https://bintray.com/grails/plugins, but as I see there is no Jasper plugin for Grails 3, so try to add dependency directly as mentioned above.
Related
when I download the files of Spring and added them to eclipse I get this error for the "Hello World" project;
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for C:\Program
Files\eclipse\spring-framework-5.1.9.RELEASE\libs\spring-context-indexer-5.1.9.RELEASE-sources.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class
org.springframework.context.index.processor.CandidateComponentsIndexer not in module
follow those steps to solve the problem;
1- download the lastes version of Spring in her (in my case it was, "5.2.0.RELEASE/ 30-Sep-2019 09:06") chose the spring-X.x.x.RELEASE-dist.zip.
2- Unzip the files.
3- in eclipse add extranl jars Steps In the Libs folder, don't take the ones with spring-xxx-X.x.x.RELEASE-sources.
4- done.
When I am running my code the Console shows the following error
"Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for
C:\Users\Ankit
Singh\Downloads\spring-framework-5.1.9.RELEASE\libs\spring-context-indexer-5.1.9.RELEASE-sources.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider
class
org.springframework.context.index.processor.CandidateComponentsIndexer
not in module
Default Package delete.
Reinstalled Spring library
Two different way to call beans
Can someone suggested whats wrong in my system??
You might use a default package, right? I have had the same error as you...
Listen, dude, you can try to click: your project name-properties-java build path, move your external jar(s) from module-path to classpath. Then, you can run the code again.
Environment:
JDK: 10
Maven: 3.5
Maven compiler plugin: 3.7.0
When my project depends on javax.transaction-api:1.2, it does compile without any error. My module-info.java contains:
module my.component {
requires javax.transaction.api;
// other required modules ...
}
However, when my project depends on javax.transaction-api:1.3, the java compiler yields an assertion error. Note that in that case, my module-info.java contains:
module my.component {
requires java.transaction;
// other required modules ...
}
(since the automatic module name of javax.transaction-api is set to java.transaction in the manifest of the 1.3 version)
The assertion error is:
Exception in thread "main" java.lang.AssertionError
at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:155)
at jdk.compiler/com.sun.tools.javac.util.Assert.check(Assert.java:46)
at jdk.compiler/com.sun.tools.javac.comp.Modules.enter(Modules.java:244)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.readSourceFile(JavaCompiler.java:829)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$ImplicitCompleter.complete(JavacProcessingEnvironment.java:1506)
at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1308)
at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.complete(Type.java:1139)
at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.getTypeArguments(Type.java:1065)
at jdk.compiler/com.sun.tools.javac.code.Printer.visitClassType(Printer.java:237)
at jdk.compiler/com.sun.tools.javac.code.Printer.visitClassType(Printer.java:52)
at jdk.compiler/com.sun.tools.javac.code.Type$ClassType.accept(Type.java:992)
at jdk.compiler/com.sun.tools.javac.code.Printer.visit(Printer.java:136)
at jdk.compiler/com.sun.tools.javac.util.AbstractDiagnosticFormatter.formatArgument(AbstractDiagnosticFormatter.java:197)
at jdk.compiler/com.sun.tools.javac.util.AbstractDiagnosticFormatter.formatArguments(AbstractDiagnosticFormatter.java:165)
at jdk.compiler/com.sun.tools.javac.util.BasicDiagnosticFormatter.formatMessage(BasicDiagnosticFormatter.java:111)
at jdk.compiler/com.sun.tools.javac.util.BasicDiagnosticFormatter.formatMessage(BasicDiagnosticFormatter.java:67)
at jdk.compiler/com.sun.tools.javac.util.AbstractDiagnosticFormatter.formatArgument(AbstractDiagnosticFormatter.java:183)
at jdk.compiler/com.sun.tools.javac.util.AbstractDiagnosticFormatter.formatArguments(AbstractDiagnosticFormatter.java:165)
at jdk.compiler/com.sun.tools.javac.util.BasicDiagnosticFormatter.formatMessage(BasicDiagnosticFormatter.java:111)
at jdk.compiler/com.sun.tools.javac.util.BasicDiagnosticFormatter.formatMessage(BasicDiagnosticFormatter.java:67)
at jdk.compiler/com.sun.tools.javac.util.JCDiagnostic.getMessage(JCDiagnostic.java:771)
at jdk.compiler/com.sun.tools.javac.api.ClientCodeWrapper$DiagnosticSourceUnwrapper.getMessage(ClientCodeWrapper.java:799)
This looks like a conflict between the java.transaction module name used by default in the JRE, and the module name declared in the manifest of the javax.transaction-api:1.3 jar file.
Is there a compiler option to prevent this assertion error from occurring?
When I try to run
gradlew 'task'
I get this following error message:
(I am obviously missing some jenkins plugins)
* What went wrong:
Error resolving plugin [id: 'com.terrafolio.jenkins', version: '1.3.2'].
> Could not resolve all dependencies for configuration 'detachedConfiguration1'.
> Could not find org.jenkins-ci.plugins:job-dsl-core:1.42.
Searched in the following locations:
https://plugins.gradle.org/m2/org/jenkins-ci/plugins/job-dsl-
core/1.42/job-dsl-core-1.42.pom
https://plugins.gradle.org/m2/org/jenkins-ci/plugins/job-dsl-
core/1.42/job-dsl-core-1.42.jar
Required by:
unspecified:unspecified:unspecified > com.terrafolio:gradle-jenkins-plugin:1.3.2
My task looks like this: (running a groovy script)
task testDeployOsb << {
javaexec {
classpath = configurations.osb
main = 'groovy.ui.GroovyMain'
args = ["support-scripts/deployAlsb.groovy",
"${buildDir}/deployment.groovy"]
jvmArgs = ["-Dweblogic.MaxMessageSize=200000000",
"-Dweblogic.CompleteT3MessageTimeout=480",
"-Dweblogic.CompleteMessageTimeout=480",
"-Dweblogic.wsee.transport.read.timeout=600000",
"-Dweblogic.wsee.transport.connection.timeout=600000"]
}
}
So how do I install said plugins?
You will have define at least one repository that can serve the external plugin. Maven Central seems to have it. Also the Gradle plugin portal hosts the plugin. You can find the notation for including it here.
We are migrating maven project to gradle. We have flex for front end and as requested we are migrating it as well using gradlefx. Have added the dependencies:
dependencies{
classpath 'com.adobe.flex.framework:flex-framework:4.0.0.14159'
classpath files("./libs/flex/parsley-core-3.0.0.swc")
classpath files("./libs/flex/parsley-flex-3.0.0.swc")
classpath files("./libs/flex/legacy-parsley-commands-2.5.0.swc")
classpath files("./libs/flex/spicelib-commands-3.1.1.swc")
classpath files("./libs/flex/spicelib-reflect-3.0.0.swc")
classpath files("./libs/flex/spicelib-util-3.1.0.swc")
}
2.My mxml has contents like:
<?xml version="1.0" encoding="utf-8"?>
<Object xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns="http://www.spicefactory.org/parsley">
<fx:Script><![CDATA[//some imports]]></fx:Script></Object>
However on build am getting following error.
[ant:java] Java Result: 1
FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task :Common_Components:compileFlex.
java.lang.Exception: mxmlc execution failed: Loading configurationfile D:\Softwares\flex_sdk_4.6\frameworks\flex-config.xmlD:\Xyz\Workspace\Common_Components\src\com\abc\common\MenuContext.mxml(9): Error: Could not resolve to a component implementation. xmlns:presentation1="com.abc.helpframework.presentation.*">`
The same setup is working for other mxml file. I doubt with object tag, not very sure though.