Drools Workbench Non-readable POM - maven

I'm trying to use drools workbench to create rules, the following commands have been executed to pull the docker image and run a container:
docker pull jboss/drools-workbench-showcase
docker run -p 8080:8080 -p 8001:8001 -d --name drools-workbench jboss/drools-workbench-showcase:latest
The drools workbench gets up and running as expected, however, when I try to add project, Non-readable POM error shows up:
drools workbench error log:
2019-05-27 01:38:03,688 ERROR [org.appformer.maven.integration.MavenRepository] (EJB default - 1) Error while trying to
erase directory from local maven repository /opt/jboss/.m2/repository/org/kie/kie-api/7.18.0.Final
2019-05-27 01:38:03,689 ERROR [org.appformer.maven.integration.MavenRepository] (default task-8) Error while trying to e
rase directory from local maven repository /opt/jboss/.m2/repository/org/kie/kie-api/7.18.0.Final
2019-05-27 01:38:03,694 ERROR [org.appformer.maven.integration.embedder.MavenProjectLoader] (Thread-241) Unable to creat
e MavenProject from InputStream: org.apache.maven.project.ProjectBuildingException: 1 problem was encountered while buil
ding the effective model
[FATAL] Non-readable POM : input contained no data #
for project
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:168)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:126)
at org.appformer.maven.integration.embedder.MavenEmbedder.readProject(MavenEmbedder.java:308)
at org.appformer.maven.integration.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:91)
at org.appformer.maven.integration.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:84)
at org.appformer.maven.integration.MavenPomModelGenerator.parse(MavenPomModelGenerator.java:34)
at org.appformer.maven.support.PomModel$Parser.parse(PomModel.java:110)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildPomModel(KieBuilderImpl.java:534)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.getPomModel(KieBuilderImpl.java:511)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.init(KieBuilderImpl.java:152)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:211)
at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:203)
at org.kie.workbench.common.services.backend.builder.core.Builder.build(Builder.java:213)
at org.kie.workbench.common.services.backend.builder.core.BuildHelper.build(BuildHelper.java:92)
My OS is Windows 10, and the Drools Workbench version is 7.18.Final, have I missed any configuration? I checked the official guide and searched the web, but haven't found solution yet.

Related

Spring Boot app in Docker container not starting in Cloud Run after building successfully - cannot access jarfile

I've set up continuous deployment to Cloud Run from GitHub for my Spring Boot project, and while it's successfully building in Cloud Build, when I go over to Cloud Run, I get the following error under Creating Revision:
The user-provided container failed to start and listen on the port defined provided by the PORT=8080 environment variable.
When I go over to the Logs, I see the following errors:
2022-09-23 09:42:47.881 BST
Error: Unable to access jarfile /app/target/educity-manager-0.0.1-SNAPSHOT.jar
{
insertId: "632d7187000d739d29eb84ad"
labels: {5}
logName: "projects/educity-manager/logs/run.googleapis.com%2Fstderr"
receiveTimestamp: "2022-09-23T08:42:47.883252595Z"
resource: {2}
textPayload: "Error: Unable to access jarfile /app/target/educity-manager-0.0.1-SNAPSHOT.jar"
timestamp: "2022-09-23T08:42:47.881565Z"
}
2022-09-23 09:43:48.800 BST
run.googleapis.com
…ager/revisions/educity-manager-00011-fod
Ready condition status changed to False for Revision educity-manager-00011-fod with message: Deploying Revision.
{
insertId: "w6ptr6d20ve"
logName: "projects/educity-manager/logs/cloudaudit.googleapis.com%2Fsystem_event"
protoPayload: {
#type: "type.googleapis.com/google.cloud.audit.AuditLog"
resourceName: "namespaces/educity-manager/revisions/educity-manager-00011-fod"
response: {6}
serviceName: "run.googleapis.com"
status: {2}}
receiveTimestamp: "2022-09-23T08:43:49.631015104Z"
resource: {2}
severity: "ERROR"
timestamp: "2022-09-23T08:43:48.800371Z"
}
Dockerfile is as follows (and looking at the build log all of the commands in it completed successfully):
FROM openjdk:17-jdk-alpine
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
COPY . /app
ENTRYPOINT [ "java","-jar","/app/target/educity-manager-0.0.1-SNAPSHOT.jar" ]
I've read that Cloud Run defaults to exposing Port 8080, but just to be on the safe side I've put server.port=${PORT:8080} in my application.properties file (but it seems to make no difference one way or the other).
I have run into similar issues in the past. Usually, I am able to resolve this issue by:
specifying the port in the application itself (as you indicated in your post), and
exposing the required port in my dockerfile eg. EXPOSE 8080
Oh my good god I have done it. After two full days of digging, I realised that because I was doing it through github, my .gitignore file was excluding the /target folder containing the jar file, so Cloud Build never got the jar file mentioned in the Dockerfile.
I am going to have a cry and then go to the pub.

503 from server: Service Unavailable: Back-end server is at capacity

