File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes this is jdbc error not oracle error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "this is jdbc error not oracle error " Watch "this is jdbc error not oracle error " New topic

this is jdbc error not oracle error

muhammad fahim
Ranch Hand

Joined: Dec 17, 2006
Posts: 45
sir i post my problem but they reply me it java problem not oracle problem

*** oracle reply**********
You metioned that you use
jdbcracle:thin:@<ip or hostname of machine where your db is installed>: 1521:aamir , description to connect the remote database. So, I think it's not related to your tnsname.ora problem. It's only java oracle thin connection string. Please check this string, make sure the ip and database service name is right.

one more thing, use sqlplus check your tnsname.ora, if ok, then try to check jdbc and make sure the jdbc driver match to oracle server.


sir please give me idea how i show my oracle data in clinet browser


Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

We don't have any visibility of the actual problem, only the response you got when you asked it somewhere else. Can you explain your problem?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
muhammad fahim
Ranch Hand

Joined: Dec 17, 2006
Posts: 45
sir this is my jsp code this page give me right result in my browser
when am using work group not internet or local network

<%@ page import="java.sql.*,java.util.*" %>
<% String url="jdbcracle:thin:@";
Connection con;
Statement stmt;
ResultSet rs;
con = DriverManager.getConnection(url,"muhammad","mfa786");

<select name="ltpid">
rs= stmt.executeQuery("select accid,title from chartofacc");
while ({
<option Value=<%=rs.getString(1)%>> <%=rs.getString(2) %> </option>
catch(Exception e){}

but when i test this page in client browser then browser give me this error

Database Log In Failed
TNS could not resolve service name

Verify that the TNS name in the connectstring entry of the DAD for this URL is valid.

i check my tnsname.ora
my sql run fine

please give me idea how i run my page in client browser


Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

This is an Oracle issue. TNS is a Oracle-specific protocol and configuring the listener has nothing to do with JDBC.

Please do not duplicate post.

[OCA 8 Book] [Blog]
Duke Astron

Joined: Jan 26, 2007
Posts: 4
when you say that it works from your PC but not from a client's PC, are you sure your accessing that JSP page from the same application server?

maybe you have a development environment where you have your own app server and since you already have everything setup up properly there, you don't encounter problems. try to access that JSP page from your own PC and make sure that you're referencing the same application server that the client is using.
Jeevan Philip
Ranch Hand

Joined: Nov 17, 2006
Posts: 41

Are you able to access this ip address from client network? Is there a firewall in between which might be blockng the IP or port or both?
I agree. Here's the link:
subject: this is jdbc error not oracle error
It's not a secret anymore!