RestComm / ussdgateway

RestComm USSD Gateway
http://www.restcomm.com/
GNU Affero General Public License v3.0
88 stars 102 forks source link

Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.net.URI] actual=[java.io.File] #73

Closed sleemov closed 6 years ago

sleemov commented 7 years ago

Dear Team

This error is thrown everytime I start the gateway. I see this error in every release build.

11:48:28,069 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.aop.microcontainer.integration.AOPConstructorJoinpoint.createTarget(AOPConstructorJoinpoint.java:282)
        at org.jboss.aop.microcontainer.integration.AOPConstructorJoinpoint.dispatch(AOPConstructorJoinpoint.java:103)
        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)
        at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)
        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)
        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)
        at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:66)
        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)
        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)
        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)
        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:319)
        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:297)
        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)
        at org.jboss.kernel.plugins.deployment.BasicKernelDeployer.deploy(BasicKernelDeployer.java:76)
        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:745)
Failed to boot JBoss:
java.lang.IllegalStateException: Incompletely deployed:

The fix is described here, can someone just apply this on the project so we can avoid this issue please?

here is my startup log startup.txt

Regards Sleem

sleemov commented 7 years ago

in the file restcomm-ussd-7.1.62/jboss-5.1.0.GA/server/default/conf/bootstrap/profile.xml

replace this

<!-- The attachment store -->
    <bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">
        <constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
        <property name="mainDeployer"><inject bean="MainDeployer" /></property>
        <property name="serializer"><inject bean="AttachmentsSerializer" /></property>
        <property name="persistenceFactory"><inject bean="PersistenceFactory" /></property>
    </bean>

with this

<!-- The attachment store -->
    <bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">
        <constructor><parameter  class="java.io.File"><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
        <property name="mainDeployer"><inject bean="MainDeployer" /></property>
        <property name="serializer"><inject bean="AttachmentsSerializer" /></property>
        <property name="persistenceFactory"><inject bean="PersistenceFactory" /></property>
    </bean>

I just added class="java.io.File" attribute to the tag

vetss commented 6 years ago

Hello @Mohammed-Sleem

thanks for your reporing. This is a known bug of jboss and it will be eliminated when we switch to next SLEE release. I am closing the issue now.

JayashreeAcharyya commented 5 years ago

Thank you. It worked. I have a multi instance JBoss app server and had to upgrade java for only one of the instances. Got this error while starting up the service.