应该是Socket的问题吧,你的程序运行用到网络方面的连接吗?或者说用到Socket了吗?
如果没有用刀,我想也能正常运行也可能不是程序的问题,是你机器的问题,比如开了防火墙?

解决方案 »

  1.   

    关了防火墙也有问题。
    最近W32.Blaster.Worm病毒泛滥,我的xp不知怎么得无法升级,只有开着防火墙,机子就变慢了,还好我的内存384 DDR的。我又舍不得重装系统,机子里太多东西了
      

  2.   

    我的源码在这儿
    -------------------------------------------------------------------------------package j2eeTest;import java.sql.*;
    import javax.naming.*;
    import javax.sql.*;
    import java.util.Properties;
    import javax.rmi.PortableRemoteObject;public class Example1 {    public static void main(String[] args) {
    DataSource ds = null;
    Context ctx = null;
    Connection myConn = null;
    try {
        /* 获得WebLogic ServerJNDI初始上下文信息
         */
        ctx = getInitialContext();
        /* 建立数据源对象
         */
        ds = (javax.sql.DataSource)
     ctx.lookup("myDataSource");
    } catch(Exception E) {
        System.out.println("Init Error: " + E);
    }
    Statement myStatement = null;
    ResultSet myResultSet = null;
    try {
        //建立连接
        myConn = ds.getConnection();
        // 建立语句对象
        myStatement = myConn.createStatement();
        //建立结果集对象
        myResultSet = myStatement.executeQuery(
        "SELECT stuid from student"
        );
        //遍历结果集对象,访问每一条记录,输出full_name字段
        while(myResultSet.next()) {
    System.out.println("the student full name is " +
       myResultSet.getString("stuid"));
        }
        //关闭结果集
        myResultSet.close();
    } catch(SQLException e) {
        System.out.println("Error code = " + e.getErrorCode());
        System.out.println("Error message = " + e.getMessage());
    } finally {
        try {
    // close the Statement object using the close() method
    if(myStatement != null) {
        myStatement.close();
    }
    // close the Connection object using the close() method
    if(myConn != null) {
        myConn.close();
    }
        } catch(SQLException e) {
    System.out.println("Error code = " + e.getErrorCode());
    System.out.println("Error message = " + e.getMessage());
        }
    }    }    private static Context getInitialContext() throws Exception {
    String url = "t3://localhost:7001";
    String user = "NakoRuru";
    String password = "47421062";
    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) {
        throw e;
    }
        }}
      

  3.   

    我觉得这个错误与你的程序无关。你试试把在weblogic中部署的ejb或ear都卸掉,重启服务器是否还报错。
      

  4.   

    奇怪,我启动weblogic时然后再运行程序就都不会发生错误。但用jbuilder启动weblogic server时,就会发生楼顶的错误。然后我运行程序时又会发生以下错误:(是在启动weblogic的tab里打印出错误,不是在程序的tab里打印出错误)
    ----------------------------------------------------------------------------
    <2003-8-23 上午12时06分58秒> <Error> <socket> <000403> <IOException on socket: Socket[addr=/127.0.0.1,port=4420,localport=7001]
     java.net.SocketException: Connection reset
    java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:328)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)

      

  5.   

    和你的程序无关,在你的jbuilder安装目录下你搜索一下libmuxer如果有的话,考到'D:/bea7/weblogic700/server/bin'目录下即可
      

  6.   

    不影响其它程序的运行吗?我没有找到libmuxer
      

  7.   

    你用的是什么操作系统.你的weblogic是不是6.x版本的,只有for linux的版本才有Performance Pack,如果你用的是6.x而且是for linux那么下载一个6.x的sp,例如6.1的是SP5。祝你好运!
      

  8.   

    我的winxp中文版,weblogic7呀,而且打不起病毒补丁
      

  9.   

    jbuilder 的BUG,在server配置的参数,把D:D:改成D: