JDBC:ORA-03115: unsupported network datatype or representation

Posted on 2006-04-12
Last Modified: 2008-02-07

I am using a simple jdbc program to retireve the primary key from the database. but I am getting the error ORA-03115: unsupported network datatype or representation .
The relevant code is:

javax.naming.Context initialContext = new javax.naming.InitialContext();
                  DataSource ds = (DataSource)initialContext.lookup("RoCDS");
                  Connection con = ds.getConnection();
                  System.out.println("email recvd in dao: ***"+email);
                  System.out.println("password recvd in dao: ***"+password);
                  // End of code from salvi
                  //String userpkStr = null;
                  int userpk = 0;
                  long longuserPK = 0L;
                  //Integer userpkInt = null;
                        String q = "SELECT party_id FROM party WHERE user_name = ? AND password = ? ";
                                    //+ " FROM party WHERE user_name = " + email + " AND password = " + password ;
                        PreparedStatement s = con.prepareStatement(q);
                              s.setString(1, email);
                              s.setString(1, password);
                              System.out.println("Beofre querying ***");
                              ResultSet rs = s.executeQuery(q);
                              System.out.println("After querying ***");
                                    if (
                                          longuserPK = rs.getLong(1);
                                          System.out.println("PK retireved ***"+longuserPK);

                                          // Must remove this later on when we change PK from int to long
                            //userpkInt = new Integer(userpkStr);
                                          userpk = (int)longuserPK; //userpkInt.intValue();
                                          throw new NoSuchObjectException("No such user: " + email);
                                    return userpk;
                              } finally { rs.close(); }
                        } finally { s.close(); }
                  } finally { con.close(); }

The application server being used is weblogic 8.1, the Oracle dataase version beinfg ued is 9.2.
The dbURL and driver details are as set in the weblogic console are:

URL: jdbc:oracle:thin:@
Driver class name: oracle.jdbc.xa.client.OracleXADataSource

This is a very urgent problem, pls post ur comments.

Best Regards

Question by:M_SYED
    LVL 27

    Accepted Solution

    Try to add ';' at the end of SELECT:

    String q = "SELECT party_id FROM party WHERE user_name = ? AND password = ? ;";

    Author Comment


    Nopius: I tried your suggestionbut it didnt help.
    I am not trying to access any blob datatype here, the datatype of the attribute I am trying to access is Number(38).

    My db is Oracle 9.2.07

    Please help.............

    Author Comment


    I have solved it.

    The problem line was:
    ResultSet rs = s.executeQuery(q);

    Solved it by replacing it with
    ResultSet rs = s.executeQuery();

    Thanks for responding.

    I am gona award you the points for responding....... :- )

    Best Regards

    LVL 27

    Expert Comment

    Thank you, sometimes the prombem becomes easier for yourself when you ask someone :-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
    The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now