---
title: "Eclipse中JBOSS5.1无法启动的问题解决办法 "
author: "yzyzero"
date: "2013-04-29T23:47:35Z"
tags: []
categories: ["开源软件"]
slug: "eclipse-jboss5-1"
draft: false
lastmod: "2013-04-29T23:47:35Z"
id: 1857082
url: "https://yzyzero.iteye.com/blog/1857082"
---

今天在Eclipse中启动JBoss 5.1时遇到这样的一个错误：

> ……  
> 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]  
> ……  
> 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]

从错误信息中，就知道是 AttachmentStore的一个参数错误。

解决方法倒很简单，只要修改一下 profile.xml(JBOSS\_HOME\\server\\default\\conf\\bootstrap\\profile.xml)中的 AttachmentStore 设置就可以了。在该文件中，你可以找到：

&lt;bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore"&gt;  
&lt;constructor&gt;

&lt;parameter&gt;

&lt;inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /&gt;

&lt;/parameter&gt;

&lt;/constructor&gt;

&lt;property name="mainDeployer"&gt;&lt;inject bean="MainDeployer" /&gt;&lt;/property&gt;

&lt;property name="serializer"&gt;&lt;inject bean="AttachmentsSerializer" /&gt;&lt;/property&gt;

&lt;property name="persistenceFactory"&gt;&lt;inject bean="PersistenceFactory" /&gt;&lt;/property&gt;

&lt;/bean&gt;

 

只需将它改为：

 

&lt;bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore"&gt;

&lt;constructor&gt;

&lt;!-- 修改这里 --&gt;

&lt;parameter class="java.io.File"&gt;

&lt;inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /&gt;

&lt;/parameter&gt;

&lt;/constructor&gt;

&lt;property name="mainDeployer"&gt;&lt;inject bean="MainDeployer" /&gt;&lt;/property&gt;

&lt;property name="serializer"&gt;&lt;inject bean="AttachmentsSerializer" /&gt;&lt;/property&gt;

&lt;property name="persistenceFactory"&gt;&lt;inject bean="PersistenceFactory" /&gt;&lt;/property&gt;

&lt;/bean&gt;