This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC 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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "this is jdbc error not oracle error " Watch "this is jdbc error not oracle error " New topic
Author

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

thank's

aamir
Paul Sturrock
Bartender

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

<HTML>
<%@ page import="java.sql.*,java.util.*" %>
<% String url="jdbcracle:thin:@10.0.0.237:1521:aamir";
Connection con;
Statement stmt;
ResultSet rs;
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
con = DriverManager.getConnection(url,"muhammad","mfa786");
stmt=con.createStatement();
%>
<%

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


***********
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

thank's

aamir
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3703
    
    5

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.


My Blog: Down Home Country Coding with Scott Selikoff
Duke Astron
Greenhorn

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
url="jdbcracle:thin:@10.0.0.237:1521:aamir";


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?
 
 
subject: this is jdbc error not oracle error
 
Similar Threads
how start the tnslistener / how edit connection string
jdbc problems
give me step how i inport JasperReport i my sun java studio creater
Invalid byte 1 of 1-byte UTF-8 sequence
how call irepot directly not use xml code