Links I’ve Found Interesting in the Last Week/Technical Things I’ve found Interesting (6 January 2013)

  • Getting the “Application Server Libraries not found” error with IntelliJ when you try to add a local Tomcat server? If you’re using Gentoo it’s a matter of file locations. Install the tomcat-api package, and make a symbolic link from the API within the Common and Shared Tomcat directories. Source.
  • Tomcat 7 has changed around how resources can be accessed. You can no longer use “getResourceAsStream” to get files placed in the Web-inf/Classes folder. Instead, you should attempt to get the resource through the context of the local thread. An example: Thread.currentThread().getContextClassLoader().getResourceAsStream(). This is useful for applications that use JasperReports [location of the JRXML file], and that are web applications. Source.
  •  If you are trying to stand up a web server, and don’t want to allow it to accept public connections? Set the accepted connections on tomcat to only listen on the local address. For tomcat see this. For NGinx see and set it only set listen to 127.0.0.1:[port].
  • Converting a GUI Netbeans project into a Maven based project? Most of the needed libraries will be covered by the default Maven repositories. However the swing-layout dependency is a special case. To use include the Netbeans repository reference, and include the swing-layout-1.0,4 dependency.
    Repository:

    <repositories> 
       <repository>
          <id>netbeans</id>
          <name>NetBeans</name>
          <url>http://bits.netbeans.org/maven2/</url>
       </repository>
    </repositories>

    Dependency:

    <dependency>
       <groupId>org.netbeans.external</groupId>
       <artifactId>swing-layout-1.0.4</artifactId>
       <version>RELEASE691</version>
    </dependency>
  • Ignoring failed tests on a maven build: Add this parameter to your mvn command: -Dmaven.test.skip=true
  • Sort directories and files with a human readable format: This is like ls –Sh, but it traverses directories.
  • If you have a set of directories to ignore, SVN propset includes an option to recursively ignore specified names/folders. A word of warning propset overwrites any svn:ignore properties.

Init.d Script for codeBeamer MR

codeBeamer ManagedRepositories is a free web interface for Subversion, GIT, and Mercurial from Intland. The product contains a standalone web application with their distributed version of Tomcat. However, the Linux version does not include the init.d scripts to start/stop the service on boot or on demand. I’ve written a script that can do this. It can be found on my GitHub page. The instructions can be found in the README.md. At the time of writing, I cannot endorse or recommend against this product as that I haven’t used it yet. However, a review may be coming up in a future post.

To bring down the script, and the read me file [assuming that git is installed], create a new directory and run the following command within it:

git clone https://github.com/monksy/cmr-init

Some of the Articles/Links/Video That I found Interesting in the Last Week

  • System Rebuild for Gentoo– This is the equivalent of formatting your computer and installing everything to the latest version. It will rebuild your dependencies and any new use flags that you may have added after the install.
  • SVN Status Codes– If you are dealing with the SVN command line client, this will explain some of the non-obvious status codes. [I.e. L and +]
  • Brute Force Hash Checker– This is an interesting attempt at speedily generating hashes [for the generation of rainbow tables] by using GPUs.
  • Torturing Interview Candidates: I’ve seen many of these techniques employed in interviews. I’m rather pleased that someone brought these to light.
  • How John Deer Uses R–  this was more of a presentation of a case study. However, it was quite interesting how some that is incredibly accessible is being used to benefit business decisions. I’ve done a few things with R, but its something I’d like to learn better.