JBoss 5.1 GA:部署错误[IllegalArgumentException]

时间:2013-04-11 22:40:24

标签: jboss5.x ear

我部署了一个.ear文件并遇到了这个错误。我是JBoss的新手,我不知道如何修复它。

18:36:15,903 INFO  [ServerImpl] Starting JBoss (Microcontainer)...
18:36:15,904 INFO  [ServerImpl] Release ID: JBoss [The Oracle] 5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)
18:36:15,904 INFO  [ServerImpl] Bootstrap URL: null
18:36:15,904 INFO  [ServerImpl] Home Dir: /Users/ronyjohn007/JBOSS/jboss-5.1.0.GA
18:36:15,904 INFO  [ServerImpl] Home URL: file:/Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/
18:36:15,904 INFO  [ServerImpl] Library URL: file:/Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/lib/
18:36:15,905 INFO  [ServerImpl] Patch URL: null
18:36:15,905 INFO  [ServerImpl] Common Base URL: file:/Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/common/
18:36:15,905 INFO  [ServerImpl] Common Library URL: file:/Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/common/lib/
18:36:15,905 INFO  [ServerImpl] Server Name: default
18:36:15,906 INFO  [ServerImpl] Server Base Dir: /Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server
18:36:15,906 INFO  [ServerImpl] Server Base URL: file:/Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/
18:36:15,906 INFO  [ServerImpl] Server Config URL: file:/Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default/conf/
18:36:15,906 INFO  [ServerImpl] Server Home Dir: /Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default
18:36:15,906 INFO  [ServerImpl] Server Home URL: file:/Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default/
18:36:15,906 INFO  [ServerImpl] Server Data Dir: /Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default/data
18:36:15,906 INFO  [ServerImpl] Server Library URL: file:/Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default/lib/
18:36:15,906 INFO  [ServerImpl] Server Log Dir: /Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default/log
18:36:15,907 INFO  [ServerImpl] Server Native Dir: /Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default/tmp/native
18:36:15,907 INFO  [ServerImpl] Server Temp Dir: /Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default/tmp
18:36:15,907 INFO  [ServerImpl] Server Temp Deploy Dir: /Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default/tmp/deploy
18:36:16,416 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file:/Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default/conf/bootstrap.xml
18:36:16,851 INFO  [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]
18:36:16,854 INFO  [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]
18:36:17,055 INFO  [CopyMechanism] VFS temp dir: /Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/server/default/tmp
18:36:17,056 INFO  [ZipEntryContext] VFS force nested jars copy-mode is enabled.
18:36:17,905 INFO  [ServerInfo] Java version: 1.7.0_09,Oracle Corporation
18:36:17,905 INFO  [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
18:36:17,905 INFO  [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 23.5-b02,Oracle Corporation
18:36:17,906 INFO  [ServerInfo] OS-System: Mac OS X 10.7.5,x86_64
18:36:17,907 INFO  [ServerInfo] VM arguments: -Dprogram.name=run.sh -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.endorsed.dirs=/Users/ronyjohn007/JBOSS/jboss-5.1.0.GA/lib/endorsed 
18:36:17,934 INFO  [JMXKernel] Legacy JMX core initialized
18:36:19,183 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:722)
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 "ProfileService" is missing the following dependencies:
    Dependency "ProfileServiceDeployer" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.kernel:service=KernelController" (should be in state "Installed", but is actually in state "**ERROR**")
  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 "ProfileService" (should be in state "Installed", but is actually in state "Instantiated")
    Dependency "jboss.kernel:service=Kernel" (should be in state "Installed", but is actually in state "**ERROR**")
  Deployment "ProfileServicePersistenceDeployer" is missing the following dependencies:
    Dependency "AttachmentStore" (should be in state "Installed", but is actually in state "**ERROR**")

    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:722)
18:36:19,633 INFO  [ServerImpl] Runtime shutdown hook called, forceHalt: true
18:36:19,638 INFO  [ServerImpl] Shutdown complete
Shutdown complete
Halting VM

4 个答案:

答案 0 :(得分:27)

你可以试试这个。

在jboss-5.1.0.GA \ server \ default \ conf \ bootstrap中打开文件profile.xml

找到“附件商店”块:

在“参数”中添加“class =”java.io.File“。

或者您可以尝试以下链接: Error when starting JBoss 5.1.0.GA / AttachmentStore

直接解决方案的路径:Error starting jboss server

答案 1 :(得分:11)

打开文件profile.xml

jboss-5.1.0.GA \ 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> 
  

使用 - &gt;

<bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">  
 <constructor>><parameter class="java.io.File"><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>  

答案 2 :(得分:3)

我将java_home从1.7更改为1.6,这解决了我的问题(在bin \ run.conf或bin \ run.conf.bat中),而没有更改conf / bootstrap / profile.xml

答案 3 :(得分:0)

我的问题与gribo类似地解决了。我的路径变量正确指向JDK6(我用JDK6运行JBoss5.1)。但在eclipse中,我的JBoss运行时JRE指向JRE8。一旦我把它指向JRE6,问题就消失了。

我也没有必要更改conf / bootstrap / profile.xml。我先尝试过,但没有解决我的问题。