---
title: "eclipse无法启动JBoss5.1.0的解决小办法"
author: "splinter_2"
date: "2011-03-07T15:00:40Z"
tags: []
categories: ["行业应用"]
slug: "eclipse-jboss5-1-0"
draft: false
lastmod: "2011-03-07T15:00:40Z"
id: 945146
url: "https://splinter-2.iteye.com/blog/945146"
---

最近看看JBoss，发现早已有了新版本，好久没有关注了，于是下载了新版本，结果写了个test，发现无法使用eclipse直接启动JBoss，有点郁闷，仔细查看发现是java反射加载参数时的问题，我的错误日志信息如下：

23:29:30,062 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:619)  
Failed to boot JBoss:  
java.lang.IllegalStateException: Incompletely deployed:

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]

DEPLOYMENTS MISSING DEPENDENCIES:  
  Deployment "ProfileServiceDeployer" is missing the following dependencies:  
    Dependency "AttachmentStore" (should be in state "Installed", but is actually in state "\*\*ERROR\*\*")  
  Deployment "ProfileServiceBootstrap" is missing the following dependencies:  
    Dependency "jboss.kernel:service=Kernel" (should be in state "Installed", but is actually in state "\*\*ERROR\*\*")  
    Dependency "ProfileService" (should be in state "Installed", but is actually in state "Instantiated")  
  Deployment "ProfileServicePersistenceDeployer" is missing the following dependencies:  
    Dependency "AttachmentStore" (should be in state "Installed", but is actually in state "\*\*ERROR\*\*")  
  Deployment "ProfileService" is missing the following dependencies:  
    Dependency "jboss.kernel:service=KernelController" (should be in state "Installed", but is actually in state "\*\*ERROR\*\*")  
    Dependency "ProfileServiceDeployer" (should be in state "Installed", but is actually in state "Instantiated")

    at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)  
    at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)  
    at org.jboss.bootstrap.microcontainer.ServerImpl.doStart(ServerImpl.java:142)  
    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:619)  
23:29:30,625 INFO  \[ServerImpl] Runtime shutdown hook called, forceHalt: true  
23:29:30,640 INFO  \[ServerImpl] Shutdown complete  
Shutdown complete  
Halting VM  
虽然不觉得是个多大的问题，但是总让我有种感觉，难道开源的就不能把事情做到完美吗？唉。。。。。。无奈啊。

好了说说解决办法，很简单：

找到jboss-5.1.0.GA\\server\\default\\conf\\bootstrap目录下的profile.xml文件，在文件中找到如下内容：

    &lt;!-- The attachment store --&gt;  
    &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;constructor&gt;&lt;parameter&gt;改成&lt;constructor&gt;&lt;parameter  class="java.io.File"&gt;

好了保存后重新启动，不再出错了。

这里做个记录，免得下次忘记再去找错了。