martedì, febbraio 22, 2011

Jboss - Port already in use: 1098

I got this exception after started jboss 5.1 on windows XP.

ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main)
Error installing to Start: name=jboss:service=Naming
state=Create mode=Manual requiredState=Installed
java.rmi.server.ExportException: Port already in use: 1098;
nested exception is: Address already in use: JVM_Bind

I tried to understand which process was using that port by running this command:

$> netstat -a -o -n

But the result didn't show any port associated to 1098.
Finally I edited the file at <jboss_51_home>\server\default\conf\bindingservice.beans\META-INF\bindings-jboss-beans.xml
and changed the value of the port 1098 to 10980 and the error has disappeared.
Windows and Jboss ...such a nightmare.
Here the link where I found the solution.

Nice java client to execute remote ssh
Just add this dependency at your pom.xml


lunedì, febbraio 21, 2011

Stop jboss in the case it's running

If you need to stop jboss inside a shell script this block of code could be useful.

if ps -ef | grep "<jboss_home>/bin/run.jar" | grep -v grep
echo [deploy] Stopping Jboss...
<jboss_home>/bin/ -S --server=localhost:1199
sleep 12s
echo [deploy] Jboss was already stopped
sleep 2s

venerdì, febbraio 18, 2011 no protocol: and

I was trying to configure maven cargo plugin when I came across this exception:

Caused by: no protocol: and

I spent several hours trying to find the meaning of this error message when finally I found this link:

The author says:

The "and"
comes from the folder where your classes are which is probably something
beneath "C:\Documents and Settings"

So found the root of the problem, the maven local repository in windows is located at the path:
C:\Documents and Settings\<user>\.m2

So I have overridden the local maven repository folder adding this entry in the settings.xml maven configuration file:


After this change the error has disappeared.

giovedì, febbraio 10, 2011

Accesing to windows file system from cygwin

$ cd /cygdrive/c

That's pretty easy, but I always forget it...

martedì, febbraio 08, 2011

Spring - Referring to a String as a bean

<bean id="myString" class="java.lang.String">
<constructor-arg type="java.lang.String" value="Lucio"/>

<bean id="myUser" class="com.benfante.User">
<property name="firstName" ref="myString"/>


Thanks to Lucio for the example

lunedì, febbraio 07, 2011

svn client issue

After connecting to svn server using different users I got this message:

svn: Server sent unexpected return value (501 Method Not Implemented) in response to MKCOL request for

I have sorted out it deleting this folder on windows:

C:\Documents and Settings\myUser\Application Data\Subversion\auth