六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 124|回复: 0

jboss5.1启动错误:java.lang.IllegalArgumentException: Wrong arguments.

[复制链接]

升级  38%

3

主题

3

主题

3

主题

童生

Rank: 1

积分
19
 楼主| 发表于 2013-1-28 23:52:45 | 显示全部楼层 |阅读模式
第二次遇到同样的错误了,怪自己刚开始时没有认真看清楚问题。现在把问题和解决方案写下,做个记录。
问题描述:
在 eclipse 下运行全新安装的 jboss5.1.0,控制台报如下错误:
10:18:01,906 ERROR [AbstractKernelController] Error installing to Instantiated: name=AttachmentStore state=Describedjava.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) 
网上资源:
JBoss 论坛:Problem installing 5.1GA on solaris SPARC
JBoss bug:JBAS-6981
解决方案:
在 JBoss 的官方论坛上找到一篇解决方案,具体是:

  • 确定正在使用的要发布的服务器(server 目录下使用到的服务目录,如 all, default, minial, ...,这里我使用的是 default)。
  • 进到类似目录 server/default/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,问题解决
论坛上没有说明问题产生的原因,希望明白后台原理的人能指点一二,谢谢。
 
 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表