Search code examples
javatemplate-enginepebble

Pebble Engine JRE version mismatch


My team is using Pebble template engine for preparing messages. We have done lot of POC on this and everything looks good in our side. We decided to implement that.

Now problem we see here is we are having JRE1.6 in our application servers but pebble jars are compiled in JDK1.7. So we are facing version mismatch error. Can anyone suggest a workaround for this problem?

We are already approaching our release timeline and stuck here :(


Solution

  • Technically, there are 4 options:

    1. You start searching; sometimes either the providers of libraries; or some "mirror site" somewhere has kept older JARs. Maybe those would work instead.
    2. You upgrade your application server to run on a 1.7 runtime.
    3. You could try to de-compile those JARs; to then compile them with Java 6.
    4. Turn to the home page of peeble, find that it points to GitHub ... in other words: we are talking about open source here. So: you download the source, and you build your own jars; using a Java 6 environment.

    Option 3 is obviously the most "hackish" one; and there might even be licence terms preventing you from doing that. And on the other hand, option 2 sounds scary; but you know: when you just change the underlying JRE (without touching your app server itself) there is a certain chance that this "just works".

    And the real takeaway here: such subtle details are important. You should improve your processes to discover them early up; not during the last 5 minutes of your schedule.