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>

No comments:

Post a Comment