Category Archive: Java

Jul 31

Stopping Axis2 in unix

If you’re having trouble killing axis2 via a init.d script or otherwise on unix, just do this: AXIS2_CHILD_PID=`ps aux | egrep "axis2server.sh|SimpleAxis2Server" | grep -v "egrep" | awk '{print $2;}'` echo "Killing stubborn AXIS2 child process that won't die with parent.. pid is ${AXIS2_CHILD_PID}" kill ${AXIS2_CHILD_PID} >/dev/null 2>&1 && echo OK || echo "failed, what …

Continue reading »

Jul 25

Maven build automatically removing a jar?

If you have a maven build mysteriously deleting the jar it’s building, double check your POM hierarchy to make sure you dont have some non-sense such as this in there: <plugin>     <groupId>org.apache.maven.plugins</groupId>     <artifactId>maven-clean-plugin</artifactId>     <version>2.1</version>     <executions>         <execution>             <id>auto-clean</id> …

Continue reading »

Jul 06

Getting LogBack to log to console with TestNG and IntelliJ

If you’re having problems with a TestNG test using Logback not logging anything to the console inside IntelliJ, assuming you’re in a maven project, do the following: create the file src/test/resources/logback-test.xml Put this in it: <configuration>     <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">         <!– encoders are assigned the type      ch.qos.logback.classic.encoder.PatternLayoutEncoder by …

Continue reading »