Tag: java

Send “sigterm” from Java to Bash script

I am starting a Java code from Bash script called start.sh. The Bash script fires up the Java code and then the Java code runs. At the end of the Java program, I want to send a signal back to the Bash script to terminate. Keep in mind that the Bash script runs with PID […]

Deploying Java War to Tomcat in Docker, error No Spring WebApplicationInitializer types detected on classpath

Locally I usually deploy this war to Wildfly successfully, but trying Tomcat and getting errors. In TravisCI I’m building my War with Maven and OpenJDK7 language: java jdk: – openjdk7 script: – mvn package Which creates the following in target/ classes rules-1.0-SNAPSHOT surefire generated-sources rules-MODELS-1.0-SNAPSHOT.jar surefire-reports jacoco.exec rules.war test-classes maven-archiver site Then I’m deploying the […]

Docker + JHipster + Memory usage goes up

I created JHipster projects and trying to execute it over a linux machine. All containers are created just fine, I can see them with “docker ps” and look at usage with “docker stats”. However, memory keeps going up and up.. eventualy my laptop (core i5, 10gb RAM) stops responding and die! I tried with mem_limit […]

Unable to connect to mongodb container using MongoJavaDriver

I can across this problem and found multiple people online with the same issue. I had been trying: new MongoClient(new ServerAddress(“0.0.0.0”, 27017), mongoClientBuilder.build()); I also tried “localhost” and “127.0.0.1” with no luck. The issues raised online had the same stack trace: INFO: Exception in monitor thread while connecting to server localhost:27017 com.mongodb.MongoSocketOpenException: Exception opening socket […]

Unable to start jetty container on Docker cloud

I try to start a jetty 9 container with my web.war application on docker cloud. The docker image work well on my computer, but stop after the startup when I run it on docker cloud. Here are the logs : 2016-07-25T06:15:47.715314954Z 2016-07-25 06:15:47.710:INFO::main: Logging initialized @2842ms 2016-07-25T06:15:49.046489560Z 2016-07-25 06:15:49.044:INFO:oejs.SetUIDListener:main: Setting umask=02 2016-07-25T06:15:49.138996816Z 2016-07-25 06:15:49.129:INFO:oejs.SetUIDListener:main: Opened […]

DB2 data source for a liberty java application

I’m tring to access a DB2 data source on a remote machine, by a java web app deployed on a liberty websphere machine. In the moment the code execute the lookup ok the data source from the context the following error returns to me: I FFDC1015I: An FFDC Incident has been created: “java.lang.ClassNotFoundException com.ibm.db2.jcc.DB2ConnectionPoolDataSource com.ibm.ws.injectionengine.processor.ResourceProcessor.loadTypeClass […]

how to fix “Failed to write core dump. Core dumps have been disabled” error while running java

i am using eclipse to develop a web application and i have encountered a problem when i am trying to run my application on server from within eclipse. # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f41e4e610b0, pid=3463, tid=139924549404416 # # JRE version: 7.0_09-b05 # […]

ProcessBuilder and Process.waitFor(), how long does ist wait?

I am executing an .exe-file from java, using the ProcessBuilder class and the Process class. To explain what I am doing: builder = new ProcessBuilder(commands); builder.redirectErrorStream(true); Process process = builder.start(); process.waitFor(); I just wanted to know, for how long is “waitFor()” waiting? Is it waiting until my .exe is executed, or is it waiting till […]

Cannot produce message to kafka from service running in docker

I’ve a rest service running in docker container on port 5000 which is used to produce message over kafka topic running out of docker container. I’ve configure my producer client with below properties :- bootstrap.servers=localhost:9093 And I’ve started my contained with below command:- docker run -d -p 127.0.0.1:5000:5000 <contained id> I’ve also made below configuration […]

Access Wildfly-Docker-Container from Apache-Docker-Container

to test my web-application I am building a Docker-Setup. In one container an apache is running on which the PHP-Frontend is deployed, another container has the wildfly with the actual application running (java .war-file) and a third container has a Postgresql-DB that holds the application’s data. When I am trying now to access the frontend […]

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