Recently I was writing some units tests, as all good developers should, and ran into an issue with a test that made use of the IntStream of(int t) method. The test execution failed and throw the following exception:
java.lang.IllegalStateException: Failed to transform class with name com.readlearncode.ServiceTest. Reason: javassist.bytecode.InterfaceMethodrefInfo cannot be cast to javassist.bytecode.MethodrefInfo
After googling for the solution I found that others had had the same issue. A StackOverflow question and answer gave me the solution. As this is issue could cause someone quite a lot of pain I thought I would reproduce it below:
PowerMock has a dependency on javassist, exclude the transitive dependency in my POM and include the dependency separately.
Here is the POM snippet:
If you are trying to install Erlang on CentOS/7 you might be presented with the following errors:
These errors mean you don’t have the updated RHEL EPEL Repo from which to fetch Erlang builds. You update your repo as follows:
Retry installing Erlang.
For centos 5 and 6 visit this blog post.
Thanks to jake_morrison from Reddit who posted this response.
The Erlang packages in the distro are not kept up to date, and go stale pretty quickly with the pace of Erlang development.
It’s better to use the packages from ESL: https://www.erlang-solutions.com/downloads/download-erlang-otp
Relevant Ansible tasks:
- name: install esl key
rpm_key: state=present key=http://packages.erlang-solutions.com/rpm/
- name: install esl repo
copy: src=etc/yum.repos.d/erlang-solutions.repo dest=/etc/yum.repos.d/
erlang-solutions.repo owner=root group=root mode=0644
- name: install erlang
yum: name=erlang state=latest update_cache=yes
See original reply here.
The adoption of HTTP/2.0 over the last four months has stagnated. The only notable change has been in early adopters updating previous versions of the protocol. Read the full analysis: Tracking HTTP/2 Adoption: Stagnation.
I often post about HTTP/2 on Twitter. Follow me here
One of the most significant advancements in JavaEE 8 is support for HTTP/2. Three server vendors currently support servlet 4.0, Apache Tomcat 9.0.0.M4, Jetty 9 and WildFly 10.0.0.Final. Lets have a look at how to configure Tomcat 9 to support HTTP/2.
I often post about Servlet 4.0 on Twitter. Follow me here
HTTP/2 an important advancement in the HTTP protocol that will change the way we develop web applications for both front and back end developers. Get up to speed quickly with my latest HTTP/2 In A Nutshell guide on the HTTP/2 protocol.
What do Pizzas and the Richardson Maturity Model have in common? Find out in my latest blog post where I explain the model’s four levels with the help of some tasty pizzas. Read about REST and the Richardson Maturity Model.
This and subsequent posts are a write up of my Java EE revisits design patterns talk at jDay Sweden 2016.
The slides to the presentation are viewable here: Java EE Revisits Design Patterns and a video of the presentation will be made available as soon as jDays publish it.
The book that accompanies this talk is available from Amazon.
Master Java EE design pattern implementation to improve your design skills and your application’s architecture
Professional Java EE Design Patterns is the perfect companion for anyone who wants to work more effectively with Java EE, and the only resource that covers both the theory and application of design patterns in solving real-world problems. The authors guide readers through both the fundamental and advanced features of Java EE 7, presenting patterns throughout, and demonstrating how they are used in day-to-day problem solving.
The talk has been divided up into the following sections.