关于Weblogic部署调试的问题????

Racky 2002-06-17 10:10:01
在开发完成EJB并产生.jar文件以后,在Weblogic上面部署成功,但是通过客户端的程序测试出现下面错误:
D:\JBuilder6\jdk1.3.1\bin\javaw -classpath "E:\dev\Java\HelloBean\classes;D:\bea\wlserver6.0\lib\weblogic_sp.jar;D:\bea\wlserver6.0\lib\weblogic.jar;D:\JBuilder6\lib\jbuilder.jar;D:\JBuilder6\lib\help.jar;D:\JBuilder6\lib\gnuregexp.jar;D:\JBuilder6\jdk1.3.1\demo\jfc\Java2D\Java2Demo.jar;D:\JBuilder6\jdk1.3.1\jre\lib\i18n.jar;D:\JBuilder6\jdk1.3.1\jre\lib\jaws.jar;D:\JBuilder6\jdk1.3.1\jre\lib\rt.jar;D:\JBuilder6\jdk1.3.1\jre\lib\sunrsasign.jar;D:\JBuilder6\jdk1.3.1\lib\dt.jar;D:\JBuilder6\jdk1.3.1\lib\htmlconverter.jar;D:\JBuilder6\jdk1.3.1\lib\tools.jar" hellobean.HelloClient
<2002-6-17 上午09时58分25秒> <Info> <ConnectionManager> <Bootstrap unable to get a direct: 'Protocol: 't3''connection to: '0S:127.0.0.1:[7001,-1,-1,-1,-1,-1,-1]' on port: '7001'
java.rmi.ConnectException: Destination unreachable; nested exception is:
java.io.IOException: Empty server reply
java.io.IOException: Empty server reply
at weblogic.rjvm.t3.T3JVMConnection.connect(T3JVMConnection.java:102)
at weblogic.rjvm.t3.T3JVMConnection.createConnection(T3JVMConnection.java:148)
at weblogic.rjvm.Protocol.createConnection(Protocol.java:201)
at weblogic.rjvm.ConnectionManager.findOrCreateConnection(ConnectionManager.java:1077)
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:365)
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:330)
at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:228)
at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:188)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:180)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:149)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:207)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:235)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:176)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:123)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at hellobean.HelloClient.getInitialContext(HelloClient.java:41)
at hellobean.HelloClient.<init>(HelloClient.java:14)
at hellobean.HelloClient.main(HelloClient.java:60)
>
<2002-6-17 上午09时58分25秒> <Info> <ConnectionManager> <Bootstrap unable to get a routed: 'Protocol: 't3'' connection to: '0S:127.0.0.1:[7001,-1,-1,-1,-1,-1,-1]' on port: '7001'
java.rmi.ConnectException: No available router to destination
at weblogic.rjvm.ConnectionManager.findOrCreateRouter(ConnectionManager.java:1167)
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:378)
at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:330)
at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:228)
at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:188)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:180)
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:149)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:207)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:235)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:176)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:123)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at hellobean.HelloClient.getInitialContext(HelloClient.java:41)
at hellobean.HelloClient.<init>(HelloClient.java:14)
at hellobean.HelloClient.main(HelloClient.java:60)
>
Unable to connect to WebLogic server at t3://localhost:7001
Please make sure that the server is running.
javax.naming.CommunicationException. Root exception is java.net.ConnectException: No server found at T3://localhost:7001
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:207)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:235)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:176)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:123)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at hellobean.HelloClient.getInitialContext(HelloClient.java:41)
at hellobean.HelloClient.<init>(HelloClient.java:14)
at hellobean.HelloClient.main(HelloClient.java:60)


但是我的Weblogic明明是启动的阿
...全文
234 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Racky 2002-06-17
  • 打赏
  • 举报
回复
好像是不能建立一个T3协议的连接,怎么解决????


Bootstrap unable to get a direct: 'Protocol: 't3''connection to: '0S:127.0.0.1:[7001,-1,-1,-1,-1,-1,-1]' on port: '7001'
hexiaofeng 2002-06-17
  • 打赏
  • 举报
回复
String url = "t3://localhost:7001";

将localhost改为weblogic所在的ip
Luke_cn 2002-06-17
  • 打赏
  • 举报
回复
你看看你的EJB部署的时候,你的服务器是否指定是你的当前机器
Luke_cn 2002-06-17
  • 打赏
  • 举报
回复
你看看你用weblogic部署EJB时,是否指定了你的服务器,就是你的LOCALHOST是否在CHOSEN中
Racky 2002-06-17
  • 打赏
  • 举报
回复
测试的客户端程序代码如下

import javax.naming.*;
import java.util.Properties;
import javax.rmi.PortableRemoteObject;

public class HelloClient {
private HelloHome helloHome = null;

//Construct the EJB test client
public HelloClient() {
try {
//get naming context
Context ctx = getInitialContext();

//look up jndi name
Object ref = ctx.lookup("Hello");

//cast to Home interface
helloHome = (HelloHome) PortableRemoteObject.narrow(ref, HelloHome.class);
}
catch(Exception e) {
e.printStackTrace();
}
}

private Context getInitialContext() throws Exception {
String url = "t3://localhost:7001";
String user = null;
String password = null;
Properties properties = null;
try {
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, url);
if (user != null) {
properties.put(Context.SECURITY_PRINCIPAL, user);
properties.put(Context.SECURITY_CREDENTIALS, password == null ? "" : password);
}

return new InitialContext(properties);
}
catch(Exception e) {
System.out.println("Unable to connect to WebLogic server at " + url);
System.out.println("Please make sure that the server is running.");
throw e;
}
}

//----------------------------------------------------------------------------
// Utility Methods
//----------------------------------------------------------------------------

public HelloHome getHome() {
return helloHome;
}
//Main method

public static void main(String[] args) {
HelloClient client = new HelloClient();
// Use the getHome() method of the client object to call Home interface
// methods that will return a Remote interface reference. Then
// use that Remote interface reference to access the EJB.
}
}
Luke_cn 2002-06-17
  • 打赏
  • 举报
回复
把你的代码贴出来

1,220

社区成员

发帖
与我相关
我的任务
社区描述
企业软件 中间件技术
社区管理员
  • 中间件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