[ Error ] java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.net.URI] actual=[java.io.File]
eclipse에서 jboss를 이용하여 web project실행시
java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[java.net.URI] actual=[java.io.File]
위와같은 오류가 발생 할 경우가 있는데 간단히 해결할 수 있는 방법이 있습니다.
$JBOSS_HOME/server/default/conf/bootstrap/profile.xml
<!-- The attachment store -->
<bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">
<!--<constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>-->
<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>
기존의 constructor를 주석처리 하신 후 새로 복사해서 <parameter class="java.io.File"> class만 추가해 주면 간단히 해결됩니다.
by rocksea.