Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

this is jdbc error not oracle error

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
muhammad fahim
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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="jdbc:oracle: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
 
author
Posts: 4281
34
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

url="jdbc:oracle: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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic