Category: English

Java and Wildcard SSL certificate issues

Today I faced a nasty issue using a valid signed wildcard SSL certificate from symantec. PKIX path building failed: unable to find valid certification path to requested target
	at SSLTest.<init>(
	at SSLTest.main(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at com.intellij.rt.execution.application.AppMain.main(
Caused by: PKIX path building failed: unable to find valid certification path to requested target
	... 17 more
Caused by: unable to find valid certification path to requested target
	... 23 more

Since the certificate is valid and the ROOT CA was actually in the Java cacerts keystore, it still did not work. First I tried to run my java application with ****** to see what is really going on. I noticed the the intermediate certificate was not in the cacerts keystore.

I had to importing the intermediate certificate to the keystore was causing the cert chain to break. I downloaded the missing intermediate cert from symantec (you can see the download link to the missing cert in the ssl handshake log: in my case).

And I imported the cert in the java keystore. After importing the intermediate certificate my wildcard ssl cert finally started working:

keytool -import -keystore ../jre/lib/security/cacerts -trustcacerts -alias "VeriSign Class 3 International Server CA - G3" -file /pathto/SVRIntlG3.cer

And voila!

Hooking up Cloud Foundry app to New Relic

How to integrate Cloud Foundry and New Relic

New Relic provides indepth insight into your apps. Now how can you befit from it using Cloud Foundry and the Java buildpack? This is easy, read on!

If you are using the hosted version you can easily add new relic to your application using the marketplace.


After the new relic services has been bound to your application it takes a few minutes before data starts to appear. Eventually your dashboard will show data like this:

image2013-11-15 16-44-40

Users that run a private Cloud Foundry installation or want to hookup and existing New Relic account to their application can do the following. Create a user-provided service (see New Relic contraints described here: Make sure that the service name contains newrelic. Next, specify your New Relic licenseKey.

cf create-service user-provided
Name?> newrelic-some_unique_string
What credential parameters should applications use to connect to this service instance?
(e.g. hostname, port, password)> licenseKey
licenseKey> newrelic_license_key
Creating service newrelic-some_unique_string... OK

Now bind the service to your app:

cf bind-service newrelic-some_unique_string
1: helloworld
Which application?> 1

Restart your app and you are done!

cf restart helloworld
Using manifest file manifest.yml
Stopping helloworld... OK
Preparing to start helloworld... OK
-----> Downloaded app package (5.5M)
-----> Downloaded app buildpack cache (39M)
Initialized empty Git repository in /tmp/buildpacks/java-buildpack.git/.git/
-----> Downloading OpenJDK 1.7.0_45 from (0.2s)
       Expanding JRE to .java (0.8s)
-----> Downloading New Relic Agent 3.1.1 from (7.3s)
-----> Downloading Spring Auto-reconfiguration 0.7.2 from (0.2s)
       Modifying /WEB-INF/web.xml for Auto Reconfiguration
-----> Downloading Tomcat 7.0.47 from (0.2s)
       Expanding Tomcat to .tomcat (0.1s)
-----> Downloading Buildpack Tomcat Support 1.1.1 from (0.2s)
-----> Uploading droplet (48M)

After a few minutes data starts appearing in New Relic:

image2013-11-15 16-22-20

You are now ready to do awesome stuff with all this information (smile)

More info on user provided services:

Some background info for New Relic:

Funny job requests

Today I received this email, in dutch paas haas means: Easter bunny.

Dear Stephan

We are currently searching for a Cloud Consultant to work in Den Haag, The Netherlands  for 2 months plus extensions. This is a fantastic contract opportunity for a large multi-national client.

The ideal candidate must have the following skills:

Investigate opportunities to develop a PAAS/HAAS service for GF IT projects that allows projects to quickly build up project systems in the cloud that can be easily dismantled once the project is completed or does not require the system any longer.

Nexus installation on Tomcat 7 with JDK7

I tried to install Nexus OSS on my Tomcat 7.0.20 with the new Oracle JDK 7. This was not a big success. Ok first of all make sure to use the unpacked version of the nexus war or else it wont be able to find the NEXUS_PLEXUS_WORK environment variable.

Second, you need to patch the unpacked war. Strip out the xstream-1.3 and add the latest snapshot. Also add the latest API jar to the WEB-INF/lib of the unpacked nexus war.

More info see this JIRA ticket.

Git server on Windows


Distributed version control systems gained a lot of attention over the last few years. There are many hosting providers that offer free DVCS space on the web. But there are situations that you want to run your own private DVCS server and do not want use a publicly and open DVCS like Gitorious, Github or BitBucket. Of-course you can always buy a commercial offering for a private DVCS solution.

The nice thing about a DVCS is that there is not one version, there are multiple ‘versions’ of a source tree. But at some point you do want a central location to store your (releases) sources. In this article I will explain how to setup a Git server on a Windows machine using Apache to server Git request over HTTP.

If you want to know more, Atlassian has an excellent presentation on DVCS, recorded at the Atlassian Summit last June. And Linus Torvalds talk on Git is worth your time:


You will need to install msysgit, I used version msysGit-fullinstall-1.7.6-preview20110708.exe. On my machine I installed msysgit to D:/dev/msysgit


Create a directory that contains your Git repositories, for example: D:/dev/repo/git. To get you started, go to the directory and create an empty Git repository.

cd D:/dev/repo/git
git init --bare Test.git

Apache configuration

In this tutorial I use Apache 2.2.19. You need to setup git-http-backend.exe in order to serve Git through Apache. First copy ..\msysgit\mingw\bin\libiconv-2.dll to ..\msysgit\libexec\git-core or else you will get a 500 error from Apache. To test if your setup works run ..\msysgit\libexec\git-core\git-http-backend.exe

Add the following to your Apache conf\httpd.conf:

SetEnv GIT_PROJECT_ROOT D:/dev/repo/git
ScriptAliasMatch \
        "(?x)^/(.*/(HEAD | \
                        info/refs | \
                        objects/(info/[Apache Git server on Windows^/]+ | \
                                 [0-9a-f]{2}/[0-9a-f]{38} | \
                                 pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
                        git-(upload|receive)-pack))$" \

I also made the Apache DocumentRoot point to my Git repos:

DocumentRoot "D:/dev/repo/git"

<Directory "D:/dev/repo/git">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

The result:

Using the repo

You can create a local copy of this git repo using the clone command.

git clone http://localhost/Test.git


Make sure that you setup authentication if you do not want your sources to become publicly available. This can be done using the regular Apache authentication modules.


Many thanks to: