JBoss5.1GA启动异常

2024-09-04 17:08
文章标签 启动 异常 ga jboss5.1

本文主要是介绍JBoss5.1GA启动异常,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

转:http://www.cnblogs.com/zhmore/archive/2010/09/25/1834700.html


1.报错:java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
        java.net.BindException: Address already in use: JVM_Bind
此错误常在4.2版本中出现。
需要修改的文件的路径:jboss-4.2.2.GA\server\default\conf\jboss-service.xml   把1098改为其它号码即可,一直改到它成功为止

<attribute name="Port">1099</attribute>
     
<attribute name="RmiPort">1098</attribute>

2.报错:java.net.BindException:   Address   already   in   use:   JVM_Bind:8080
需要修改的文件的路径:jboss-4.2.2.GA\server\default\deploy\jboss-web.deployer\server.xml
把8080改为其它号码即可,一直改到它成功为止,修改后一定记得要保存.如安装eclipse插件可以打开服务直接修改Port即可。
此错误在各个版本都常见。

JBOSS里面这个异常说明端口1098被其他进程占用了,查看占用进程的方法为:


1)命令行cmd -> netstat -ano | findstr "1098",得到占用端口1098的pID
2)ctrl+alt+del,进入任务管理器,点击“查看‘,选择pid后,查看是那个进程占用的,结束即可


3.报错: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]
具体:
...
16:15:28,605 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 "ProfileServicePersistenceDeployer" is missing the following dependencies:  
    Dependency "AttachmentStore" (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 "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 "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**")  
 
    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)  
16:15:29,515 INFO  [ServerImpl] Runtime shutdown hook called, forceHalt: true 
16:15:29,523 INFO  [ServerImpl] Shutdown complete  
Shutdown complete  
Halting VM  


此错误常在5.1版本中出现。
这个错误是配置文件profile.xml内的一个bug,文件路径为:$JBOSS_HOME/server/<serverName>/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>

4.错误信息:
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss:service=NamingProviderURLWriter state=Create mode=Manual requiredState=Installed
java.io.IOException: Access is denied