I'm trying to build a jib based container with gradle.
I'm getting a 503 error when it tries to GET an xml file from jfrog.org.
+ eval set -- '"-Xmx64m"' '"-Xms64m"' '"-Xdock:name=Gradle"' '"-Xdock:icon=/Users/username/VSCode/globality-karate-testing/media/gradle.icns"' '"-Dorg.gradle.appname=gradlew"' -classpath '"/Users/username/VSCode/globality-karate-testing/gradle/wrapper/gradle-wrapper.jar"' org.gradle.wrapper.GradleWrapperMain ''\''jibDockerBuild'\'' \
'
++ set -- -Xmx64m -Xms64m -Xdock:name=Gradle -Xdock:icon=/Users/username/VSCode/globality-karate-testing/media/gradle.icns -Dorg.gradle.appname=gradlew -classpath /Users/username/VSCode/globality-karate-testing/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain jibDockerBuild
+ exec /Users/username/.sdkman/candidates/java/current/bin/java -Xmx64m -Xms64m -Xdock:name=Gradle -Xdock:icon=/Users/username/VSCode/globality-karate-testing/media/gradle.icns -Dorg.gradle.appname=gradlew -classpath /Users/username/VSCode/globality-karate-testing/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain jibDockerBuild
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'karate-base'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.jfrog.buildinfo:build-info-extractor-gradle:4.+.
Required by:
project :
> Failed to list versions for org.jfrog.buildinfo:build-info-extractor-gradle.
> Unable to load Maven meta-data from https://repo.jfrog.org/artifactory/gradle/org/jfrog/buildinfo/build-info-extractor-gradle/maven-metadata.xml.
> Could not get resource 'https://repo.jfrog.org/artifactory/gradle/org/jfrog/buildinfo/build-info-extractor-gradle/maven-metadata.xml'.
> Could not GET 'https://repo.jfrog.org/artifactory/gradle/org/jfrog/buildinfo/build-info-extractor-gradle/maven-metadata.xml'.
Received status code 503 from server: Service Unavailable: Back-end server is at capacity
This appears to be a problem with the jfrog.org server.
It only seems to happen if this is the first time someone has built the project.
Another engineer was able to replicate my error, who had not built this prior.
An engineer who had built the project earlier does not have problems. Seems to be an initialization file.
Heard back from Jfrog support.
The repo https://repo.jfrog.org/artifactory/ has been deprecated.
Replace it with: https://repo1.maven.org/maven2

Could not find agent library jdwp:transport on the library path

How to run tomcat with debug from idea on mac, getting error:
/Users/konrad/Applications/apache-tomcat-9.0.12/bin/catalina.sh run
[2018-10-25 01:56:13,230] Artifact Gradle : com.test : MyService.war: Waiting for server connection to start artifact deployment...
Error occurred during initialization of VM
Could not find agent library jdwp:transport on the library path, with error: dlopen(libjdwp:transport.dylib, 1): image not found
Disconnected from server
VM options:
-DprofileName=dev -agentlib:jdwp:transport=dt_socket,server=y,address=8000, suspend=n
I'm using InteliJ and Tomcat 9 with debug on Mac

Apache beam WordCount running error in windows

Trying to run WordCount example of Apache Beam (version 2.0.0) by first running
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.beam \
-DarchetypeArtifactId=beam-sdks-java-maven-archetypes-examples \
-DarchetypeVersion=2.0.0 \
-DgroupId=org.example \
-DartifactId=word-count-beam \
-Dversion="0.1" \
-Dpackage=org.apache.beam.examples \
-DinteractiveMode=false
then running
$ mvn compile exec:java -Dexec.mainClass=org.apache.beam.examples.WordCount -Dexec.args="--inputFile=pom.xml --output=counts" -Pdirect-runner
and getting the following error
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default-cli) on project word-count-beam: An exception occured while executing the
Java class. null: InvocationTargetException: java.lang.IllegalStateException: U
nable to find registrar for d -> [Help 1]
However, if I run the same project downloaded and built in Mar 2017 (Beam v0.6.0), everything works fine. I just wonder what update of the Beam release causes this error.
This error happens due to TextIO#from("path_to_file") method doesn't support Windows file system paths.
For example the following code throws IllegalStateException:
TextIO.read().from("d:\\file.txt") // also "file:\\D:\\file.txt" throw exc
Exception in thread "main"
org.apache.beam.sdk.Pipeline$PipelineExecutionException:
java.lang.IllegalStateException: Unable to find registrar for d
I hope that Apache Beam team will fix it in near future...
This error seems to indicate you are trying to access a file with invalid scheme.
It comes from here: FileSystems.java
It may be an issue with your OS.
Can you provide information about your OS and dev environment?
EDIT:
Since you're using Windows as you say and as MeetJoeBlack explains - my first assumption was probably correct.
I suggest you try to run the code via Docker using this Maven Docker Image
You can read the howto in there - If you need more help just ping me.

Staging Error while Pushing a Spring Application to Cloud Foundry

I am getting the following Error while pushing the Sample Hello World spring application on CloudFoundry.
Using manifest file C:\Users\I321571\Desktop\helo\Hello\manifest.yml
Updating app Hello in org trial / space I321571 as I321571...
OK
Uploading Hello...
Uploading app files from: C:\Users\I321571\Desktop\helo\Hello
Uploading 20.1K, 46 files
Done uploading
OK
Stopping app Hello in org trial / space I321571 as I321571...
OK
Starting app Hello in org trial / space I321571 as I321571...
-----> Downloaded app package (12K)
Cloning into '/tmp/buildpacks/java-buildpack'...
-----> Java Buildpack Version: b050954 | https://github.com/cloudfoundry/java-buildpack.git#b050954
[Buildpack] ERROR Compile failed with exception #<RuntimeError: No container can run this application. Please ensure that you've pushed a valid JVM artifact or artifacts using the
-p command line argument or path manifest entry. Information about valid JVM artifacts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation. >
No container can run this application. Please ensure that you've pushed a valid JVM artifact or artifacts using the -p command line argument or path manifest entry. Information about valid JVM artifac
ts can be found at https://github.com/cloudfoundry/java-buildpack#additional-documentation.
Staging failed: Buildpack compilation step failed
FAILED
Error restarting application: BuildpackCompileFailed
TIP: use 'cf logs Hello --recent' for more information
this is my manifest.yml
applications:
- name: Hello
memory: 512M
instances: 1
Please help me in resolving the issue.
I encountered this error too!
Make sure the command given is valid
cf push {your-app-name} -p {path to your executable jar}

Resources