Tagged "IT"

tycho-p2-director-plugin "Error packing product: isn't a directory" problem

The problem

You’re trying to build an Eclipse update site project, specifically <packaging>eclipse-repository</packaging>, with maven and you’re getting the following error:

[INFO] --- tycho-p2-director-plugin:0.21.0:archive-products (default) @ YourProject.UpdateSite ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:00.627s
[INFO] Finished at: Mon Oct 27 09:56:51 CST 2014
[INFO] Final Memory: 84M/764M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-director-plugin:0.21.0:archive-products (default) on project YourProject.UpdateSite: Error packing product: /path/to/YourProject.UpdateSite/target/products/your.product/linux/gtk/x86 isn't a directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

This error message is specific to this environment block that you would have defined in your POM:

Fixing SEVERE errors with Jersey on WebApp startup

The problem

As some background, I’m running the following:

  • Jersey 1.15
  • Apache Tomcat 7

The specific error that we’re going to fix is:

SEVERE: The following errors and warnings have been detected with resource and/or provider classes:
SEVERE: Missing dependency for method public au.com.your.package.YourResponse au.com.your.package.YourClass.someMethod(au.com.your.package.YourRequest) at parameter at index 0
SEVERE: Method, public au.com.your.package.YourResponse au.com.your.package.YourClass.someMethod(au.com.your.package.YourRequest), annotated with GET of resource, class au.com.your.package.YourClass, is not recognized as valid resource method.

If you’re running Tomcat like I am then you’ll see this in your catalina.out log file.

Fixing linux apt "bzip2: Data integrity error when decompressing." error

How to clear the APT cache to fix failing updates.

Maven deploy to Sonatype Nexus "401 Premission Denied" workaround

My current infrastructure has an instance of Jenkins as the Continuous Integration server and Sonatype Nexus as the repository manager. The POMs for my project and the settings.xml file for maven are configured so that Jenkins can automatically deploy SNAPSHOTs to the Nexus repository but the problem arose when I had a build that went to production and I needed to deploy that pre-built artifact to Nexus’ RELEASE repository. This was easier that going back and checking out the correct versions of the many dependencies. In the future I’ll use the maven-release-plugin but for now, this is how I solved this problem.

Ejecting an ISO from a VirtualBox VM using VBoxManage

How to eject an ISO when you only have the command line (no GUI).

Blacklisting a module on Ubuntu Server 11.10 Oneiric Ocelot

This assumes you have vim (the command line text editor) installed. If not, you can use vi or any command line text editor in its place.

  1. Change to the modprobe directory:
    cd /etc/modprobe
    
  2. We need to create a new blacklist file to store our blacklistings in. If there are already other files in this directory, you can reuse one of them but for the sake of separating configuration you’ve made from the out-of-the-box setup, we’ll create a new file. you can name this file anything you want as long as it ends in a .conf suffix and it would make sense to add blacklist and the type of device you’re blacking list to the name so it’s obvious what things live in there (as the module names might not give this information away). Note that you’ll need to be superuser or sudo and this command requires vim:
    sudo vim blacklist-<deviceType>.conf
    
  3. Add one blacklisting per line in the file using the format
    blacklist <module>
    
    for example:
    blacklist pcspkr
    
    If in doubt, have a look in the other blacklist files for examples.
  4. Save and exit the file
  5. Restart your machine

Credit to: http://ubuntuforums.org/showthread.php?t=1850267

XenServer 5.6.1 FP1: Mounting a guest VM's hard drive (VDI) on the host

Back story

This is a problem that I ran up against because I was running the host machine as a bare host and all the functionality that I needed was in the guest machine. The purpose of this was to insulate myself from changes in hardware and to be able to easily backup the entire server (the guest) so it could be restored from image. This meant that occasionally I’d need to access files on the guest machine’s “hard drive” but it wasn’t running so methods that require networking were out. The  solution is to mount the guest’s hard drive image on the host to access it like any other partition.