Fixing JBoss Error installing to Start: name=IIOPInvoker state=Create: java.net.UnknownHostException:

If you ever see the following when attempting to start up an instance of JBoss 6.x:

15:41:15,740 ERROR [AbstractKernelController] Error installing to Start: name=IIOPInvoker state=Create: java.net.UnknownHostException: some_host_name: some_host_name
        at java.net.InetAddress.getLocalHost(InetAddress.java:1426)
        [:1.6.0_17] at org.jboss.invocation.iiop.IIOPInvoker.start(IIOPInvoker.java:233) [:6.0.0.Final]

It is because JBoss cannot resolve the host name of the machine on which it is running.  To fix:

 

  • Edit /etc/hosts and add the name of the box pointing to an ip address.
  • Set up a proper DNS entry for the host name of the machine.
Continue reading “Fixing JBoss Error installing to Start: name=IIOPInvoker state=Create: java.net.UnknownHostException:”

Installing Jboss 6.1.0-Final under RHEL or CentOS

The following is a howto for installing Jboss under Red Hat Enterprise Linux or CentOS.  The steps are most likely the same under any other Linux distro.

  • Unpack your jboss.zip (or .tar)
  • Jboss requires a ‘place’ to store data as it runs.  Out of the box it uses org.jboss.jdbc.HypersonicDatabase which is horribly inefficient and should never be used in a production system.  So we’ll set up MySQL such that jboss can write to it (installing and configuring MySQL is an
Continue reading “Installing Jboss 6.1.0-Final under RHEL or CentOS”

Configuring JBoss 6.x to Run as a Service Under RHEL and CentOS

In most cases you will want to run JBoss as a non-privileged user.  For this example we will set up a jboss user (adding the user is an excersize for the user).  This example covers jboss-6.1.0-Final.

  • Add $JAVA_HOME and $JBOSS_HOME environmental vars to .bash_profile for your jboss user.  $JAVA_HOME points to your install of the JDK and $JBOSS_HOME points to your jboss installation directory.

    JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64
    export JAVA_HOME
    PATH=$JAVA_HOME/bin:$PATH
    export PATH

JBOSS_HOME=/opt/jboss/
export JBOSS_HOME

  • Once you have done the basic JBoss
Continue reading “Configuring JBoss 6.x to Run as a Service Under RHEL and CentOS”

Installing HP LaserJet 4050 Network Printer under Window 7 64bit

When attempting to install an HP LaserJet 4050 network printer under Win 7 64bit all you need to do is use the LaserJet 4200/4300 PCL6 naitive drivers that come with Windows.→ Continue reading “Installing HP LaserJet 4050 Network Printer under Window 7 64bit”

Fix For: Pango-WARNING **: failed to choose a font, expect ugly output and Other FireFox Errors

$ firefox &
[1] 1933

$
(firefox:1947): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type=’PangoRenderFc’, script=’common’
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -? 1: Failed to get connection to session: /bin/dbus-launch terminated abnormally without any error message)

(firefox:1947): Pango-WARNING **: failed to choose a font, expect ugly → Continue reading “Fix For: Pango-WARNING **: failed to choose a font, expect ugly output and Other FireFox Errors”

Redirecting All Web Requests to the WWW. DNS Entry for Your Web Site

If you would like to redirect all non ‘www’ requests for pages on your site to the ‘www’ dns entry add the following to your .htaccess file in the document root of your site:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Continue reading “Redirecting All Web Requests to the WWW. DNS Entry for Your Web Site”

Enabling Parsing and Processing of PHP code in Files With .html Extensions for GoDaddy.com Hosting Accounts

There are times when a web master will want to have the default file extension for a given website stay consistent regardless of how the files are preprocessed on the server-side or what server-side scripting language is being used.

To set up your GoDaddy.com 4GH, Linux hosted account to parse PHP code in .html files, do the following:

  1. Log in to your account.
  2. Go to the control panel for the web site in question.
  3. In the control panel click on
Continue reading “Enabling Parsing and Processing of PHP code in Files With .html Extensions for GoDaddy.com Hosting Accounts”

Cloned VMware CentOS6 Server and "device eth0 does not seem to be present, delaying initialization" Error

Recently, I cloned a vmware install of CentOS6 and after firing up the clone and trying to start networking received the error: “device eth0 does not seem to be present, delaying initialization”

It turns out that the NIC on the cloned machine was being renamed and registered to eth1.

To list the current ethn devices:

# ls /sys/class/net
eth1 lo

There is a device manager, udev, which stores the settings from the NIC of the vm prior to the cloning → Continue reading “Cloned VMware CentOS6 Server and "device eth0 does not seem to be present, delaying initialization" Error”

Java: Capitalize the First Letter in a String

A seemingly trivial task, but worth jotting down for future reference.

String sourceString = “this is some string”;
String convertedString = String.format(“%s%s”, Character.toUpperCase(sourceString.charAt(0)), sourceString.substring(1));
Continue reading “Java: Capitalize the First Letter in a String”

Java: How To Use RandomAccessFile and FileChannel to Write to a Specific Location in a File

If there is ever a need to write bytes to a specific location to an existing file, here is an example of how to use the RandomAccessFile and FileChannel Java classes to do so:

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;

/**
 * Will write bytes to the beginning of an existing file.
 *
 * @author Ryan Chapin
 */
public class RandomAccessFileTest {

    public static void main(String[] args) {

        // Generate input string and the → Continue reading “Java: How To Use RandomAccessFile and FileChannel to Write to a Specific Location in a File”