Tag: java

use docker-client api to start container in Java project

I am now using docker client api https://github.com/docker-java/docker-java in my Java project: CreateContainerResponse container = dockerClient .createContainerCmd(“ubuntu:java7”) .withCmd(“true”) .exec(); dockerClient .startContainerCmd(container.getId()) .exec(); When I start a new container using docker client api,the container is created,but i also finished.I use command “sudo docker ps” to list the running container now, what I created is not shown.I […]

Unable to find Spring libraries on the classpath

Demo project in GitHub I am trying to run a simple Spring 3.2.13 WebApp, inside a Docker Container running Jetty 7.6.3 with provided library dependencies. I’m doing this for legacy reasons. The company I am working for has existing infrastructure that I am needed to fit into. I have created a basic Spring WebApp that […]

Fitnesse error when used with spotify maven plugin and docker

I am using spotify maven plugin to create a fitnesse docker image and run it on a container. I am able to bring the fitnesse up and run the tests successfully locally without using spotify maven plugin and docker but not when I use those. I get the following error when I start the fitnesse […]

hbase hadoop DNS static init fails with UnknownHostException in docker while spring bean init if log file exists, but works after init

We have a spring boot service running in a docker container which uses hbase running in another docker container on the same host machine. The service also uses log4j2 for rolling logs. Log file path is mapped to the shared host directory via docker volume. The problem happens only if log file exists from the […]

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 […]

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