解决办法:停止windows的Indexing Service服务。出现错误原因如下:
It seemed that a file was being locked for some reason, and that file was obviously necessary for JBoss to start. Some further investigation (ok, I admit, I just tried to delete all of JBoss with the faith that it would fail on the locked file), it turns out that file was some file called jnp-service.url in the data directory of the default server. After downloading and installing the handy Unlocker tool (http://ccollomb.free.fr/unlocker/), it turns out that cidaemon.exe (aka the Windows Indexing Service) was locking the file for some reason. Turning off the Indexing Service solved that problem.

The second issue came when I attempted to deploy my WAR file with my JAX-WS service into my new JBoss server. Again, I could not get it to deploy, and a review of the log files showed
"vfsfile:/C:/dev/Workspaces/BeliefNet/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_5.1_Server/deploy/RAFTSOA.war/" is in error due to the following reason(s): java.lang.StringIndexOutOfBoundsException: String index out of range: -1
A strange and cryptic error indeed. As you can see, I was using the JBoss tools integration with Eclipse, so I tried just exporting the WAR file and copying it manually to the JBoss deploy directory, but still no luck. With nightmares of "pouring through source code to see what JBoss is doing when it throws this exception" dancing in my head, luckily Google gave a bunch of pieces to the puzzle to what might be causing this. It turns out that JBoss requires all servlets and such to be inside a package. This was not the case when I was just deploying in Tomcat alone, but luckily this is among the easiest problems to fix.
Happy to say, after those issues were resolved, my sample JAX-WS application is up and running. Now I just have to unlock the puzzle of JAX-WS, JAXB, and how everything lives in harmony to create a viable SOA solution....

5.启动正常在但是使用JBoss Tool3.1的插件JBossAS Tool发布无效(JBoss5.1 Runtime Server发布无效),但是在默认Runtime路径“workspace\.metadata\.plugins\org.jboss.ide.eclipse.as.core\JBoss_5.1_Runtime_ServerXXX”内可以看到发布的项目,启动JBoss却无法访问发布信息,这个问题郁闷了我两天,最终发现一个令人无语的问题,那就是在创建JBoss的项目的时候项目物理路径内不能存在空格,比如路径“Ejb3 Project”等带有空格目录的项目发布后将无法被JBoss正确加载(真佩服这帮程序员)。

解决办法:在开发JBoss的项目时候项目路径一定不要带空格或者其它比较少用的特殊字符,JBoss对路径特别敏感。

OK,可以正常启动了。


这篇关于JBoss5.1GA启动异常的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1136524

相关文章

SpringBoot启动报错的11个高频问题排查与解决终极指南

《SpringBoot启动报错的11个高频问题排查与解决终极指南》这篇文章主要为大家详细介绍了SpringBoot启动报错的11个高频问题的排查与解决,文中的示例代码讲解详细,感兴趣的小伙伴可以了解一... 目录1. 依赖冲突:NoSuchMethodError 的终极解法2. Bean注入失败:No qu

Java异常架构Exception(异常)详解

《Java异常架构Exception(异常)详解》:本文主要介绍Java异常架构Exception(异常),具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1. Exception 类的概述Exception的分类2. 受检异常(Checked Exception)

Java报NoClassDefFoundError异常的原因及解决

《Java报NoClassDefFoundError异常的原因及解决》在Java开发过程中,java.lang.NoClassDefFoundError是一个令人头疼的运行时错误,本文将深入探讨这一问... 目录一、问题分析二、报错原因三、解决思路四、常见场景及原因五、深入解决思路六、预http://www

一文带你了解SpringBoot中启动参数的各种用法

《一文带你了解SpringBoot中启动参数的各种用法》在使用SpringBoot开发应用时,我们通常需要根据不同的环境或特定需求调整启动参数,那么,SpringBoot提供了哪些方式来配置这些启动参... 目录一、启动参数的常见传递方式二、通过命令行参数传递启动参数三、使用 application.pro

SpringBoot项目启动报错"找不到或无法加载主类"的解决方法

《SpringBoot项目启动报错找不到或无法加载主类的解决方法》在使用IntelliJIDEA开发基于SpringBoot框架的Java程序时,可能会出现找不到或无法加载主类com.example.... 目录一、问题描述二、排查过程三、解决方案一、问题描述在使用 IntelliJ IDEA 开发基于

一文带你深入了解Python中的GeneratorExit异常处理

《一文带你深入了解Python中的GeneratorExit异常处理》GeneratorExit是Python内置的异常,当生成器或协程被强制关闭时,Python解释器会向其发送这个异常,下面我们来看... 目录GeneratorExit:协程世界的死亡通知书什么是GeneratorExit实际中的问题案例

Java捕获ThreadPoolExecutor内部线程异常的四种方法

《Java捕获ThreadPoolExecutor内部线程异常的四种方法》这篇文章主要为大家详细介绍了Java捕获ThreadPoolExecutor内部线程异常的四种方法,文中的示例代码讲解详细,感... 目录方案 1方案 2方案 3方案 4结论方案 1使用 execute + try-catch 记录

SpringBoot项目启动错误:找不到或无法加载主类的几种解决方法

《SpringBoot项目启动错误:找不到或无法加载主类的几种解决方法》本文主要介绍了SpringBoot项目启动错误:找不到或无法加载主类的几种解决方法,具有一定的参考价值,感兴趣的可以了解一下... 目录方法1:更改IDE配置方法2:在Eclipse中清理项目方法3:使用Maven命令行在开发Sprin

解决java.lang.NullPointerException问题(空指针异常)

《解决java.lang.NullPointerException问题(空指针异常)》本文详细介绍了Java中的NullPointerException异常及其常见原因,包括对象引用为null、数组元... 目录Java.lang.NullPointerException(空指针异常)NullPointer

Nginx启动失败:端口80被占用问题的解决方案

《Nginx启动失败:端口80被占用问题的解决方案》在Linux服务器上部署Nginx时,可能会遇到Nginx启动失败的情况,尤其是错误提示bind()to0.0.0.0:80failed,这种问题通... 目录引言问题描述问题分析解决方案1. 检查占用端口 80 的进程使用 netstat 命令使用 ss