在项目集成jboss中碰到了若干问题。
问题一: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]
解决方案:
此错误常在5.1版本中出现。这个错误是配置文件profile.xml内的一个bug,文件路径为:$JBOSS_HOME/server//conf/bootstrap/profile.xml
把其中的节点:
<bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">
<constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
修改为:
<bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">
<constructor><parameter class="java.io.File"><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
所有的配置都要改。
问题二:启动后,报若干依赖问题从而报错。
解决方案:我是因为jboss放在中文目录下,导致的这个问题。移除中文路径,此问题就好了。