JDBC:ORA-03115: unsupported network datatype or representation


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 (rs.next())
                                          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

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
M_SYEDAuthor Commented:

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.............
M_SYEDAuthor Commented:

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

Artysystem administratorCommented:
Thank you, sometimes the prombem becomes easier for yourself when you ask someone :-)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.