I'm faced with an interesting problem. I have an intellij plugin which creates an intellij tool window which, as part of its functionality, uses a websocket. In my build.gradle, I have compile group: 'org.glassfish.tyrus.bundles', name: 'tyrus-standalone-client', version: '1.15'. When I run my java code as an application and trigger the methods programmatically, or using JFrame guis, the websocket runs as it should. However, when using the same compile line in my plugin tool window, I get the following error.
java.lang.RuntimeException: java.lang.RuntimeException: Could not find an
implementation class.
at ElasticsearchClientEndpoint.<init>(ElasticsearchClientEndpoint.java:19)
Caused by: java.lang.RuntimeException: Could not find an implementation class.
at javax.websocket.ContainerProvider.getWebSocketContainer(ContainerProvider.java:73)
at ElasticsearchClientEndpoint.<init>(ElasticsearchClientEndpoint.java:16)
I've tried running the plugin from a project which has the same dependency but I still get this error. I can't work out why I'm getting this error, any help would be excellent.
Related
Currently using Java SDK 11.0.17-amzn along with Gradle 6.0.1 on Apple Silicon. The project is unable to read system environment variables due to the M1 Mac and requires an update to Gradle 7.x. This requires me to reconfigure Gradle in the project but I'm currently running into this issue on build:
FAILURE: Build failed with an exception.
* What went wrong:
Could not find method layout() for arguments [pattern, org.jfrog.gradle.plugin.artifactory.extractor.listener.ProjectsEvaluatedBuildListener$_createIvyRepo_closure3$_closure6#45d54492] on object of type org.gradle.api.internal.artifacts.repositories.DefaultIvyArtifactRepository.
Currently I haven't found anything on this particular error. Other changes made before reaching this error were:
testRuntime 'com.tngtech.archunit:archunit-junit5-engine:0.11.0' was changed to:
testImplementation 'com.tngtech.archunit:archunit-junit5-engine:0.11.0'
Commented out id "maven"
I added this library from GitHub into my android app:
implementation 'com.github.quiin:unifiedContactPicker:1.0'
Now, this library uses other libraries from GitHub.
When I run my app, it tells me that these internal libraries are not found, so I dig them up and find their dependencies and add them to my app's Gradle file. But the problem is that they are not being detected and this is the error I am getting both times.
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not find com.hootsuite.android:nachos:1.0.0.
Required by:
project :app > com.github.quiin:unifiedContactPicker:1.0
Possible solution:
Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Please help, I have been stuck at this for a long time and I need to use this dependency. I have also tried using similar dependencies that fulfil my purpose but they all seem to have the same problem. So I don't know if there's a problem with my project or the libraries.
I had the same problem but with geok library. I checked syntax of dependencies declaration lines on JitPack website and there were different than I had on my build.gradle file. Finally I changed
from:
implementation "com.github.piruin:geok:$geokVersion"
implementation "com.github.piruin.geok-gson:$geokVersion"
to:
implementation "com.github.piruin.geok:geok:$geokVersion"
implementation "com.github.piruin.geok:geok:$geokVersion"
and it works.
I am getting this error message when I try to compile my new modularized Java 11 application:
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for C:\Users\inter\.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.apache.bsf.BSFManager not in module
This appears to be an issue from a dependency of a dependency. I can't even find which module is pulling it in so I can update it.
I am using openjdk 11.0.2, IntelliJ 2018.3.4, Maven
Any advice how I can troubleshoot or fix this? I have found very little documentation on this issue.
Xalan
I had a look at their bug tracker following their index page and wasn't able to find this reported and not sure how actively is the library being maintained either.
General Explanation
Just to explain what has caused the issue in your code, I would share a screenshot and then try to add details around it.
So within the JAR that for version 2.7.2, there are service declarations (META-INF/services) which include org.apache.xalan.extensions.bsf.BSFManager as one of them. The service file here has to indicate the Provider thereby for itself and the class is supposed to be present on the modulepath to be resolved for reliable configuration of modules.
In this case for the module xalan(automatic module), the service listed doesn't have the provider class packaged within the dependency itself. (See the package org.apache, it doesn't further have package bsf and the class BSFManager thereby. Hence the exception as you get.
Short term hack
One of the tweaks to get that resolved would be to get update the library jar (patch it) and get rid of the service file if you're not using it. Or to add the provider copied from the corresponding artifact.
If you don't directly depend on this artifact or its parent dependencies, you can let those remain on the --classpath and get resolved as an unnamed module for your application.
Long term solve
An ideal way would be to report this to the maintainers and getting it resolved. It depends though on how actively are they maintaining it e.g. the last release for xalan was almost 5 years back, might just want to look for an actively participated alternative in my opinion.
I tried to install update for TestNG in eclipse:
"Help -> Check for updates -> deselect all and select TestNG check box. Then
install latest version i installed the version which starts with 7.2.0.
It fixed the issue for me.
I'm trying to set up the PubNub jar as a library in my Android Studio project. The project is something I am porting over from another computer, so I'm mostly copying things in.
It appears between then and now that I now have to configure the AnnotationProcessor of this jar, but I'm really not sure what that requires, nor have I been able to find an example that fits my issue.
When I try to compile my project, I am left with this message:
Error:FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:javaPreCompileDebug'.
Annotation processors must be explicitly declared now.
The following dependencies on the compile classpath are found to contain annotation processor.
Please add them to the annotationProcessor configuration- pubnub-gson-4.19.0-all.jar (pubnub-gson-4.19.0-all.jar).
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior.
Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error- message.html for more details.
I'm really not sure at all what this is telling me to do, and the examples I can find of annotationprocessor on the internet (none for PubNub) all are pointing to packages and classes, which I don't see what I am suppose to do with.
Can someone lead me down the correct path?
I apologize for the formatting of the error, but the site wouldn't let me submit it in blockquotes because it was "improperly formatted code."
Try to add this line in your dependencies{} block:
annotationProcessor files('libs/pubnub-gson-4.19.0-all.jar')
(along with the implementation files('libs/pubnub-gson-4.19.0-all.jar'))
It works in my case.
I have a dependency resolution issue with another plugin, which is causing the following error:
Caused by: java.lang.IncompatibleClassChangeError
at grails.plugin.mail.MailMessageContentRenderer$RenderEnvironment.init(MailMessageContentRenderer.groovy:125)
at grails.plugin.mail.MailMessageContentRenderer$RenderEnvironment.with(MailMessageContentRenderer.groovy:158)
at grails.plugin.mail.MailMessageContentRenderer.render(MailMessageContentRenderer.groovy:47)
at grails.plugin.mail.MailMessageBuilder.doRender(MailMessageBuilder.groovy:235)
at grails.plugin.mail.MailMessageBuilder.html(MailMessageBuilder.groovy:253)
The way to recreate the error:
Install jaxrs 0.7 plugin and its dependencies in build config: spock 0.7 and org.springframework:spring-test:3.1.2.RELEASE
When I do run-app, since everything is loaded directly from resources, there is no error. However, doing a run-war, as dependencies are resolved I get the the above error.
The mail plugin depends on org.springframework:spring-test:3.1.0.RELEASE which gets kicked out. So, probably that is the reason.
Any suggestions on how to deal with this issue? I don't necessarily want to recompile the plugin separately as it becomes hard to maintain. I already tried a lot of combination in buildconfig for exclusion, but doesn't seem to work.
Thanks.