>>I am able to connect to same schema through sql plus without any issues.
There's got to be something different. Are you sure it's not a different copy of the db?
Main Topics
Browse All TopicsHi,
I am running follwoing java program to select, insert values into oracle 10g dfatabase table through RAD workspace.
import java.sql.*;
class dbtest {
public static void main(String args[]) throws
ClassNotFoundException, SQLException {
Class.forName("oracle.jdbc
// or you can use:
// DriverManager.registerDriv
Connection conn = DriverManager.getConnectio
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select * from stud");
while(rset.next())
{
System.out.println(rset.ge
System.out.println(rset.ge
}
rset.close();
stmt.close();
conn.close();
}
}
It gives error message like invalid user name and password. I am able to connect to same schema through sql plus without any issues. Please advise. Any links, ideas, resources highly appreciated. Thanks in advance
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
That is fine, but please answer the specific questions above.
Oracle JDBC service name syntax requires a / in the JDBC URL nowadays. Your JDBC URL is using SID syntax (which is ok, but I am just pointing out the difference), yet your SQL Developer connection is using service syntax. Please try the SID option, or use sqlplus.
sqlplus user/pass@orcl
Again, how many databases are on your system?
I only have one database running in my laptop with xp OS. Sqlplus i am not connecting through command prompt but from
start-->all programs--->oracle oracle 10g--->sqlplus etc as in screnshot.
How shall i change following statement to include service name instead of SID
Connection conn = DriverManager.getConnectio
Please advise
I don't understand why it is so difficult for you to follow my explicit directions above?
The reason I am asking you to connect with the _explicit_ syntax is to force the use of the TNS alias, if it exists. You've also not provided the output to the info asked for in: http:#24774308
So, one last time, please try:
1) sqlplus deliverytest8/passwordxxx@
2) Also show output of: lsnrctl services
Business Accounts
Answer for Membership
by: mrjoltcolaPosted on 2009-07-03 at 13:34:52ID: 24774292
Please show how you connect via sqlplus.
sqlplus deliverytest7/dbpasword