Trying to install an already registered mbean
来源:互联网 发布:数据化生产管理 编辑:程序博客网 时间:2024/06/07 06:33
问题描述:
同事问什么情况下,JBOSS的数据源会加载两遍。
想了想,回答说,出错的情况下:)
开发的一个同事用jobss连测开发库的时候一切正常,但想通过oracle-ds.xml连测试库的时候出现了数据源加载两遍的问题。
以下是错误信息:
09:03:14,865 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
09:03:14,944 ERROR [MainDeployer] Could not create deployment: file:/D:/jboss-eap-4.3/jboss-as/server/8080/deploy/oracle-ds.xml
org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=demoDataSource
at org.jboss.system.ServiceCreator.install(ServiceCreator.java:103)
at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:455)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
at org.jboss.system.ServiceController.install(ServiceController.java:226)
at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@a609c605 { url=file:/D:/jboss-eap-4.3/jboss-as/server/8080/deploy/oracle-ds.xml }
deployer: org.jboss.deployment.XSLSubDeployer@1a0eec3
status: Deployment FAILED reason: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=demoDataSource
state: FAILED
watch: file:/D:/jboss-eap-4.3/jboss-as/server/8080/deploy/oracle-ds.xml
altDD: null
lastDeployed: 1309251794944
lastModified: 1309251794897
mbeans:
简单记录解决过程:
1 .删除oracle-ds.xml后,重启jboss.
应用可以正常访问数据库。奇怪了,JBOSS中deploy目录下没有了oracle-ds.xml,还能访问数据库。比较不正常。
2.问同事做过什么操作?
答:原来连开发库,一切正常。后来想换测试库的时候,就删除了开发库的oracle-ds.xml。把配置好测试库的oracle-ds.xml
拷贝过来就出错了。但原来这个测试库的oracle-ds.xml是可以用的。
3.检查了一下,测试库的oracle-ds.xml确实没有问题。
4.分析与猜测
没有oracle-ds.xml居然可以连数据库,这是不正常的。一定是在deploy的其它目录下有oracle-ds.xml文件。但在deploy目录下搜索了一遍。没发现oracle-ds.xml。但我坚信deploy目录下一定是有oracle-ds.xml。否则在我们的应用里不可能连上数据库。
5.真像大白
按修改日期对deploy目录下的文件排了一下序,发现一个jboss的jar包(jboss-ha-local-jdbc.rar)居然被修改过。按常理这个jar开发人员是不会去修改的。同事也说没动过这个jar。我相信机器是不会骗人的,有没有修改过。打开看看就知道了。果然用rar打开这个jar包的时候,在jar包中看到了一个oracle-ds.xml。而这个oracle-ds.xml正是连测试库的配置文件。
jar包中已经有了一个oracle-ds.xml,在deploy中再配置一个相同的oracle-ds.xml。出现Trying to install an already registered mbean 这个错误也就正常了。
这也解释了,删除掉deploy目录下的oracle-ds.xml后,系统能连数据库的原因了。
这时同事回想起来了,她拷贝测试库oracle-ds.xml的时候,拷贝了两遍。第一遍是拖过来的,但拖过来后在depoly目录下没发现oracle-ds.xml。又ctrl+c ,ctrl+v拷贝了一遍。再启动jboss的时候就出错了。没想到这小个问题,浪费了她大半天的时间。
当帮她解决完这个问题时,她说你对jboss了解的真透彻。这么偏的问题,你都能找出来。
呵呵,其实我也是碰的,不一定什么问题都能解决。只不过是比她多了些怀疑与猜测的思想而已。
- Trying to install an already registered mbean
- Trying to install an already registered mbean
- org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:s
- 警告处理 A C3P0Registry mbean is already registered. This probably means that an application using c3p.
- 警告处理 A C3P0Registry mbean is already registered. This probably means that an application using c3p.
- 警告: A C3P0Registry mbean is already registered. This probably means that an application...
- A C3P0Registry mbean is already registered.This probably means that an application using c3p0的警告信息处理
- android java.lang.IllegalStateException: trying to requery an already closed cursor
- Cursor获取的时候有异常的处理 java.lang.IllegalStateException: trying to requery an already closed cursor
- Unable to install this application because an application with the same identity is already installe
- Trying to dismiss the presentation controller while transitioning already
- Error: Failed to create feature class. Table already registered
- Error: Failed to create feature class. Table already registered
- EventBus3.0报 Subscriber class ...... already registered to......
- trying to install xdebug: configure file not found
- Github问题An error occurred trying to download
- GitHub安装出现An error occurred trying to download...错误
- Attempted to lock an already-locked dir
- VC 调用外部程序
- oracle partition 分区建立详解
- 全面掌握ISO8583报文协议
- Erlang 编译时出现"no such file or directory" 与 当前工作目录问题
- linux 文件打开数设置, too ma
- Trying to install an already registered mbean
- javascript中的typeof 的用法详解
- Oracle面试常见的二十个问题及回答
- How to use bluetooth tools --- hciattach hciconfig hcitool sdptool rfcomm
- error C2148: 数组的总大小不得超过0x7fffffff字节
- Some chilled wintry weather occasion
- 金融行业密钥详解
- 如何杀死oracle死锁进程
- HOW TO Analyze ASP.NET Web Application Performance by Using the Performance Administration Tool