Tag: java

Maven docker cache dependencies

I’m trying to use docker to automate maven builds. The project I want to build takes nearly 20 minutes to download all the dependencies, so I tried to build a docker image that would cache these dependencies, but it doesn’t seem to save it. My Dockerfile is FROM maven:alpine RUN mkdir -p /usr/src/app WORKDIR /usr/src/app […]

Profiling Java application in kubernetes

I want to profile my play application on my Kubernetes cluster. I am using VisualVM, and the steps that I have taken are as follows: Image is built on ubuntu latest Running my play application with the following args: “-Dcom.sun.management.jmxremote”, “-Dcom.sun.management.jmxremote.ssl=false”, “-Dcom.sun.management.jmxremote.authenticate=false”, “-Dcom.sun.management.jmxremote.port=1098” My Image has apt-get install -y visualvm I do kubectl port-forward <Container> […]

Error while running Wildfly 10.1.0 – Failed to parse configuration and Current event not START_ELEMENT

Whenever I try try to run my docker container which contains Wildfly Server 10.1.0 I get the following error: JAVA_OPTS already set in environment; overriding default settings with values: -Djboss.server.log.dir=/ext/logs JBoss Bootstrap Environment JBOSS_HOME: /opt/wildfly JAVA: /opt/jdk1.8.0_60/bin/java JAVA_OPTS: -server -Djboss.server.log.dir=/ext/logs ========================================================================= 14:16:45,038 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final 14:16:45,634 INFO [org.jboss.msc] (main) JBoss MSC […]

Docker WSO2 Publisher: Failed to load class “org.slf4j.impl.StaticLoggerBinder”

we are currently creating a publisher 2.1 docker from the wso2apim/docker-compose/pattern3 dockerfiles. When we start the container, this message appears and no logging happens anymore: 15.2.2017 14:54:33Using Java memory options: -Xms256m -Xmx1024m -XX:MaxPermSize=256m 15.2.2017 14:54:35SLF4J: Failed to load class “org.slf4j.impl.StaticLoggerBinder”. 15.2.2017 14:54:35SLF4J: Defaulting to no-operation (NOP) logger implementation 15.2.2017 14:54:35SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. […]

Maven build with parameter somehow cache parameter in war?

i’ve encountered problem with different behavior on different environment with same application. Let’s begin: I’m building application through Jenkins pipeline, where firstly i’m using mvn install to create war, with parameter with database port DBD_PORT to connect to while integration testing: mvn clean install -DextConfig=${env.WORKSPACE}/<appPath>/<appTestsIT>.properties -Ddb.port=${DBD_PORT}” then i’m using war created through this command and […]

Docker & Excelsior JET

I’ve been trying to get my head around Docker and if it can be used with a Java application that has been compiled with JET. I found the following documentation on the JET website here, which suggests that using Docker should indeed be possible using the alpine-glibc image base, I cannot get it to run […]

Execute JUnit tests inside Docker container

I would like to build a test environment with Docker, where I can remotely send JUnit test classes (including the code that is tested), execute the tests and retrieve the results. I found some articles which explained how to use docker for testing databaseconntection/writing inside a redis, but not how i can simple let my […]

BadRequestException: HTTP 400 Bad Request when try to start a docker container with spotify docker-client

I’m trying to start an existing image with spotifi docker-client. My code snippet is below final DockerClient docker = DefaultDockerClient.fromEnv().build(); final ContainerConfig containerConfig = ContainerConfig.builder().hostConfig(hostConfig).image(“3298e7596fb5”).attachStdin(true).attachStderr(true).attachStdout(true).build(); final ContainerCreation creation = docker.createContainer(containerConfig); final String id = creation.id(); final ContainerInfo info = docker.inspectContainer(id); docker.startContainer(id); When running this I’m getting below exception DefaultDockerClient:578 – Creating container with ContainerConfig: ContainerConfig{hostname=null, […]

Jenkins Slave can't read settings.xml

I have created a jenkins slave image for Docker, which I want to use to build all of my Java projects, however, I can’t work out how to reference the .m2/settings.xml file to tell it where to pull from. My Dockerfile is: FROM openjdk:8 MAINTAINER Chris Hudson <chudson@amelco.co.uk> RUN apt-get -qqy update && \ apt-get […]

Deploying to dockerized Jboss Zip Exception

It´s works fine on my mac. But when I deploy the ear file (or the war that´s inside) I get a zip exception error. My docker image use centos:latest, I yum´d unzip, I use JBoss EAP 6.4 and the latest server JDK from Oracle. I have the same problem either if I copy the ear […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.