0

elastic java

I came across jelastic when I was looking for a cloud provider that offers java support. Initially I started playing around with another provider.environment

This failed not because the java support of the other provider was not in place but because its deployment procedure was based on ruby gems that inluded key generation. This part failed on my windows machine.

Jelastic offers deployment of java projects and lets you define and update the environment your project runs on.
Also it offers a maven plugin to deploy your project. This is my preferred deployment method.
Setting up the jelastic maven dependency was quickly done as well as adding a profile to the settings.xml
On jelastic side you need to create an environment. I used the proposed tomcat environment including the ROOT context. environment context The context is capitalized not to underline the importance but because it is important to know that the string that defines the context in the pom file is case sensitive.pom file context string
Anyway, with my first version of the pom file I could easily upload code to jelastic, however it was not deployed to my tomcat instance. Also it produced a NullPointer that made me think.
I decided to tweet about the error. Only hours later I was contacted by jelastic support stuff. NullPointerException
After a few emails back and forth there were three major changes I had to make:

  • update to maven plugin version 1.5. Version 1.3 was actual maven plugin version when I initially set up the maven dependency. Only some days later, the regarding section on the maven plugin side was updated:
    maven plugin version 1.3 / 1.5
  • environment tag can not be empty
  • context tag can not be empty

Thanks to the jelastic support stuff that was really helpful.

upload deployment successweb page The maven deployment was really easy once the 3 details above were in place. Just make sure you do mvn (clean) install before mvn jelastic:deploy. A couple of seconds later you can see the result on your jelastic domain.


p.s.
When I was writing this post, I realized the deployment method on heroku was changed recently. The initial reason to look for other cloud provider options does not exists anymore. Playing with java deployment to heroku on Windows might be subject of my next blog post.

p.p.s
I also realized jelastic has a description how to deploy your project using maven after I finalized this post.

Lothar Schulz

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.