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

相关文章

Android里面的Service种类以及启动方式

《Android里面的Service种类以及启动方式》Android中的Service分为前台服务和后台服务,前台服务需要亮身份牌并显示通知,后台服务则有启动方式选择,包括startService和b... 目录一句话总结:一、Service 的两种类型:1. 前台服务(必须亮身份牌)2. 后台服务(偷偷干

Windows设置nginx启动端口的方法

《Windows设置nginx启动端口的方法》在服务器配置与开发过程中,nginx作为一款高效的HTTP和反向代理服务器,被广泛应用,而在Windows系统中,合理设置nginx的启动端口,是确保其正... 目录一、为什么要设置 nginx 启动端口二、设置步骤三、常见问题及解决一、为什么要设置 nginx

springboot启动流程过程

《springboot启动流程过程》SpringBoot简化了Spring框架的使用,通过创建`SpringApplication`对象,判断应用类型并设置初始化器和监听器,在`run`方法中,读取配... 目录springboot启动流程springboot程序启动入口1.创建SpringApplicat

树莓派启动python的实现方法

《树莓派启动python的实现方法》本文主要介绍了树莓派启动python的实现方法,文中通过图文介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧... 目录一、RASPBerry系统设置二、使用sandroidsh连接上开发板Raspberry Pi三、运

Spring Boot统一异常拦截实践指南(最新推荐)

《SpringBoot统一异常拦截实践指南(最新推荐)》本文介绍了SpringBoot中统一异常处理的重要性及实现方案,包括使用`@ControllerAdvice`和`@ExceptionHand... 目录Spring Boot统一异常拦截实践指南一、为什么需要统一异常处理二、核心实现方案1. 基础组件

SpringBoot项目启动后自动加载系统配置的多种实现方式

《SpringBoot项目启动后自动加载系统配置的多种实现方式》:本文主要介绍SpringBoot项目启动后自动加载系统配置的多种实现方式,并通过代码示例讲解的非常详细,对大家的学习或工作有一定的... 目录1. 使用 CommandLineRunner实现方式:2. 使用 ApplicationRunne

Python中异常类型ValueError使用方法与场景

《Python中异常类型ValueError使用方法与场景》:本文主要介绍Python中的ValueError异常类型,它在处理不合适的值时抛出,并提供如何有效使用ValueError的建议,文中... 目录前言什么是 ValueError?什么时候会用到 ValueError?场景 1: 转换数据类型场景

Spring中Bean有关NullPointerException异常的原因分析

《Spring中Bean有关NullPointerException异常的原因分析》在Spring中使用@Autowired注解注入的bean不能在静态上下文中访问,否则会导致NullPointerE... 目录Spring中Bean有关NullPointerException异常的原因问题描述解决方案总结

bat脚本启动git bash窗口,并执行命令方式

《bat脚本启动gitbash窗口,并执行命令方式》本文介绍了如何在Windows服务器上使用cmd启动jar包时出现乱码的问题,并提供了解决方法——使用GitBash窗口启动并设置编码,通过编写s... 目录一、简介二、使用说明2.1 start.BAT脚本2.2 参数说明2.3 效果总结一、简介某些情

Python中的异步:async 和 await以及操作中的事件循环、回调和异常

《Python中的异步:async和await以及操作中的事件循环、回调和异常》在现代编程中,异步操作在处理I/O密集型任务时,可以显著提高程序的性能和响应速度,Python提供了asyn... 目录引言什么是异步操作?python 中的异步编程基础async 和 await 关键字asyncio 模块理论