I'm trying to setup the sample app to load 100 docs in MarkLogic server using the spring batch git documentation but I get this error everytime I try to run my job:
*** What went wrong:
Execution failed for task ':runYourJob'.
> Could not resolve all files for configuration ':testRuntimeClasspath'.
> Could not download marklogic-xcc.jar (com.marklogic:marklogic-xcc:9.0.2)
> Could not get resource 'https://jcenter.bintray.com/com/marklogic/marklogic-xcc/9.0.2/marklogic-xcc-9.0.2.jar'.
> Could not GET 'https://repo.jfrog.org/artifactory/libs-release-bintray/com/marklogic/marklogic-xcc/9.0.2/marklogic-xcc-9.0.2.jar?referrer'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target**
The URL for the basic setup is here: https://github.com/marklogic-community/marklogic-spring-batch/wiki/Getting-Started
I'm using IntelliJ as the IDE & also tried to download & add the .jar to the classpath dependency. I'd appreciate any help here. I'm not sur if this could be a gradle issue.
EDIT: This error is common while building any marklogic gradle app & not specific to spring. I'm using MarkLogic 10 & gradle version 5.4.1 on adoptOpenJDK11 in a windows 10 machine.
Could not get resource 'https://jcenter.bintray.com/com/marklogic/marklogic-xcc/9.0.2/marklogic-xcc-9.0.2.jar'
The location https://jcenter.bintray.com/com/marklogic/marklogic-xcc/9.0.2/ does not contain the requested jar marklogic-xcc-9.0.2.jar. Make sure to point to a valid maven repository containing that jar.
The root cause of your error is that a dependency is missing in the build.gradle.
My Spring framework MVC version is:
MarkLogic Java API 5.3.0
JDK 11
Spring Framework 5.2.7
Spring Batch 4.2.4
If you clone the whole project and have not upgraded any dependencies:
Add line 24 in the core:build.gradle
Load gradle change in IntelliJ and clean deploy the project.
Upon the successful gradle build, an App server (in my case, App name is ml-spring-batch # 7010) is scaffolded:
In IntelliJ, execute gradle task against samples ONLY. In cmd, run task: gradle runYourJob. Upon the gradle task completion, 100 documents are loaded in the content database.
Related
I am currently trying to migrate an Project to Java 17
For this I upgraded the Gradle version to 7.3.3. Since this I get the following error when trying to build:
Plugin [id: 'com.gradle.enterprise', version: '3.7', artifact: 'com.gradle:gradle-enterprise-gradle-plugin:3.7'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'com.gradle:gradle-enterprise-gradle-plugin:3.7')
gradle-enterprise-gradle-plugin doesn’t seem to be referenced anywhere in the Gradle file.
Where does this come from? Why do Gradle needs this now?
Due to cooperate reasons I am currently not able to retrieve new libraries through Nexus (or Maven Central). How can I bypass this requirement or load the jar locally without the need to retrieve it via an online repository?
I tried Gradle 7.2, it seems to throw the same error.
i had this error while i'm building my capacitor project i tried by updating sdk but is not working, how can i fix this ?
google-services.json not found, google-services plugin not applied. Push Notifications won't
work
WARNING:: Using flatDirs should be avoided because it doesn't support any meta-data formats.
Currently detected usages:
- repository flatDir used in: project ':app', project ':capacitor-cordova-android-plugins'
WARNING:: Please remove usages of `jcenter()` Maven repository from your build scripts and
migrate your build to other Maven repositories.
This repository is deprecated and it will be shut down in the future.
See http://developer.android.com/r/tools/jcenter-end-of-service for more information.
Currently detected usages in: root project 'android', project ':app', project ':capacitor-
android', ...
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment
variable or by setting the sdk.dir path in your project's local properties file
at 'C:\Users\giova\Desktop\testapp\android\local.properties'.[capacitor]
[ERROR] An error occurred while running subprocess capacitor.
The solution was very simple, i had to select the project folder properly, anyways thanks for the help.
this is my first question on SO I'll try my best to make it good.
My team deploys multiple Java Cloud Functions (GCP) using a few common classes (with maven to manage dependencies). Right now those classes are duplicated in each function and have to be updated everywhere at each code edit. Each Cloud Function is deployed from source.
To avoid duplicating those classes I packaged them in a jar, everything runs fine locally. I added this jar as a local dependency in each Cloud Function pom file and tried to deploy from jar by building a jar with all dependencies and providing it in the --source option of gcloud deploy. This causes a timeout error from what seems to be the jar uploading.
Error trace :
DEBUG: Starting new HTTPS connection (1): storage.googleapis.com:443
DEBUG: Caught socket error, retrying: ('Connection aborted.', timeout('The write operation timed out',))
What I tried so far :
Setting a higher deployment timeout with gcloud config set app/cloud_build_timeout 10000 but this doesn't seem to apply to the uploading step as it fails always after a few minutes.
Uploading my local dependency to a private nexus repository to deploy my functions from source as before, but the pull failed on a Wagon error when I run mvn package and I didn't find any solution either : WagonTransporterFactory: Unsupported transport protocol
Detailed error :
[ERROR] Failed to execute goal on project get-content: Could not resolve dependencies for project project:cf:jar:1.0: Failed to collect dependencies at project:pipeline:jar:0.0.1: Failed to read artifact descriptor for project:pipeline:jar:0.0.1: Could not transfer artifact project:pipeline:pom:0.0.1 from/to project-nexus (XXX): Cannot access XXX with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access XXX using the registered transporter factories: WagonTransporterFactory: Unsupported transport protocol -> [Help 1]
I beleive this is only due to my jar with dependencies being to large for upload as I actually deployed the jar without dependency by mistake first (deploy succeded but class definition missing during execution). My question is how can I deploy my Cloud Function with one local/private dependency ?
Note :
I can't upload my dependency to a public maven repository
Each Cloud Function depends also on public maven dependencies which seems to be too large to package in a single jar for deployment
I solved this by switching from Maven to Gradle.
The problem was that Maven stores the repository authentification parameters in a local file ~/.m2/settings.xml that Google Build can't access when building my Cloud Function for deployment.
I switched to Gradle to provide the authenfication in the gradle.build file directly following this question.
I have an grails project, I am getting
"java.util.concurrent.ExecutionException: org.gradle.tooling.BuildException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-3.1-bin.zip'." error.
I have used
grails 3.3.6,
gradle 3.1,
jdk 1.8.
I am getting this error while implementing elastic search on it.
I got this error after added this dependency "runtime 'org.elasticsearch.plugin:mapper-attachments:2.4.6'" in build.gradle.
And I am using elasticsearch grails plugin is 2.4.0.
How to resolve this issue?
I'm trying to create the library of my backend project on Google Cloud to export it in an Android project. I'm following this guide:
https://cloud.google.com/appengine/docs/java/endpoints/consume_android#adding_the_client_library_to_the_project
This is what I wrote in cmd (as the guide said):
endpoints.cmd get-client-lib --war=<project-WAR-directory> -bs gradle com.app.example
but I got into this error:
INFO: Successfully processed <my_project_path>\war\WEB-INF/appengine-web.xml
Error: com.app.example
How can I avoid this error?
If you really just want to use the endpoints.cmd directly (you need to include the full path to your endpoint class, not the packageName):
endpoints.cmd get-client-lib --war=<wardir> -bs gradle com.app.fqn.EndpointClass
I believe that's why you're getting that error at the end
Alternatively if you're using android studio with appengine/endpoints, you might try the guide here : https://github.com/GoogleCloudPlatform/gradle-appengine-templates
If you're using gradle for a stand alone appengine project and just want to generate client library you can try some of the endpoints gradle commands (from https://github.com/GoogleCloudPlatform/gradle-appengine-plugin#tasks).
gradle appengineEndpointsGetClientLibs (will download the zip)
gradle appengineEndpointsExportClientLibraries (will download and jar the client libs)
gradle appengineEndpointsInstallClientLibraries (will download, package and install to local maven repo)