Sunday, November 29, 2015

Mobicents JBoss startup halted because of java.lang.IllegalArgumentException in attachmentStore

When starting the Mobicents JBoss server for the first time, you might encounter the following error in some scenarios. This is present for certain platforms (like Windows or Linux) when it's used with a certain JDK/JRE.

It was fixed using the workaround shown below;

Exception;


11:32:49,390 ERROR [AbstractKernelController] Error installing to Instantiated: name=AttachmentStore state=Described
java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.net.URI] actual=[java.io.File]
    at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:395)
    at org.jboss.reflect.plugins.introspection.ReflectionUtils.newInstance(ReflectionUtils.java:153)
    at org.jboss.reflect.plugins.introspection.ReflectConstructorInfoImpl.newInstance(ReflectConstructorInfoImpl.java:106)
    at org.jboss.joinpoint.plugins.BasicConstructorJoinPoint.dispatch(BasicConstructorJoinPoint.java:80)
    at 


...

org.jboss.bootstrap.microcontainer.TempBasicXMLDeployer.deploy(TempBasicXMLDeployer.java:91)
    at org.jboss.bootstrap.microcontainer.TempBasicXMLDeployer.deploy(TempBasicXMLDeployer.java:161)
    at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:138)
    at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:450)
    at org.jboss.Main.boot(Main.java:221)
    at org.jboss.Main$1.run(Main.java:556)
    at java.lang.Thread.run(Thread.java:722)
Failed to boot JBoss:
java.lang.IllegalStateException: Incompletely deployed:

DEPLOYMENTS IN ERROR:
  Deployment "AttachmentStore" is in error due to: java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.net.URI] actual=[java.io.File]


Solution

To correct this, you need to change the following;
open the file
JBOSS_INSTALLATION/jboss_5.xxGA/server/default/conf/bootstrap/profile.xml

and find the following tag;
<constructor>
    <parameter>
        <inject bean=”BootstrapProfileFactory” property=”attachmentStoreRoot”/>
    </parameter>
</constructor>

then change it to by adding the text in color;
<constructor>
    <parameter  class=”java.io.File”>
        <inject bean=”BootstrapProfileFactory” property=”attachmentStoreRoot” />
    </parameter>
</constructor>

Thursday, November 26, 2015

How to reboot Ubuntu if you're in a sticky situation

I got into this very stickey situation when trying to run a windows application in Ubuntu using wine.

The particular app was the game; Need for Speed Underground. The moment I ran

wine speed.exe

the screen went into a sort of low-res mode. I came into some cases where the entire screen was filled with the game and the keyboard did not respond. I could not exit the game. So I needed to close the window, but nothing was responding.
The computer would not respond to CTRL+ALT+DELETE.

I came from a Windows history and that SUCKED! Everyone obeys CTRL+ALT+DELETE.! How can not Ubuntu do that!?
 
Then I found in a comment in a ubuntu forum the magic keyset to reboot Ubuntu and used that to reboot the PC out of the complication.

You hold;
CTRL+ALT+PRINTSCREEN
keep holding that...and press these keys one by one;
R E I S U B


The PC should restart.
Works on 15.10. If it worked in your version please add it in the comments.

Note: If you're on a laptop like me, you will need to press Fn+(Some key like END) depending on your keyboard layout to get to the PRINTSCREEN key.
So laptop users hold CTRL+ALT+Fn+(key with PRINTSCREEN written) and then press R E I S U B.

Anyway, these settings were able to solve the issue and the game runs in a window under these wine settings;


Wine settings for running NFS in window mode
Cheers. Hope the first post is good enough and nobody gets their fingers cramped :)