I’ve been looking for a liquibase gradle plugin and found gradle-liquibase-plugin from tlberglund. Gradle version 1.2 build file: Runnin gradle build fails with the following error: Does anyone have experience with this plugin, I would really appreciate a working example. Answer The problem isn’t …
passing Parameterized input using Mockitos
I am using Mockito for unit testing. I am wondering if its possible to send Parametrized input parameters with as in Junit testing e.g Answer In JUnit, Parameterized tests use a special runner that ensure that the test is instantiated multiple times, so each test method is called multiple times. Mockito is a …
What happens if import statements can not be resolved?
I am not clear on the following: A class is loaded by JVM when needed, like lazy initialization, right? Now if class A does an import of class B which class B actually is not in the file system (e.g. B.class was deleted or not delivered or any reason) then does class A get loaded and runs if no method
Why does QuickSort use O(log(n)) extra space?
I have implemented the below quicksort algorithm. Online I’ve read that it has a space requirement of O(log(n)). Why is this the case? I’m not creating any extra data structures. Is it because my recursion will use some extra space on the stack? If this is the case, is it possible to do it with le…
What is meant by parameterized type?
This link states the following: The instantiation of a generic type with actual type arguments is called a parameterized type . Example (of a parameterized type): Collection<String> coll = new LinkedList<String>(); So what is the parameterized type? Collection<String> or LinkedList<String…
“A configuration with this name already exists” error in eclipse run configurations
I synced mercurial project, and tried to setup run configurations. I found the name has (1) attached, and I tried to remove it. However, I got A configuration with this name already exists error. I checked other configurations, but there was no duplication of Name Equivalence Checker. How can I find the exist…
In Java -D what does the D stand for?
What does the D in Set a system property value. Of the Java application launcher stand for? For some reason it’s been bothering me, why D? Answer I’ve always assumed it was to define the value of a property… possibly a legacy from C compilers, which often use -D as similar to #define in code…
JAXB generating JAXBElement instead of String
I am using Apache CXF cxf-codegen-plugin Maven plugin to generate sources from WSDL file. Problem is that I get JAXBElement<String> generated instead of String. I have added the jaxb-bindings.xml file which looks like this: This should prevent JAXB to generate JAXBElement<String>. But it is not wo…
How do you “Mavenize” a project using Intellij?
I have seen many posts about using eclipse to Mavenize a project. Is there a easy way to do that in IntelliJ? From what I understand about “Mavenize”, it’s just add some xml in pom.xml and the directory structure is in src/main/java, src/main/test …. Answer For those that benefit from …
Web app user authentication with 2 production servers using spring security
Working on the server side of a java based web application (will serve mobile and web clients) and I need to implement users authentication. In production I have 2 servers (duplicated, working against …