0 Replies Latest reply on Jan 23, 2015 7:53 AM by gianpiero8282

    Datasource problem on 10.2.0.4.0 Jdbc

    gianpiero8282

      Hi!
      I'm working on WebLogic Server: 9.2 and java: 1.5.0_13-b05 on SunOs.
      There is a strange behavior on my Test1 and Test2 Enviroment.
      Test2 is a cluster Enviroment.
      I've this simple Java class:

      Connection connection = null;
      Context ic = null;
      String sqlStr = "SELECT 'CIAO' AS SMS FROM DUAL";

      try {
      ic = new InitialContext();
      DataSource dataSource = (DataSource) ic.lookup("infowattNXA");
      connection = dataSource.getConnection();
      Statement stmt=connection.createStatement();
      ResultSet rs = stmt.executeQuery(sqlStr);

      while (rs.next()) {
      System.out.println("FROM DB: " + rs.getString("SMS");
      }
      .........
      } catch (Exception e) {
      .........
      }

      If I run this on my Test1 Enviroment with 10.2.0.4.0 Jdbc version on infowattNXA (NonXA datasource), it prints nothing:
      FROM DB:
      but if I change my CLASSPATH with 10.2.0.2.0 Jdbc it works:
      FROM DB: CIAO

      If I run this on my Test2 Enviroment with 10.2.0.2.0 Jdbc version on infowattXA(XA datasource), it prints:
      FROM DB: CIAO
      and if I change my CLASSPATH with 10.2.0.4.0 Jdbc it works too:
      FROM DB: CIAO


      What is wrong?

      Thank you,