Skip to content

Where does maven search for log4j.properties file?

I am facing issues using log4j with Maven. I’ve one properties file i.e log4j.properties and I’ve put that file at the same path where project’s pom.xml is stored. pom.xml I’ve used log4j in my code which is under test folder. Code I would like to know, how does maven identify where th…

Maven build: Tomcat server doesn’t start

I am new to Maven and trying to setup a web project using Maven. I have setup the project in Eclipse and I am using Tomcat 7.0.53. In run configuration for Maven build and I have set tomcat:run in Goals. When I run this configuration, following log is seen in the Eclipse console: Nothing happens after this. T…

Getting IndexOutOfBoundException

why does following main method gives IndexOutOfBoundException at list.add(1, 2)? Answer You can’t add an element at index 1 when it the ArrayList is empty. It starts at 0, or just use add. Per the ArrayList#add(int index, E element) javadoc, Throws: When size == 0, the index 1 is out of range.