I'm trying to generate the code using this java-spring-template using this async API definition. After building it, when I try to start using ./gradlew bootRun , it gives the following error.
Can someone point out the issue in the definition please?
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean named 'signedupOutboundChannel' that could not be found.
Related
java.lang.NoSuchMethodError: io.grpc.NameResolverProvider.getScheme()Ljava/lang/String;
at io.grpc.NameResolverRegistry.refreshProviders(NameResolverRegistry.java:96) ~[grpc-api-1.42.2.jar:3.4.7]
at io.grpc.NameResolverRegistry.getDefaultRegistry(NameResolverRegistry.java:131) ~[grpc-api-1.42.2.jar:3.4.7]
at net.devh.boot.grpc.client.autoconfigure.GrpcClientAutoConfiguration.grpcNameResolverRegistration(GrpcClientAutoConfiguration.java:119) ~[grpc-client-spring-boot-autoconfigure-2.13.1.RELEASE.jar:2.13.1.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_321]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_321]
2022-11-10 17:22:36.290 ERROR 21408 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Action:
Correct the classpath of your application so that it contains compatible versions of the classes io.grpc.NameResolverRegistry and io.grpc.NameResolverProvider
Process finished with exit code 0
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
io.grpc.NameResolverRegistry.refreshProviders(NameResolverRegistry.java:96)
The following method did not exist:
io.grpc.NameResolverProvider.getScheme()Ljava/lang/String;
The calling method's class, io.grpc.NameResolverRegistry, was loaded from the following location:
jar:file:/C:/Users/Bashlaw/.gradle/caches/modules-2/files-2.1/io.grpc/grpc-api/1.42.2/dd67a2446043d3903f7e0532d17b8bd2f1bfe67a/grpc-api-1.42.2.jar!/io/grpc/NameResolverRegistry.class
The called method's class, io.grpc.NameResolverProvider, is available from the following locations:
jar:file:/C:/Users/Bashlaw/.gradle/caches/modules-2/files-2.1/com.github.AfricasTalkingLtd.africastalking-java/core/3.4.8/dba39ba2047b38c53c9e645d535a1db6c1164219/core-3.4.8.jar!/io/grpc/NameResolverProvider.class
jar:file:/C:/Users/Bashlaw/.gradle/caches/modules-2/files-2.1/io.grpc/grpc-api/1.42.2/dd67a2446043d3903f7e0532d17b8bd2f1bfe67a/grpc-api-1.42.2.jar!/io/grpc/NameResolverProvider.class
The called method's class hierarchy was loaded from the following locations:
io.grpc.NameResolverProvider: file:/C:/Users/Bashlaw/.gradle/caches/modules-2/files-2.1/com.github.AfricasTalkingLtd.africastalking-java/core/3.4.8/dba39ba2047b38c53c9e645d535a1db6c1164219/core-3.4.8.jar
io.grpc.NameResolver.Factory: file:/C:/Users/Bashlaw/.gradle/caches/modules-2/files-2.1/com.github.AfricasTalkingLtd.africastalking-java/core/3.4.8/dba39ba2047b38c53c9e645d535a1db6c1164219/core-3.4.8.jar
I tried to exclude the path on gradle but am still getting class path conflict error.
I will appreciate your help here:
The com.github.AfricasTalkingLtd.africastalking-java:core dependency is built as an application. That means that it contains all of its dependencies - it's a so-called uber-JAR.
Since the core dependency contains only one class, which provides only a main method, try replacing it with the separate modules. These are the ones included by core:
compile project(":airtime")
compile project(":payment")
compile project(":sms")
compile project(":ussd")
compile project(":voice")
compile project(":token")
compile project(":server")
compile project(":application")
Includes the ones you need, and your problem should be resolved - gRPC is included from its own dependency, not from this core dependency. Your application can also become smaller if you omit modules you don't need.
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.
I am trying to initialize and build a Springboot Application that uses AWS dependencies on Net Beans, however, I am having a problem building the project. After resolving the errors after creating the project I am getting an error when I try to build. The message I get is
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.aws.context.support.io.ResourceLoaderBeanPostProcessor#0': Cannot resolve reference to bean 'amazonS3' while setting constructor argument;
I found some previous answers saying to put cloud.aws.stack.auto=false in my application.properties file, however, I seem to be getting the same problem after I clean and build again.
If you are building/ testing or running locally (as opposed to EC2) then you need to have a region property such as in application.properties assuming you use the default profile for build and test.
cloud.aws.region.static=us-east-1
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.
On a Weblogic portal I am getting error.
Details - not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
How to overcome this, as my url is showing some different content ?
It is because you failed to instantiate a module or inject a dependency that you are using.