Could not obtain connection to any of these urls:
来源:互联网 发布:网络重庆时时彩代理 编辑:程序博客网 时间:2024/05/17 04:28
错误:
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.17.105:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server /192.168.17.105:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /192.168.17.105:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1725)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:689)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at test.Client.main(Client.java:29)
处理:
在本文中将编写一个简单的无状态SessionBean。在发布EJB时,一般需要将EJB程序以jar文件的形式进行发布。这些jar文件将被放在<JBoss安装目录>\server\default\deploy目录中。如果在Eclipse中开发EJB程序,需要进行一些配置。首选需要在首选项(Preferences)对话框中设置JBoss的安装目录(如D:\jboss5)。然后在运行配置对话框中添加jboss的运行项。在jboss4.2及以后的版本中,默认情况下jboss只接收来自localhost或127.0.0.1的请求,也就是只接收本地的访问。为了使jboss接收来自其他地址的请求,在启动jboss时需要使用-b命令行参数进行设置。如下面的启动命令所示:
上面的第一行命令表示jboss可以接收来自200.200.200.123的请求。第二条命令表示jboss可以接收来自任意地址的请求。如果不设置-b参数,以非本机方式访问EJB时,JBoss会抛出如上异常。
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.17.105:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server /192.168.17.105:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /192.168.17.105:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1725)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:689)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at test.Client.main(Client.java:29)
处理:
在本文中将编写一个简单的无状态SessionBean。在发布EJB时,一般需要将EJB程序以jar文件的形式进行发布。这些jar文件将被放在<JBoss安装目录>\server\default\deploy目录中。如果在Eclipse中开发EJB程序,需要进行一些配置。首选需要在首选项(Preferences)对话框中设置JBoss的安装目录(如D:\jboss5)。然后在运行配置对话框中添加jboss的运行项。在jboss4.2及以后的版本中,默认情况下jboss只接收来自localhost或127.0.0.1的请求,也就是只接收本地的访问。为了使jboss接收来自其他地址的请求,在启动jboss时需要使用-b命令行参数进行设置。如下面的启动命令所示:
run.bat -b 200.200.200.123
run.bat -b 0.0.0.0
run.bat -b 0.0.0.0
上面的第一行命令表示jboss可以接收来自200.200.200.123的请求。第二条命令表示jboss可以接收来自任意地址的请求。如果不设置-b参数,以非本机方式访问EJB时,JBoss会抛出如上异常。
- Could not obtain connection to any of these urls:
- Could not obtain connection to any of these urls:
- Could not obtain connection to any of these urls: localhost:1099
- JBoss错误:"Could not obtain connection to any of these urls"的解决方法
- Could not obtain connection metadata
- Could not obtain connection metadata
- Could not obtain connection metadata
- Could not obtain connection metadata问题
- SSH整合报错:Could not obtain connection to query metadata
- WARN SettingsFactory:109 - Could not obtain connection metadata
- hibernate错误;Could not obtain connection metadata : 不支持的特性
- Could not obtain connection metadata 查看SQL SERVER2012端口
- 没有用数据库却提示我Could not obtain connection metadata
- WARN SettingsFactory:140 - Could not obtain connection metadata
- Authentication error: Unable to respond to any of these challenges
- 异常Not able to obtain connection的解决办法
- Could not create connection to database server
- 用Hibernate+Proxool连Oracle RAC时报“Could not obtain connection metadata”的解决办法
- 单文档中将系统工具栏更换成自己定义的工具栏
- Silverlight WCF RIA服务(三十三)身份验证、角色、个性化 4
- 大型宴席如何安排座位?SocialTables帮你轻松搞定
- IT世界三大定律
- hadoop源码研读之路(七)----HDFS的数据管理
- Could not obtain connection to any of these urls:
- Silverlight WCF RIA服务(三十四)身份验证、角色、个性化 5
- qTip2 Show
- ActionContext和ServletActionContext小结
- [转载]James Bach:测试人员的角色
- (转)HBase 官方文档__中文版
- linux命令学习笔记
- 精明的程序员——不爱官气
- 关于无法自动安装openssh-server问题