Some time ago I came to the point where I need to do integration tests for my JEE applications at work. In Spring this is fairly easy, just use the SpringJUnitRunner and most of the work is done by Spring. Possibly you have to choose the right profile or do some minor configuration setup. But […]
Good news: The first release of JUnitRules was accepted by OSS Sonatype. The artifact coordinate for Gradle is ‘com.coders-kitchen:JUnitRules:1.0.1’ 0 Kudos Don'tmove!
I recently promoted the first release of JUnitRules at OSS Sonatype. This release will include EntityManagerRule for an easy setup of entity managers in Unit tests and FilePrepareRule for an easy setup of directory and file structures for unit tests I hope that my first release is accepted. 0 Kudos Don'tmove!
Hi, here is an short introduction of how to use slf4j’s logback.xml configuration file within an EAR. Everybody who uses slf4j (or other Logging Frameworks) knows the following Problem When you deliver the configuration file of the logging framework within an WAR works everything as expected and without any problems. But if you try this […]
Today I would like to show you how to integrate MosKito into your CDI Application. I will show you the required dependencies and modifications to some files you need to do before you can use MosKito with CDI. Preparation For this tutorial Glassfish version 3.x and Gradle at least in version 1.0 is required. The […]
Hi, because it’s relative hard to figure out, how to do it, I would like to show you how to combine JAX-RS and CDI. Preparation You need a Glassfish v3.x where we will run this application Gradle at least in version 1.0 Let’s start with a minimal application “The Greeter”. If you call “<your_host>/GreetMeWithJaxRSAndCDI/rest/greet/<NAME>” it […]
During the last days I started to enable a build-time setup for one of my Spring projects. One thing I set at build time was the spring.profiles.default context parameter. For replacing wildcards during build time I added the expand() closure to the war-task of my Gradle build script. The problem This works fine til I wanted to […]
During the last weeks a colleague of mine came to my desk and ask for a solution in JEE6 for the following Problem The implementation that should be used for injection via @Inject must be determined during runtime by call parameters of the target bean. JEE didn’t have, or to be precise I didn’t know […]
During the implementation of some integrationstests for a Spring application I faced the problem, that the tests couldn’t be executed due to the following error:
Caused by: java.lang.NoSuchFieldError: TRACE
After some investigation I figured out, that Hibernate has a non transitive dependency to Log4J log4j >= 1.2.12 – I use slf4j / logback for logging -. After I added […]
During the actual migration of an JEE project, consisting of several moduls (WAR, EJB ..) from Ant to Gradle I faced the following problem: In the test phase, e.g. when calling gradle test, one integration test (or should it better be called functional test? I’m not sure about this) stated out that: No Persistence provider […]