Monday, September 24, 2007

Axis2 Client Error - NullPointerException at ClientUtils.inferIntTransport

error
java.lang.NullPointerException
at org.apache.axis2.description.ClientUtils.inferInTransport(ClientUtils.java:85)
at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:253)


environment
Attempting to connect to a web service using an Axis2 client.

possible causes:
You are missing a jar in your classpath.

solution
The missing jar is the commons-httpclient.jar. Add this jar to your classpath.

Friday, September 21, 2007

Classpath Problem - javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.MXParserFactory not found

error
com.bea.xml.stream.MXParserFactory not found

environment
The following xml jars are in my classpath:
xerces.jar - org.apache.*, org.w3c.dom.html.*, org.w3c.dom.ls.*
xercesImpl.jar - com.sun.org.apache.*


possible causes:
You do not have a StAX implementation in your classpath.

solution
You must provide an implementation of StAX in your classpath.

references
http://forums.java.net/jive/thread.jspa?messageID=117971

Thursday, September 20, 2007

Secure Copy

Copy local file to remote location:

scp <local-file-path>/<file-name> <username>@<server-name>:<location-from-home-dir>

Copy remote file to local location:

scp <username>@<server-name>:~/<path-to-file>/<file-name> <local-directory-location>

Mule Logging - How to specify a different location for the mule logs

bin/mule script

Create and export an environment variable pointing to your desired log location.

export LOG_DIR=/data/logs/your-desired-log-location

conf/wrapper.conf file

Refer to the environment variable exported in the mule script in the wrapper.logfile property in the wrapper.conf configuration file.

#********************************************************************
# Wrapper Logging Properties
#********************************************************************
......
# Log file to use for wrapper output logging.
wrapper.logfile=%LOG_DIR%/%MULE_APP%.log
......

Thursday, September 13, 2007

Running an SSH Tunnel in the background

nohup ssh -v -L <local.port>:<destination.ip>:<destination.port> username@<remote.ip>

Note: You cannot use an alias for the ssh command or else it will not work. You must use the ssh command directly in the nohup command.

Friday, September 7, 2007

Mule Error: Remote Debugging a Mule Server

The article given in Remote Debugging a Mule Server does not work on some operating systems. You must include each JVM option on a separate line as in the following example.

# uncomment this line to debug remotely, the application will wait for the external debugger to connect
# IMPORTANT: change the wrapper.java.additional. parameter to be the actual consecutive number,
# depending on the number of additional parameters above
wrapper.java.additional.4=-Xdebug
wrapper.java.additional.5=-Xnoagent
wrapper.java.additional.6=-Djava.compiler=NONE
wrapper.java.additional.7=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005


References:
http://mule.codehaus.org/display/MULE/Remote+Debugging+a+Mule+Server
http://www.mail-archive.com/user@mule.codehaus.org/msg04986.html

Migrating from Mule 1.3.3 to Mule 1.4.1

1. Change the MULE_HOME to point to the Mule 1.4.1 home directory.

2. Update the 'mule' script in the bin folder with the Mule 1.4.1 version.