OC4J problem and End of TNS data channel

We are using Oralce 9iAS with OC4J to host our java application. Recently, we kept having problem with the application. The problem is when user enters username and password to login, the application doesn't do anything until we restart OC4J instance. After tracking down all the error log files, it looks like problem happened whenever the application get "SQL Exception: End of TNS data channel" error. I don't know why are we getting this "End of TNS data channel" error. I don't think it is the application's problem.
1)Does anybody have any idea why?
2)Does OC4J server need to be restarted every once a while.
Thanks in advance.

Hi Liya -
"End of TNS data channel" is usually a message sent by the database when something erroneous is occuring.
What version of the database, JDBC, and JDK are you using?
Are you getting any dump files from the database?
Can you describe a little more about what the application code is doing?
There is some good information on this error message at the following URL
http://forum.java.sun.com/thread.jsp?thread=280338&forum=48&message=1090056
-steve-

Similar Messages

  • Exhausted Result set and End of TNS data channel

    Please reply to : [email protected] (there's hopeful :-)
    Using the same code, but with different drivers I get :
    8.1.7 Thin Driver : End of TNS data channel
    8.1.7 OCI Driver : Exhausted Resultset
    Both are talking to an 8.1.7 server.
    The problems are coming at different points in the code, and seem
    to be data/volume based - they are reproducible in the main, but
    don't always happen.
    I've checked the forums for both of these problems, but nothing
    seems to match my approach - just loads of calls to simple
    prepared statements generated for an OO/RDB mapping.
    Any pointers appreciated - such as why these happen?
    Thanks
    tim
    Thanks

    Hi Liya -
    "End of TNS data channel" is usually a message sent by the database when something erroneous is occuring.
    What version of the database, JDBC, and JDK are you using?
    Are you getting any dump files from the database?
    Can you describe a little more about what the application code is doing?
    There is some good information on this error message at the following URL
    http://forum.java.sun.com/thread.jsp?thread=280338&forum=48&message=1090056
    -steve-

  • Java.sql.SQLException: Io exception: End of TNS data channel

    Hello folks,
    Has amyone encountered this exception? If so, could you please shed some light for what might be going wrong?
    Here is my confuguration:
    400MB RAM
    1.2GHTz processor
    Win2K Pro
    Oracle server 9.0.1
    JDBC Thin driver (libs for 9.0.1)
    Scenario:
    My Java code uses Oracle Spatial to insert SDO_GEOMETRY objects into my DB model.
    I have a config file where I store my connection properties, e.g.,
    <DBConnection name="twatest">
    <JDBCDriver>oracle.jdbc.driver.OracleDriver</JDBCDriver>
    <URL>jdbc:oracle:thin:@saturn:1521:saturn</URL>
    <Username>user1</Username>
    <Password>twatest</Password>
    </DBConnection>
    We have 2 schemas defined: user1 and twatest.
    The problem first occured when I switched from user1 to twatest. Consequent attempt to run the process as user user1 failed! The Java SQL statements do not use schemas (so they default, I suppose, to the default schema for that particular user, in our case being user1-->user1, twatest-->twatest).
    The problem happens in the following Java class (search for "HERE" to see where exactly the problem occurs):
    package com.vividsolutions.twatest;
    import java.util.*;
    import java.sql.*;
    import oracle.sql.*;
    import oracle.sdoapi.OraSpatialManager;
    import oracle.sdoapi.geom.*;
    import oracle.sdoapi.adapter.*;
    import oracle.sdoapi.sref.*;
    import com.vividsolutions.twatest.parser.*;
    import com.vividsolutions.twatest.config.*;
    import com.vividsolutions.twatest.model.*;
    * This class is responsible for loading lakes into the SDO Oracle Spatial DB.
    public class LakeLoader
    static boolean initialized = false;
    private static GeometryFactory gF;
    private static SRManager srManager;
    private static SpatialReference sref;
    private static GeometryAdapter sdoAdapter;
    public static void loadLake(EdgedLake slake, Connection conn) throws Exception {
    com.vividsolutions.jts.geom.Envelope e = slake.getEnvelope();
    if (e == null) {
    System.out.println("Invalid envilope (feature ID="+slake.getFeatureId()+")! Ignoring...");
    return; // ignore lake - it's invalid (no envilope)
    if (!initialized) {
    initialize(conn);
    initialized = true;
    Geometry geom;
    STRUCT str;
    // insert Lake
    String lakeQuery = "INSERT INTO lake " +
    "(lake_id, area, bounding_box, name, instantiation_date) " +
    "VALUES(?,?,?,?,?)";
    PreparedStatement ps = conn.prepareStatement(lakeQuery);
    int lakeId = getId(Lake.ID, conn);
    ps.setInt(1, lakeId);
    ps.setDouble(2, Double.parseDouble(slake.getArea()));
    // Creates a 2-D rectangle (special case of Polygon geometry).
    geom = gF.createRectangle(e.getMinX(), e.getMinY(), e.getMaxX(), e.getMaxY());
    ps.setObject(3, sdoAdapter.exportGeometry(STRUCT.class, geom));
    ps.setString(4, slake.getName());
    ps.setTimestamp(5, new Timestamp(new java.util.Date().getTime()));
    ps.executeUpdate(); // <-- HERE I got: java.sql.SQLException: Io exception: End of TNS data channel
    //ps.close();
    String ringQuery = null;
    int ringId = 0;
    List shellEdges = slake.getShellEdges();
    if (shellEdges != null && shellEdges.size() > 0) { // if there is valid shell, insert it...
    // insert shell Rings
    ringQuery = "INSERT INTO ring (ring_id, lake_id, type) VALUES(?,?,?)";
    ps = conn.prepareStatement(ringQuery);
    ringId = getId(Ring.ID, conn);
    ps.setInt(1, ringId);
    ps.setInt(2, lakeId);
    ps.setString(3, Ring.SHELL);
    ps.executeUpdate();
    //ps.close();
    // insert shell ring Edges
    insertEdges(shellEdges, lakeId, Ring.SHELL, ringId, conn);
    List holeEdges = slake.getHoleEdges();
    if (holeEdges != null && holeEdges.size() > 0) { // if there are valid holes, insert them...
    // insert hole Rings
    ringQuery = "INSERT INTO ring (ring_id, lake_id, type) VALUES(?,?,?)";
    ps = conn.prepareStatement(ringQuery);
    ringId = getId(Ring.ID, conn);
    ps.setInt(1, ringId);
    ps.setInt(2, lakeId);
    ps.setString(3, Ring.HOLE);
    ps.executeUpdate();
    //ps.close();
    // insert hole ring Edges
    insertEdges(holeEdges, lakeId, Ring.HOLE, ringId, conn);
    ps.close();
    private static void insertEdges(List edges, int lakeId, String ringType,
    int ringId, Connection conn) throws Exception {
    if (!initialized) {
    initialize(conn);
    initialized = true;
    Geometry geom;
    STRUCT str;
    // insert shell ring Edges
    String edgeQuery = "INSERT INTO edge " +
    "(edge_id, lake_id, ring_type, ring_id, edge_sequence, shape) " +
    "VALUES(?,?,?,?,?,?)";
    int edge_sequence = 0;
    for (Iterator it=edges.iterator(); it.hasNext(); ) {
    Edge edge = (Edge)it.next();
    geom = gF.createLineString(LakeFactory.edgeToArray2D(edge)); // 2-dimensional coordinates
    PreparedStatement ps = conn.prepareStatement(edgeQuery);
    int edgeId = getId(Edge.ID, conn);
    ps.setInt(1, edgeId);
    ps.setInt(2, lakeId);
    ps.setString(3, ringType);
    ps.setInt(4, ringId);
    ps.setInt(5, edge_sequence++);
    ps.setObject(6, sdoAdapter.exportGeometry(STRUCT.class, geom));
    ps.executeUpdate();
    ps.close();
    * @param key This can be: "lake", "ring", or "edge".
    * @param conn The connection to use.
    * @return the unique ID corresponding to the given key.
    public static int getId(String key, Connection conn) {
    int id = -1;
    try {
    String query = "SELECT "+key+"_SEQUENCE.NEXTVAL FROM DUAL";
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery(query);
    while (rs.next()) {
    id = rs.getInt(1);
    stmt.close();
    } catch(SQLException sqle) {
    sqle.printStackTrace();
    return id;
    private static void initialize(Connection conn) throws Exception {
    gF = OraSpatialManager.getGeometryFactory();
    // Set spatial reference system in which the geometries will be created
    srManager = OraSpatialManager.getSpatialReferenceManager(conn);
    sref = srManager.retrieve(8307);
    gF.setSpatialReference(sref);
    sdoAdapter = OraSpatialManager.getGeometryAdapter("SDO", "8.1.6",
    null, STRUCT.class, null, conn);
    public static void main(String args[]) throws Exception
    String[] xmlLakeFiles = {
    "lakes101to1400.xml",
    "lakes1401to10000.xml",
    "lakes10001to20000.xml",
    "lakes20001to30000.xml",
    "lakes30001to40000.xml",
    "lakes40001to50000.xml",
    "lakes50001to60000.xml"
    PropertyManager pm = new PropertyManager();
    int numberOfLoadedLakes = 0;
    try {
    pm.initialize();
    Map modelMap = (Map)pm.get(XMLConfigFile.MODEL_MAP);
    LakeModel lakeModel = (LakeModel)modelMap.get(LREConcreteLakeModel.NAME);
    Connection connection = ConnectionManager.getConnection();
    lakeModel.setConnection(connection);
    for (int i=0; i<xmlLakeFiles.length; i++) {
    long then = System.currentTimeMillis();
    System.out.println("Loading lake "+xmlLakeFiles[i]+"...");
    numberOfLoadedLakes = lakeModel.loadModel(xmlLakeFiles);
    long now = System.currentTimeMillis();
    System.out.println("Loaded "+numberOfLoadedLakes+" lakes!");
    System.out.println("Execution time: "+(now-then)/1000+" seconds!");
    System.out.println("Loading lake "+xmlLakeFiles[i]+"...done!");
    connection.close();
    } catch(Exception e) {
    e.printStackTrace();
    My client class calls LakeLoader.loadLake() method in a loop to load a bunch of Lake objects into the DB. The first lake in the list is created without problems, but when the 2-nd lake is being inserted, I get an exception at the preparedStatement.executeUpdate() statement. This happens consistently.
    I tried to find information on this on the net, but seems that this problem only happened when people dealt with LOBs?!
    Thank you very much!
    Georgi

    Suresh -- I'd probably log a TAR with Oracle support for this question if you definitely need it resolved. Support have access to all manner of existing cases, so this may be something they have seen before.
    cheers
    -steve-

  • JDBC Thin Driver "End of TNS Data Channel

    I don't know how much hope there is of getting this answered. It looks like most of these questions are going either ignored or simply abandoned by the Oracle staff, but here it goes.
    I have an Oracle 7.3.4 database running on Netware 4.11. I was writing an app that would allow me to run a query and dump the output to Swing JTable.
    I was using the JDBC 7.3.4 driver and was able to connect and run queries, however manipulating the resultset was difficult.
    As I looked into moving the resultset data into a JTable, I realized I needed to make a custom Table model. JDBC 2.0 seemed to have all the features that would make this easy so I coded a TableModel that assumed JDBC 2.0 support.
    I realized the 7.3.4 driver was not 2.0 compliant when I recieved an AbstractException when calling ResultSet.last()
    I thought this would be no problem so I looked for a Oracle JDBC 2.0 Compliant driver that would support a 7.3.4 database.
    I was happy to see that all JDBC thin clients claim to be backwards compatible. I downloaded JDBC 9.0.1 since I've upgraded to JSDK 1.3.1.
    When trying to establish a connection I recieve the "IOException: End of TNS Data Channel."
    I have tried all other JDBC drivers between 9.0.1 and 7.3.4 and the only driver that connects is the 7.3.4.
    If anyone has any insight that could help me, please let me know. Thank you.
    Jason Johnston
    [email protected]

    Is the class you have given is complete code or is it partical code?
    Are you using any JDBC calls in your actual program ?
    How big is this file /Temp/kongx.txt?
    Please provide us the above details ?
    Regards
    Ravi

  • End of TNS Data Channel

    I still haven't seen a fix or a work around for the "End of TNS Data Channel" error.
    (This is the problem trying to connect to a 7.3.x server using 8.x Thin JDBC drivers. For further details, search this forum for "End of TNS Data Channel" to read many related posts dating as far back as May 1999.

    Hi,
    I had arrived very late to this forum and I don't know if now
    there is a solution or workaround related with "End of TNS Data
    Channel".
    I'm trying to connect a HttpServlet with an Oracle 7.3.4 server
    and I have the specific need to use JDBC 2.0 driver because I
    must use it's table "scrolling" facilities, but allways I get
    the same SQL Exception.
    Please send me any suggestion about this topic to my email
    account: [email protected]
    Thank you very much in advance.
    Jorge Ortiz

  • What does "End of TNS data channel" mean?

    DB: Oracle 8
    OS: WinNT
    I am trying to add a new connection via the connection manager. I
    have tested my connection to the DB using SQL NET and know that
    TNS names are correct. However when I enter all details in the
    connection manager and click "Test Connection" I get the
    following error message.
    "End of TNS data channel"
    Anyone have any ideas,
    Thanks,
    Andy Shiels
    null

    JDeveloper Team (guest) wrote:
    : Andy,
    : When you create the connection in JDeveloper, what method are
    you
    : using? Did you choose Existing TNS Names or Named Host?
    : If you are using Existing TNS Names, then the alias must use
    the
    : SID=sidname rather than the SERVICE NAME= specifier.
    I have used all possible configurations using the sid, and
    service name. I also succesfully used one of ODBC connections,
    however the Connection 'wizard' wouldn't add it to its Connection
    list.
    : Specifically what version of the database you are connecting to
    : and what OS it is running on may also be the source of the
    : problem.
    Server Windows NT Server NT v.4
    Client Windows NT Workstation v.4 sp 4
    Oracle Version 8.0.5. (purchased about 1 week ago)
    If you are trying to connect to an 8.0.5 DB on LINUX,
    : there is a patch you need to apply to the database so JDBC can
    : connect to it. This is also true for some 8.0.3 versions.
    : I would try editing your connection to use the Named Host
    method
    : and see if that works. JDeveloper uses JDBC to connect, so
    : testing with SQL*Net is not always a sure-bet that the JDBC
    : connection will work.
    : L
    : Andy Shiels (guest) wrote:
    : : DB: Oracle 8
    : : OS: WinNT
    : : I am trying to add a new connection via the connection
    manager.
    : I
    : : have tested my connection to the DB using SQL NET and know
    that
    : : TNS names are correct. However when I enter all details in
    the
    : : connection manager and click "Test Connection" I get the
    : : following error message.
    : : "End of TNS data channel"
    : : Anyone have any ideas,
    : : Thanks,
    : : Andy Shiels
    null

  • Ioexception: end of tns data channel

    I'm very interested in this issue, too:
    just because it looks very similar, I post my issue, too
    please, if you find out the fixing, don't hesitate to contact me
    regards
    SCENARIO:
    - oracle 9i RAC installation on linux RedHat
    - java swing application using Jsdk1.4.2_06 deployed on HP machine, both resident on the same LAN.
    the application cycle on polling on another windows machine via FTP and save records on oracle
    - oracle JDBC driver used : ojdbc14-10-1-0-1-0.jar
    after a quite long period the application is running
    we are experiencing the following exception :
    Stack: java.sql.SQLException: IOException: End of TNS data channel
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:418)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    the oracle client memory usage keep increasing, from 80M up to 200, the typically the exception raise up
    does anybody have any clue?
    thanks in advance
    vl

    Yes, it definitely has to do with the language setting, and I do not have a database with a Chinese character set at my disposal.
    No, by TAR I meant to officially contact the support that will take care of your problem, if you still need this, if you have a support contract. To have an idea on what TARS are, you can take a look at the metalink site (metalink.oracle.com) under the TARs tab.
    Regards:
    Igor

  • XSQL : End of TNS data channel?

    Hi, I'm having trouble using the Oracle xsql servlet for a mission-critical application. Using a complicated query which has several cursors, I get the following error:
    oracle.xml.sql.OracleXMLSQLException: Io exception: End of TNS data channel
    I have the servlet deployed to Apache Tomcat 3.2 (I have also tried 3.1, with the same results). This error seems to only occur when the query selects from certain tables. However, the same query works fine in SQL*Plus or any similar tool.
    Any idea what might be causing this? If not, can you point me to someone who might have an idea?
    This seems to be a recent problem. Some queries that worked before don't work anymore. Changes that have been made since then are that the database's Net8 service was removed and re-setup, and also that all the tables and indexes in the schema have been re-analyzed.

    Whenever a problem appears to be in the XSQL Servlet -- specifically those that relate to translating SQL statements into XML -- here's a tip to help diagnose the problem.
    The XSQL action handler for the <xsql:query> action directly makes use of the Oracle XML SQL Utility to do the real work. The XSQL Pages system pools database connections and makes using the XSU easier because most common tasks can be done with templates, but when a problem arises in this area it is likely an issue with the underlying XML SQL Utility.
    To help see whether this is in fact the case, try the same query that is causing problems using the XML SQL Utility's command line OracleXML utility.
    $ OracleXML getXML -u username/password "SELECT ... "
    If you are getting TNS errors, likely the server is generating server-side trace files that might provide additional details on what the issue might be.

  • [End of TNS data channel] with Java SDO API (JDBC thin 9.0.1.2.1)

    Hello folks,
    Environment:
    Win2K, 1.2GHz Intel, 500MB RAM, Oracle 9i, Oracle JDBC Thin (9.0.1.2.1), JDK1.3
    Our data in the DB is 2-D. It consists of SDO LineString geometries. We use SRID = 8307.
    I run into this problem with Java SDO API. I got this exception: "Io exception: End of TNS data channel"
    when I try to execute query that uses the SDO_RELATE function:
    SELECT e.shape
    FROM edge e
    WHERE SDO_RELATE(e.shape,
    mdsys.sdo_geometry( 2003, 8307, NULL,
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(-125.8,49.9,-125.6,49.9,-125.6,50.0,-125.8,50.0,-125.8,49.9) ),
    'mask=ANYINTERACT querytype=WINDOW') = 'TRUE'
    If I use SDO_FILTER instead of SDO_RELATE it works!
    Here is how I execute the query in Java:
    public int executeSpatialQuery(OracleConnection conn, String spatialQuery) throws Exception
    int numberOfGeometries = 0;
    conn.setDefaultRowPrefetch(1000);
    Statement ps = conn.createStatement();
    ResultSet rs = ps.executeQuery(spatialQuery);
    while (rs.next()) {
    numberOfGeometries++;
    rs.close();
    ps.close();
    return numberOfGeometries;
    Note: I was playing with the "conn.setDefaultRowPrefetch(n)" method hoping that there might be something to do with that but with no success.
    Any help will be much appreciated. Thank you.
    GKK

    Hello folks,
    Here is what I've done:
    1. Created a "mini" Realtional model (modelB) which mimics exactly our existing "big" Realtional model (modelA). The tables, sequences, indices, etc. in modelB have been created in exactly the same fashion we'd created the corresponding entities in modelA. The only difference is that I preceeded the entities in our test modelB with "TEST_".
    2. Populated the modelB with 1298 Lakes (3993 edges in total) in exatly the same fashion we use to populate our modelA - using a Data Loader based on Java SDO API.
    3. Indexed the test modelB in exactly the same fashion as modelA.
    4. Ran the query:
    SELECT e.shape FROM test_edge e WHERE SDO_RELATE(e.shape,
    mdsys.sdo_geometry(
    2003,
    8307,
    NULL,
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(
    -123.80833332065798,48.58352678668598,
    -123.80833332065798,48.675352618459506,
    -123.65050767229724,48.675352618459506,
    -123.65050767229724,48.58352678668598,
    -123.80833332065798,48.58352678668598
    ), 'mask=ANYINTERACT querytype=WINDOW'
    ) = 'TRUE'
    in SQL*PLUS and it worked fine (retrieved a bunch of geometries)!
    Ran the same query in the Daniel Geringer's OraTest utility and it worked this time and returned:
    TIME : 1.222 seconds, TOTAL FETCH TIME 267 ROWS
    Ran the query with our JCS Query Plug-In and it worked fine!
    ANALYSIS
    ========
    ModelA
    ======
    - 59652 Lakes and 178764 edges
    - it's properly indexed
    - its SDO layers and geometries are valid
    - when we count the number of related SDO geometries for this query we get:
    SQL> SELECT count(e.shape) FROM edge e WHERE SDO_RELATE(e.shape,
    2 mdsys.sdo_geometry(
    3 2003,
    4 8307,
    5 NULL,
    6 mdsys.sdo_elem_info_array(1,1003,1),
    7 mdsys.sdo_ordinate_array(
    8 -123.80833332065798,48.58352678668598,
    9 -123.80833332065798,48.675352618459506,
    10 -123.65050767229724,48.675352618459506,
    11 -123.65050767229724,48.58352678668598,
    12 -123.80833332065798,48.58352678668598
    13 )
    14 ), 'mask=ANYINTERACT querytype=WINDOW'
    15 ) = 'TRUE';
    COUNT(E.SHAPE)
    267
    - when we run the following query via the Java SDO API:
    SELECT e.shape FROM edge e WHERE SDO_RELATE(e.shape,
    mdsys.sdo_geometry(
    2003,
    8307,
    NULL,
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(
    -123.80833332065798,48.58352678668598,
    -123.80833332065798,48.675352618459506,
    -123.65050767229724,48.675352618459506,
    -123.65050767229724,48.58352678668598,
    -123.80833332065798,48.58352678668598
    ), 'mask=ANYINTERACT querytype=WINDOW'
    ) = 'TRUE'
    it FAILS with: "TNS end of communaction channel"!
    ModelB
    ======
    - 1298 Lakes and 3993 edges
    - it's properly indexed
    - its SDO layers and geometries are valid
    - when we count the number of related SDO geometries for this query we get:
    SQL> SELECT count(e.shape) FROM test_edge e WHERE SDO_RELATE(e.shape,
    2 mdsys.sdo_geometry(
    3 2003,
    4 8307,
    5 NULL,
    6 mdsys.sdo_elem_info_array(1,1003,1),
    7 mdsys.sdo_ordinate_array(
    8 -123.80833332065798,48.58352678668598,
    9 -123.80833332065798,48.675352618459506,
    10 -123.65050767229724,48.675352618459506,
    11 -123.65050767229724,48.58352678668598,
    12 -123.80833332065798,48.58352678668598
    13 )
    14 ), 'mask=ANYINTERACT querytype=WINDOW'
    15 ) = 'TRUE';
    COUNT(E.SHAPE)
    267
    - when we run the following query via the Java SDO API:
    SELECT e.shape FROM test_edge e WHERE SDO_RELATE(e.shape,
    mdsys.sdo_geometry(
    2003,
    8307,
    NULL,
    mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(
    -123.80833332065798,48.58352678668598,
    -123.80833332065798,48.675352618459506,
    -123.65050767229724,48.675352618459506,
    -123.65050767229724,48.58352678668598,
    -123.80833332065798,48.58352678668598
    ), 'mask=ANYINTERACT querytype=WINDOW'
    ) = 'TRUE'
    it SUCCESSFULLY returns the related geometries!
    So, what can we make of all this? We know that there exists a model for which the SDO_RELATE works via the Java SDO API. This model is a subset (w.r.t. the data set) of our original model in which we detected the "TNS end of communication channel problem". The environment we used for these tests is exactly the same: JDBC Thin driver (version 9.0.1.0.0), Oracle9i Enterprise Edition (Release 9.0.1.2.1 - Production).
    One can think that the problem lies in the Oracle Object-Realational or Oracle Spatial but the fact that we can successfully execute the same SDO_RELATE queries in SQL*PLUS rejects this possibility. Perhaps it depends on the amount of data passed to the JDBC driver and the fashion in which it handles it! In our test above we had RELATED 267 geometries. We know that there exist SDO_RELATE queries that run successfully with modelA, but those are queries which ONLY retrieve an EMPTY set of RELATED geometries. In other words we don't get the "TNS end of communication channel" because NO data gets fetched from the server to the client! As soon as we find a SDO_RELATE query which retrieves (RELATES) at least 1 geometry that runs successfully in SQL*PLUS and run it via the Java SDO API - it FAILS! This means that no matter what volume of data is fetched from the server-JDBCThin-SDOAPI-client as long as there is ANY data, the query FAILS in modelA.
    Perhaps something internally in the Oracle 9i Server happens that prevent the data being fetch to the JDBCThin for that particular modelA. But what that might be?
    Very peculiar problem!
    Regards,
    Georgi

  • End of TNS data Channel error

    I am running oracle 8i v 8.0.3.0.6 on Netware. When trying to connect to an existing TNS Name(which works with all other item) using the JDBC thin client I receive the 'End of TNS data Channel' error.
    Can anyone give me some direction as to what I can do.
    Thanks;
    John
    [email protected]

    If you are using the oracle thin driver, make sure you get the latest driver
    from oracle.
    Firewall could be an issue here, so try to make sure you set the
    TestConnsOnReserve to true in the connection pool props.
    hth
    sree
    "sarathy" <[email protected]> wrote in message
    news:3c30473f$[email protected]..
    Hi,
    We are using the Weblogic application server for our web-based applications.
    We defined a connection pool in it, which creates 2 connections to an Oracle
    database i.e initial capacity 2 and maximum capacity 4. But every one in a
    while when requesting data, I get the following error : SQLException : End
    of TNS data channel.I am not able to understand weather this is a networking
    problem or database problem.If anyone has any idea please help,b'coz it is
    very urgent.

  • Java servlet - Io exception: End of TNS data channel

    Okay, I'm trying to upload a picture through a servlet into a database. I've tested the my method PictureDAO.storePicture(File file) localy and it works fine. In the servlet I create the uploaded picture in a directory on the server, and this works fine too. When I call the same method as I've already tested, I get the following exception:
    Io exception: End of TNS data channel
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
    oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2061)
    oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
    oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
    oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    rockIt.db.PictureDAO.storePicture(PictureDAO.java:79)
    this is line 79:      if( INSERT_PICTURE.executeUpdate() > 0 ) {
           return true;
    and this is the pstm:
    INSERT_PICTURE = connection.prepareStatement("INSERT INTO pictures " +
                                                 "(picture, fileName, approved) " +
                                                 "VALUES ( ?, ?, ? )");Since I've tested this method locally and know that it works, I just don't understand why it doesn't work on the server. We are using Oracle9i and Apache Tomcat/5.5.4 on my school. Could this be the problem? Anyone know what to do?
    thanks

    This will not compile, but I suspect if you change the way you're using SQL to look more
    like this, it will solve your problem. It's generally a bad idea to have Statements with a
    lifeline greater than a method.
    private static final String INSERT_PICTURE =
        "INSERT INTO pictures " +
        "(picture, fileName, approved) " +
        "VALUES ( ?, ?, ? )");
    public void insertPicture() {
        Connection connection = null;
        PreparedStatement statement = null;
        try {
            connection = XXXXX.getConnection();
            statement =
                connection.prepareStatement(INSERT_PICTURE);
            statement.executeUpdate();
        } finally {
            statement.close();
            connection.close();
    }

  • Getting "End of TNS Data Channel" Errors

    Hi,
    I am using Migration WorkBench to migrate data from SQL Server 2000 to Oracle 8.1.7. I always get the "End of TNS data channel" when I try to migrate tables and data.
    The data repository (in Migration WorkBench) is also a Oracle 8.1.7 database.
    It works fine if I only migrate the schema without the data. The source schema contains many tables with LOB type columns (BLOB or CLOB). I read in some other forums that there are issues between thin JDBC drivers and BLOB/CLOB column datatypes.
    Is it possible to use Migration WorkBench with OCI drivers. Is there any way we can do this ?
    Any other things that I can check in my set up ?
    Thanks in advance.
    Regards
    Mandar

    I am using version
    9.2.0.1.2 (Production)
    Build 20020910
    Microsoft SQL Server 2000 Plug-In, Release 9.2.0.1.3 Production.
    I cannot use the SQL Loader scripts as the source database contains many tables with BLOB or CLOB data and this is not supported by using SQL loader option.
    Thanks
    Mandar

  • Io exception: End of TNS data channel when Indexing

    I am trying to create an index on a column which contains rules to be used with CTXRULE. I would also like to improve the wildcard search, so that searching for
    "depletes" would be matched up with the rule "%deplete%". I am also using a blank stopwords list as the rules are quite precise.
    For that, I am creating the following preferences:
    -- create new pref
    exec Ctx_Ddl.Create_Preference('wildcard_pref', 'BASIC_WORDLIST');
    -- allows better %abc%
    exec ctx_ddl.set_attribute('wildcard_pref','SUBSTRING_INDEX', 'TRUE');
    or
    -- allows better abc%
    exec ctx_ddl.set_attribute('wildcard_pref','prefix_index', 'YES');
    exec ctx_ddl.set_attribute('wildcard_pref','PREFIX_MIN_LENGTH', 3);
    exec ctx_ddl.set_attribute('wildcard_pref','PREFIX_MAX_LENGTH', 10);
    -- drop existing stoplist pref
    exec ctx_ddl.drop_stoplist('stoplist_pref');
    -- create new stoplist pref
    exec ctx_ddl.create_stoplist('stoplist_pref');
    create index testrule_IDX on test_table(rules)
    indextype is ctxsys.CTXRULE
    parameters ('Wordlist wildcard_pref Stoplist stoplist_pref');
    The above script works fine until it comes to creating the index, upon which I get the following error (line numbers different):
    Error starting at line 11 in command:
    create index testrule_IDX on test_table(rules)
    indextype is ctxsys.CTXRULE
    parameters ('Wordlist wildcard_pref Stoplist stoplist_pref')
    Error at Command Line:11 Column:0
    Error report:
    SQL Error: Io exception: End of TNS data channel
    However, if I don't include the additional attributes, the index gets created without any issues.
    I am using Oracle 10.2.0.3 on UNIX, and running the code through SQL developer.
    Any help would be greatly appreciated.
    Thanks.

    According to the documentation wildcards and prefix and substring indexes are not supported with ctxrule. If you try to use these things, the index may not get created. If you are creating your index from SQL*Plus, you should get a specific error message telling you that or you might get more information from ctx_user_index_errors. If you try to use a wildcard in your rules, it seems to cause the whole query to return no rows. However, if you user a lexer with index_stems, it seems to return all words that have the same stem word as the search word in the rules. Please see the demonstration below with and without the index_stems.
    SCOTT@orcl_11g> CREATE TABLE test_table
      2  (rulesid     NUMBER PRIMARY KEY,
      3   category     VARCHAR2(30),
      4   rules     VARCHAR2(30))
      5  /
    Table created.
    SCOTT@orcl_11g> INSERT INTO test_table VALUES (1, 'cat1', 'charge')
      2  /
    1 row created.
    SCOTT@orcl_11g> INSERT INTO test_table VALUES (2, 'cat2', 'deplete')
      2  /
    1 row created.
    SCOTT@orcl_11g> create index testrule_IDX on test_table(rules)
      2  indextype is ctxsys.CTXRULE
      3  /
    Index created.
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'charge') > 0
      2  /
       RULESID CATEGORY                       RULES
             1 cat1                           charge
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'charged') > 0
      2  /
    no rows selected
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'charges') > 0
      2  /
    no rows selected
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'charging') > 0
      2  /
    no rows selected
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'recharge') > 0
      2  /
    no rows selected
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'depletes') > 0
      2  /
    no rows selected
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'other') > 0
      2  /
    no rows selected
    SCOTT@orcl_11g> drop index testrule_idx
      2  /
    Index dropped.
    SCOTT@orcl_11g> BEGIN
      2    ctx_ddl.create_preference('mo_lexer','BASIC_LEXER');
      3    ctx_ddl.set_attribute('mo_lexer', 'INDEX_STEMS', 'ENGLISH');
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11g> create index testrule_IDX on test_table(rules)
      2  indextype is ctxsys.CTXRULE
      3  parameters ('lexer mo_lexer')
      4  /
    Index created.
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'charge') > 0
      2  /
       RULESID CATEGORY                       RULES
             1 cat1                           charge
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'charged') > 0
      2  /
       RULESID CATEGORY                       RULES
             1 cat1                           charge
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'charges') > 0
      2  /
       RULESID CATEGORY                       RULES
             1 cat1                           charge
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'charging') > 0
      2  /
       RULESID CATEGORY                       RULES
             1 cat1                           charge
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'recharge') > 0
      2  /
    no rows selected
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'depletes') > 0
      2  /
       RULESID CATEGORY                       RULES
             2 cat2                           deplete
    SCOTT@orcl_11g> SELECT * FROM test_table WHERE MATCHES (rules, 'other') > 0
      2  /
    no rows selected
    SCOTT@orcl_11g> spool off

  • [HELP] End of TNS data channel

    [please CC: to me when you reply if possible]
    i'm using
    solaris 2.7, jdk 1.2.2, oracle 8i 8.1.6,
    classes12.zip jdbc driver (the latest one for 8.1.6 that i downloaded a week ago)
    when i recompiled & ran my used-to-be working code (with just newer jdbc driver & jdk), in run time, it kept giving me:
    java.sql.SQLException: End of TNS datachannel
    i'm positive that i'm using correct login/password/parameters for the oracle thin driver since the code was working fine.
    any help would be appreciated.

    JDBC Development Team said:
    "I've never seen this before. Can you post a stack trace? Also, do you have small (tiny) test case?"
    Do a search in this forum for "End of TNS Data Channel" and you should see at least 4 threads on this topic. The posts date back to May 1999. Shame on you if you haven't seen it before. Oracle hasn't issued a fix.
    Here's my version of it:
    Server: Oracle 8.1.5.x on RedHat Linux 6.x
    Client: JDK 1.2.1, JDBC Thin Drivers 8.1.5
    Result: Works
    Server: Oracle 7.3.4.x on Netware 4.x
    Client: JDK 1.2.1, JDBC Thin Drivers 8.1.5
    Result: Doesn't work
    Server: Oracle 7.3.4.x on Netware 4.x
    Client: JDK 1.2.1, JDBC Drivers 7.3.x
    Result: Doesn't work
    Server: Oracle 7.3.4.x on Netware 4.x
    Client: JDK 1.2.1, JDBC Drivers 8.1.6.x
    Result: Doesn't work
    When it doesn;t work it gives an End of TNS Data Channel error followed by DBError.java:114, DBError.java:156, DBError.java:269, OracleConnection.java:210, and other errors.
    null

  • ERROR : End of TNS data channel

    java.sql.SQLException: Io exception: End of TNS data channel
    HI,
    We have a websphere application and the backend is oracle 8.1.7 on NT.
    We use JDBC for connectivity to Oracle.
    We are coming across the above mentioned error for some of the transactions.
    Also since no ORA- number is returned i'm unable to get to the cause of the error.
    If anyone of u has come across a similar situation then pl let me know the cause of the error and the solution to it.
    Thanks,
    Ravi

    ElectroD,
    Try using "LEFT OUTER JOIN" instead of LEFT JOIN alone. It might get through.
    Thanks,
    Ishan

Maybe you are looking for