• Eclipse中JBOSS5.1无法启动的问题解决办法


    今天在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_HOMEserverdefaultconfootstrapprofile.xml) 中的 AttachmentStore 设置就可以了。在该文件中,你可以找到:

      <bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore"> 
          <constructor> 

     <parameter> 

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

     

    只需将它改为:

     

       <bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore"> 

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

  • 相关阅读:
    前端网站汇总
    更换Sublime Text主题字体
    免费收录网站搜索引擎登录口
    IE6,7,8支持css圆角
    CSS继承—深入剖析
    JavaScript正则表达式大全
    CSS伪元素选择器
    line-height用法总结
    判断腾讯QQ是否在线
    text-overflow使用文字超多div的宽度或超过在table中<td>
  • 原文地址:https://www.cnblogs.com/dyllove98/p/3143060.html
Copyright © 2020-2023  润新知