GetConnection(username,password)
Hi,
We are porting a web application what use to run on Oracle 9is to Weblogic 8.1.
This application uses Database users to authenticate users and to control access
rights. On 9is they did not make use of any database pools, connections were created
and destroyed on the fly as needed. Is there any way I can make use of pooled
connections to do the same think, i.e. somehow make the poled connection act in
the role of the logged in user. I notice the DataSource class has a getConnection()
that take a user name and password as parameters, but I have not been able to
get this to work.
Lomeus Cloete wrote:
Thanks. I know having all these database uses is not a good idea, but I can not
change this; You won't believe the amount of company politics involved with this.
All I am looking for is a way to make the application work as is with out making
a new database connection every time a user logs on.You can look at our dynamic pool API. You can make, destroy, redefine and recreate
a pool in application code at runtime. You can also have as many pools, all to the same
DBMS as different users, as you want, perhaps each with one connection, the joe pool, the
lomeus pool etc. Also, look into the oracle-specific JDBC calls that change the effective
user ID of a running connection. That may offer a solution...
Joe
>
"Dhrubo" <[email protected]> wrote:
I am afraid u cant do that the user name and password u use in the getConnection
method are
that of database user used to connect to the database and not yr application
users...
so as u can understand its not prudent to create so many user in the
database
... i.e. application user
"Lomeus Cloete" <[email protected]> wrote:
Hi,
We are porting a web application what use to run on Oracle 9is to Weblogic
8.1.
This application uses Database users to authenticate users and to control
access
rights. On 9is they did not make use of any database pools, connections
were created
and destroyed on the fly as needed. Is there any way I can make useof
pooled
connections to do the same think, i.e. somehow make the poled connection
act in
the role of the logged in user. I notice the DataSource class has agetConnection()
that take a user name and password as parameters, but I have not been
able to
get this to work.
Similar Messages
-
Datasource.getConnection(username, password)
I was able to setup the bookstore example in the Webservices tutorial. In this example they make use of a JDBC connection, using JNDI contexts.
I am using Tomcat 4.1.18 as Web container and I have a configuration file with the JDBC parameters. The problem is that username and password are included in this xml file. I want to leave these out and use the getConnection(username, password) method instead.
When I do this I get an UnsupportedException. The stacktrace is mentioning something about PoolingDataSource. I am missing something or is it just not possible using this method in this configuration??
java.lang.UnsupportedOperationException
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSo
urce.java:125)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:329)
at database.BookDBAO.<init>(Unknown Source)
at listeners.ContextListener.contextInitialized(Unknown Source)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3269)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
598)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:821)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDe
ployer.java:529)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav
a:228)
...The getConnection(username, password) method in apache DBCP (Data Base Connection Pool) implementation always returns a java.lang.UnsupportedOperationException. In fact this is the only thing it does.
You must use the getConection() method instead.
If you use a framework that calls the getConnection(username, password)
method and you don�t have any way of changing that call try to compile yourself the tomcat dbcp jar file changing the method code to:
public Connection getConnection(String uname, String passwd)
throws SQLException
//OLD CODE: throw new UnsupportedOperationException();
return getConnection();
So it works in the same way that getConnection(); -
Problems setting up username & password for SQL
Due to the outstanding advice I recieved from this excellent forum, I have managed to overcome my first problem with declaring a new Class.
This leads me to request help with my next biggest problem:
Setting up a user GUI that takes a "username" & "password" that will be used to access a password protected database.
I am a simple bloke, with simple thought processes, so please, go easy on me...
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class DBQuery1 {
String username = "" , password = "";
public static void main(String[] arguments) {
PassDB UPass = new PassDB();
String data = "jdbc:odbc:JavaTestDataBase";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection(data, "" + username, "" + password);
Statement st = conn.createStatement();
ResultSet rec = st.executeQuery(
"SELECT Title, ContactID, First, Last, Dear FROM Contacts "
+ "WHERE (Title='Mr') ORDER BY ContactID");
/* ResultSet rec2 = st.executeQuery(
"SELECT Subject, ContactID FROM Calls "
+ "WHERE (Subject Is Not Null) ORDER BY ContactID");
System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
while(rec.next()) {
System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
st.close();
catch (SQLException s) {
System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
catch (Exception e) {
System.out.println("Error: " + e.toString() + e.getMessage());
class PassDB extends javax.swing.JFrame implements ActionListener {
String username = "", password = "";
JTextField uname = new JTextField(10);
JTextField pword = new JTextField(10);
// JPasswordField pword = new JTextField(10);
PassDB() {
super("duBe's database logon");
setSize(220, 160);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JPanel pane = new JPanel();
JLabel unameLabel = new JLabel ("Username: ");
JLabel pwordLabel = new JLabel ("Password: ");
JButton submit = new JButton("OK");
submit.addActionListener(this);
pane.add(unameLabel);
pane.add(uname);
pane.add(pwordLabel);
pane.add(pword);
pane.add(submit);
setContentPane(pane);
setVisible(true);
public void actionPerformed(ActionEvent evt) {
PassDB clicked = (PassDB)evt.getSource();
username = uname.getText();
password = pword.getText();
This code generates two errors, stating:
C:\Java_progs>javac DBQuery1.java
DBQuery1.java:14: non-static variable username cannot be referenced from a static context
Connection conn = DriverManager.getConnection(data, "" +
username, "" + password);
^
DBQuery1.java:14: non-static variable password cannot be referenced from a static context
Connection conn = DriverManager.getConnection(data, "" +
username, "" + password);
^
2 errors*****************************
The code works when I remove the reference to the variables "username" & "password" in Connection "conn" call & replace them with the actual username & password, but this is not exactly what I was after. I was hoping to make the program responsive to each individual user, not set in code.
I also would like to make the program pause after the call in "main" to "PassDB" to wait for "PassDB" to exit before continuing.
I would also like to make "PassDB" destroy itself after the "OK" button is pressed & the "username" & "password" set.
If that isn't enough for you, I would really like the program to search 2 different database tables, return their values & compare them to be sure that they are the same.
When I try & search 2 different tables, as in:
ResultSet rec = st.executeQuery(
"SELECT Title, ContactID, First, Last, Dear FROM Contacts "
+ "WHERE (Title='Mr') ORDER BY ContactID");
ResultSet rec2 = st.executeQuery(
"SELECT Subject, ContactID FROM Calls "
+ "WHERE (Subject Is Not Null) ORDER BY ContactID")javac tells me that "ResultSet" is set to null 0
As always, I am extremely appreciative of any assistance you are able to offer.
Kind regards
duBedat
[email protected]This is where I'm at now:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class DBQuery {
static String username = "" ;
static String password = "" ;
public static void main(String[] arguments) {
PassDB UPass = new PassDB();
String data = "jdbc:odbc:JavaTestDataBase";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection(data, "" + DBQuery.username, "" + DBQuery.password);
Statement st = conn.createStatement();
ResultSet rec = st.executeQuery(
"SELECT Title, ContactID, First, Last, Dear FROM Contacts "
+ "WHERE (Title='Mr') ORDER BY ContactID");
/* ResultSet rec2 = st.executeQuery(
"SELECT Subject, ContactID FROM Calls "
+ "WHERE (Subject Is Not Null) ORDER BY ContactID");
System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
while(rec.next()) {
System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
st.close();
catch (SQLException s) {
System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
catch (Exception e) {
System.out.println("Error: " + e.toString() + e.getMessage());
class PassDB extends javax.swing.JFrame implements ActionListener {
static boolean getOut = false;
JTextField uname = new JTextField(10);
JTextField pword = new JTextField(10);
// JPasswordField pword = new JTextField(10);
public PassDB() {
super("duBe's database logon");
setSize(220, 160);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JPanel pane = new JPanel();
JLabel unameLabel = new JLabel ("Username: ");
JLabel pwordLabel = new JLabel ("Password: ");
JButton submit = new JButton("OK");
submit.addActionListener(this);
pane.add(unameLabel);
pane.add(uname);
pane.add(pwordLabel);
pane.add(pword);
pane.add(submit);
setContentPane(pane);
while(getOut == false)
setVisible(true);
public void actionPerformed(ActionEvent evt) {
PassDB clicked = (PassDB)evt.getSource();
DBQuery.username = uname.getText();
DBQuery.password = pword.getText();
getOut = true;
} Any advice is greatly appreciated
duBe -
ERROR: ORA-01017: invalid username/password; logon denied
Hi all
I need your kind help.
I have installed Oracle Audit Vault Server Release 10.2.3.2 in Linux system and collection agent in Windows system. Adding and starting DBAUD collector went fine however adding REDO collector return back errors when executing avorcldb add_collector command as follow
[oracle@avsrv ~]$
[oracle@avsrv ~]$ avorcldb add_collector -srcname orcl -agentname avagent01 -colltype REDO -av Lugaopc:1521:orcl
collector REDO_Collector for source orcl already exists
initializing REDO Collector
ERROR: could not get AV source user connection using jdbc:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
ERROR: ORA-01017: invalid username/password; logon denied
[oracle@avsrv ~]$
Here is the contents of avorcldb.log file
09-09-13 16:58:44 [INFO ] Processing command add_collector
09-09-13 16:58:44 [INFO ] Processing arg -srcname = orcl
09-09-13 16:58:44 [INFO ] Processing arg -agentname = avagent01
09-09-13 16:58:44 [INFO ] Processing arg -colltype = REDO
09-09-13 16:58:44 [INFO ] Processing arg -av = Lugaopc:1521:orcl
09-09-13 16:58:44 [INFO ] Connect info : Lugaopc:1521:orcl
09-09-13 16:58:45 [INFO ] Got AV admin connection using jdbc:oracle:oci:@AVDB
09-09-13 16:58:45 [INFO ] Executing SQL as [ADM@AV] select s.host||':'||a1.num_value||':'||a2.char_value from avsys.av$attrvalue a1, avsys.av$attrvalue a2, avsys.av$source s, avsys.av$attrdef ad1, avsys.av$attrdef ad2 where source_name = :1 and a1.inst_id = s.source_id and a2.inst_id = s.source_id and a1.attr_id = ad1.attr_id and ad1.attr_name = 'PORT' and a2.attr_id = ad2.attr_id and ad2.attr_name = 'DB_SERVICE'
09-09-13 16:58:45 [INFO ] Using bind value orcl
09-09-13 16:58:45 [INFO ] Return value = Lugaopc:1521:orcl
09-09-13 16:58:45 [INFO ] Connect info : Lugaopc:1521:orcl
09-09-13 16:58:45 [INFO ] Executing SQL as [ADM@AV] select to_char(source_id) from avsys.av$source where source_name = :1
09-09-13 16:58:45 [INFO ] Using bind value orcl
09-09-13 16:58:45 [INFO ] Return value = 1
09-09-13 16:58:46 [INFO ] Got source user connection using jdbc:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
09-09-13 16:58:46 [INFO ] Executing SQL as [ADM@AV] select decode(c.status, 1, 'active', 0, 'dropped', null) from avsys.av$collector c, avsys.av$source s where source_name = :1 and collector_name = :2 and c.source_id = s.source_id
09-09-13 16:58:46 [INFO ] Using bind value orcl
09-09-13 16:58:46 [INFO ] Using bind value REDO_Collector
09-09-13 16:58:46 [INFO ] Return value = active
09-09-13 16:58:46 [MESG ] collector REDO_Collector for source orcl already exists
09-09-13 16:58:46 [INFO ] Executing SQL as [ADM@AV] select decode(c.status, 1, 'active', 0, 'dropped', null) from avsys.av$collector c, avsys.av$source s where source_name = :1 and collector_name = :2 and c.source_id = s.source_id
09-09-13 16:58:46 [INFO ] Using bind value orcl
09-09-13 16:58:46 [INFO ] Using bind value REDO_Collector
09-09-13 16:58:46 [INFO ] Return value = active
09-09-13 16:58:46 [MESG ] initializing REDO Collector
09-09-13 16:58:46 [INFO ] Executing SQL as [ADM@AV] select username from avsys.av$source where source_name = :1
09-09-13 16:58:46 [INFO ] Using bind value orcl
09-09-13 16:58:46 [INFO ] Return value = AVSRCUSR1
09-09-13 16:58:46 [INFO ] Executing SQL as [ADM@AV] {? = call avsys.dbms_audit_vault.reset_source_user(?)}
09-09-13 16:58:46 [INFO ] Adding mask for user password
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] select table_name from user_tables where upper(table_name) = upper(:1)
09-09-13 16:58:46 [INFO ] Using bind value STREAMS_HEARTBEAT
09-09-13 16:58:46 [INFO ] Return value = STREAMS_HEARTBEAT
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] drop table streams_heartbeat
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] create table streams_heartbeat( src_dbname varchar2(4000), job_number number, heartbeat_time timestamp)
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] declare dbs_name varchar2(4000); begin select global_name into dbs_name from global_name; insert into streams_heartbeat values (dbs_name, 0, SYSTIMESTAMP); end;
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] create or replace procedure update_heartbeat IS begin update streams_heartbeat set heartbeat_time=(select systimestamp from dual); commit; end;
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] select table_name from user_tables where upper(table_name) = upper(:1)
09-09-13 16:58:46 [INFO ] Using bind value CAPTURE_RULES
09-09-13 16:58:46 [INFO ] Return value = CAPTURE_RULES
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] drop table capture_rules
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] create table capture_rules( rule_name varchar2(50), rule_scope varchar2(6), rule_type varchar2(3), obj_name varchar2(100))
09-09-13 16:58:46 [INFO ] Executing SQL as [ADM@AV] select global_name from global_name
09-09-13 16:58:46 [INFO ] Return value = AVDB.AVSRV
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] select db_link from user_db_links where db_link = :1
09-09-13 16:58:46 [INFO ] Using bind value AVDB.AVSRV
09-09-13 16:58:46 [INFO ] Return value = AVDB.AVSRV
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] drop database link "AVDB.AVSRV"
09-09-13 16:58:46 [INFO ] Executing SQL as [USR@SRC] select version from v$instance
09-09-13 16:58:46 [INFO ] Return value = 11.2.0.1.0
09-09-13 16:58:46 [INFO ] Creating DB link using AVDB.AVSRV,AVSRCUSR1,{avsrcusr_pwd},Lugaopc,1521,orcl
09-09-13 16:58:46 [INFO ] Connecting as srcuser_ora01 to @(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
09-09-13 16:58:46 [INFO ] Output from SQLPlus
09-09-13 16:58:46 [INFO ]
09-09-13 16:58:46 [INFO ] Package created.
09-09-13 16:58:46 [INFO ]
09-09-13 16:58:46 [INFO ] No errors.
09-09-13 16:58:47 [INFO ]
09-09-13 16:58:47 [INFO ] Package body created.
09-09-13 16:58:47 [INFO ]
09-09-13 16:58:47 [INFO ] No errors.
09-09-13 16:58:47 [INFO ]
09-09-13 16:58:47 [INFO ] Package created.
09-09-13 16:58:47 [INFO ]
09-09-13 16:58:47 [INFO ] No errors.
09-09-13 16:58:47 [INFO ]
09-09-13 16:58:47 [INFO ] Package body created.
09-09-13 16:58:47 [INFO ]
09-09-13 16:58:47 [INFO ] No errors.
09-09-13 16:58:47 [INFO ] Executing SQL as [USR@SRC] select distinct name from user_errors where name = :1
09-09-13 16:58:47 [INFO ] Using bind value DBMS_SRC_STREAMS_COLLECTOR
09-09-13 16:58:47 [INFO ] Return value = null
09-09-13 16:58:47 [ERROR] could not get AV source user connection using jdbc:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaopc)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
09-09-13 16:58:47 [ERROR] ORA-01017: invalid username/password; logon denied
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:765)
at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:414)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:162)
at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at oracle.av.avca.jdbc.JdbcConnection.<init>(JdbcConnection.java:87)
at oracle.av.orcldb.DAO.initConnection(DAO.java:79)
at oracle.av.orcldb.DAO.<init>(DAO.java:64)
at oracle.av.orcldb.commands.AddCollector.setupCollector(AddCollector.java:746)
at oracle.av.orcldb.commands.AddCollector.execute(AddCollector.java:230)
at oracle.av.orcldb.Command.process(Command.java:89)
at oracle.av.orcldb.Main.process(Main.java:118)
at oracle.av.orcldb.Main.main(Main.java:132)
I have searched the forum to my level best without clear solution
Regards
SadockHi gurus
I don't believe if this is missing solution from oracle community. I have decided to installed the collction agent and source database in linux system, so now both auditt vault server and collction agent are running in Linux system (but separately)
I am wondering, avorcldb add_collector -srcname ORCL -agentname avagent01 -colltype DBAUD and avorcldb add_collector -srcname ORCL -agentname avagent01 -colltype OSAUD -orclhome /u01/app/oracle/product/11.2.0/dbhome_1 are working fine and I am able to start these collectors
The avorcldb verify -src Lugaosrv:1521:ORCL.LUGAOSRV -colltype ALL command also return good results
[oracle@avsrv ~]$ avorcldb verify -src Lugaosrv:1521:ORCL.LUGAOSRV -colltype ALL
Enter Source user name: srcuser_ora01
Enter Source password:
source ORCL.LUGAOSRV verified for OS File Audit Collector collector
source ORCL.LUGAOSRV verified for Aud$/FGA_LOG$ Audit Collector collector
source ORCL.LUGAOSRV verified for REDO Log Audit Collector collector
[oracle@avsrv ~]$
The problem still I am facing is when attempting to add REDO collector. In fact the collector is added successful and i can see it even on EM console.
[oracle@avsrv ~]$ avorcldb add_collector -srcname ORCL -agentname avagent01 -colltype REDO -av Lugaosrv:1521:ORCL.LUGAOSRV
source ORCL verified for REDO Log Audit Collector collector
Adding collector...
Collector added successfully.
remember the following information for use in avctl
Collector name (collname): REDO_Collector
initializing REDO Collector
ERROR: could not get AV source user connection using jdbc:oracle:oci:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Lugaosrv)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL.LUGAOSRV)))
ERROR: ORA-01017: invalid username/password; logon denied
[oracle@avsrv ~]$
Any help will be appreciated
Sadock -
Invalid username/password in case of oracle os authentication
Hi,
I am trying to connect to database using oracle local os authentication. REMOTE_OS_AUTHENT = false
I am using oracle 11g.
here is the code
I am trying in two ways :-
1. OracleDataSource
OracleDataSource ods = new OracleDataSource();
String url = "jdbc:oracle:oci:@";
ods.setURL(url);
ods.setDatabaseName("oradg");
Connection conn = ods.getConnection();
In this case it always connects to the default ORACLE_SID which is set in the environment.
2. Simple JDBC connection
String url = "jdbc:oracle:oci:@oradg";
Connection con = Drivermanager.getconnection(url,props);
in this case it always says "invalid username/password"
Please help me to resolve the problem.
Thanksuser10839503 wrote:
2 using the oracle account for this is a VERY BAD IDEA
i have another os user called demo which has the same issue.
REMOTE_OS_AUTHENT any way i dont want to use.
3 always connecting to the database server is a VERY BAD IDEA
i am not very clear on this can u please elaborate it?
I dont want to use any username and password for os authentication in the code.
The problem is if ORACLE_SID is set in the environment then code works fine. But I want to set the sid in the code itself.
Because if i set in the environment then at a time only one sid will be used.
But why you want to hard code the SID in the first place anywhere? Why not to use the Services ?
Aman.... -
How to hide username/password in JDBC program.
hi All,
The support tat I get here is simply gr8.
Can someone suggest or send me a link as to how I hide the username /password ....i.e database connection in the jdbc program so as to avoid changing the program everywhere in case username and passwd changes ?????
I simply want to change the following code
String driverName = "oracle.jdbc.driver.OracleDriver";
Class.forName(driverName).newInstance();
// Create a connection to the database
Sring serverName = "127.0.0.1";
String portNumber = "1521";
String sid = "oratest";
String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
String username = "scott";
String password = "tiger";
connection = DriverManager.getConnection(url, username, password);
Ta,
sunnywell i kind of support what my fellow poster neeelima.srtidhar said..
Use of Connection Pooling via JNDI which is either provided by appln server or using custom built frameworks is the best method which i can think of instead of reinventing the wheel by creating a Properties file and then writing a Utility Class which ultimately endup in creating connection Object without any sort of optimal usage.
checkout the below articles for reference of how to do it.
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html
http://www.informit.com/articles/article.asp?p=352320&rl=1
http://www.codeproject.com/useritems/pool_client_jboss.asp
http://edocs.bea.com/wls/docs81/jdbc/programming.html
http://www.castor.org/jdo-pooling.html
http://homepages.nildram.co.uk/~slink/java/DBPool/
and if you are thinking of reinventing those that could be possible using the below article
http://www.javaworld.com/javaworld/jw-05-2002/jw-0517-jdbcdriver.html?page=1
Hope that might help:)
REGARDS,
RaHuL -
ORA-01017: invalid username/password; logon denied. but SQLPLUS works
"ORA-01017: invalid username/password; logon denied" when attempting to log on to db, in three different applications. Error is observed in Toad, Crystal Reports, and MS ODBC Administrator connect test. However, same db credentials work in SQLPLUS.
Customer is attempting to log into reporting database hosted by my company, and using Cisco VPN client.
I am unable to reproduce this at this time, on my machine, using same credentials and VPN profile.
Here is what we know/tried:
1. PING HOSTNAME is successful on CUSTOMER’S machine
2. TNSPING HOSTNAME is successful on CUSTOMER’S machine
3. SQLPLUS is successful with USER2/(pw)@HOSTNAME.int on CUSTOMER’S machine
4. We corrected timeout error on CUSTOMER’S side, by adding TCP.CONNECT_TIMEOUT=1000 in SQLNET.ORA (Also observed extremely slow performance on CUSTOMER SIDE)
5. We corrected dns suffix problem on CUSTOMER’S side, observed in NSLOOKUP by
adding: IP ADDRESS AND HOSTNAME to Windows HOSTS file
and commenting out default suffix COMPANY.com from SQLNET.ORA file
6. VPN configuration and VPN credentials are good.
We tested CUSTOMER’S VPN profle, CUSTOMER’S VPN credentials, and user USER2/(pw)@HOSTNAME on my machine (WIN7). I am able to maintain persistant connection to HOSTNAME for hours
7. TNSNames entries are good. Able to connect to db in Toad, and Crystal, on CUSTOMER’S machine using different Oracle user, USER3 (only has grant connect). Unable to logon to db, with Oracle user USER1, or USER2. (USER2 was created to try to resolve login problem w USER1, but issue still exists.)
8. CUSTOMER has Windows VISTA, does not have admin privileges, has Oracle 10 installed for client. Using same Cisco VPN client I have installed.
9. Database on our servers is 11g
I suspect a configuration issue with CUSTOMER'S Vista machine, OR network, but not sure what to check.
Help?Oracle is too dumb to lie.
make sure that Java is installed on same system as Crystal Report.
Then modify below to utilized your connection details to independently confirm connectivity independent of all other software.
bcm@bcm-laptop:~$ cat Conn.java
import java.sql.*;
class Conn {
public static void main (String[] args) throws Exception
Class.forName ("oracle.jdbc.OracleDriver");
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@//localhost:1521/v112", "scott", "tiger");
// @//machineName:port/SID, userid, password
try {
Statement stmt = conn.createStatement();
try {
ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");
try {
while (rset.next())
System.out.println (rset.getString(1)); // Print col 1
finally {
try { rset.close(); } catch (Exception ignore) {}
finally {
try { stmt.close(); } catch (Exception ignore) {}
finally {
try { conn.close(); } catch (Exception ignore) {}
bcm@bcm-laptop:~$ javac Conn.java
bcm@bcm-laptop:~$ export CLASSPATH=/u01/app/oracle/product/11.2.0/dbhome_1/owb/wf/lib/ojdbc14.jar:.
bcm@bcm-laptop:~$ java Conn
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
bcm@bcm-laptop:~$ -
ORA-01017: invalid username/password; logon denied on Weblogic 9.0 cluster
I am experiencing the following exception in Weblogic 9.0 server cluster environment. The same code works fine in non-cluster environment. The problem happens every now and then and would go away temporarily after recycling the domains. The Oracle database that the backend system connects to is 9.0.2.6. I am using the ocjdbc14.jar jdbc driver that comes with the Weblogic 9.0 on the client side to connect. I really appreciate any help or clue.
Ashkan
Error on dequeuing requests
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: ORA-01017: invalid username/password; logon denied
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.O3log.receive2nd(O3log.java:496)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:278)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;Ljava.lang.ClassLoader;)Ljava.sql.Connection;(Unknown Source)
at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Unknown Source)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:291)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:277)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:259)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:241)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:810)
at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:857)
at org.springframework.jdbc.object.StoredProcedure.execute(StoredProcedure.java:102)
at com.rwi.wam.dao.serviceprovider.ServiceProviderDequeue.dequeue(ServiceProviderDequeue.java:32)
at com.rwi.wam.dao.serviceprovider.ServiceProviderDAO.dequeueRequest(ServiceProviderDAO.java:48)
at com.rwi.wam.ejb.WAMRequestMessageBean.onMessage(WAMRequestMessageBean.java:168)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:425)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:332)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:288)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3069)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2989)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:3448)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)Hi, I can tell you that you're not using any WebLogic
JDBC code. You're getting a connection directly from
the Oracle drive, and you can change the vesion of the
drive if you want by changing the ojdbc14.jar in the
weblogic server\lib directory.
However, I believe the problem is an inherent weakness
at the DBMS. The DBMS listener process can sometimes
be temporarily swamped if it gets too many connection
requests at one time, and will fail some of them even if
they are all identical and correct.
This is one of the major reasons you should use WebLogic
connection pools so you always get already-made and
tested connections.
Another huge danger is that you are using DriverManager
calls. These are very bad in multithreaded applications
like WebLogic, because all DriverManager calls (including
some internal ones that all JDBC drivers call all the time,
are class-synchronized! This means that one call to
getConnection() will probably bolock all other running
JDBC in the whole JVM. If you can change the springframework
code to use WebLogic DataSources to pools, you'll be much
better off.
Joe
Ashkan Gholam-Zadeh wrote:
I am experiencing the following exception in Weblogic 9.0 server cluster environment. The same code works fine in non-cluster environment. The problem happens every now and then and would go away temporarily after recycling the domains. The Oracle database that the backend system connects to is 9.0.2.6. I am using the ocjdbc14.jar jdbc driver that comes with the Weblogic 9.0 on the client side to connect. I really appreciate any help or clue.
Ashkan
Error on dequeuing requests
org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: ORA-01017: invalid username/password; logon denied
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.O3log.receive2nd(O3log.java:496)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:278)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;Ljava.lang.ClassLoader;)Ljava.sql.Connection;(Unknown Source)
at java.sql.DriverManager.getConnection(Ljava.lang.String;Ljava.util.Properties;)Ljava.sql.Connection;(Unknown Source)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:291)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:277)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:259)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:241)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111)
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:810)
at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:857)
at org.springframework.jdbc.object.StoredProcedure.execute(StoredProcedure.java:102)
at com.rwi.wam.dao.serviceprovider.ServiceProviderDequeue.dequeue(ServiceProviderDequeue.java:32)
at com.rwi.wam.dao.serviceprovider.ServiceProviderDAO.dequeueRequest(ServiceProviderDAO.java:48)
at com.rwi.wam.ejb.WAMRequestMessageBean.onMessage(WAMRequestMessageBean.java:168)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:425)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:332)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:288)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:3069)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2989)
at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:3448)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179) -
System copy : ORA-01017: invalid username/password; logon denied
Hello SAPiens,
I have to perform a system copy of Bank analyzer 6, NW7.1, ABAP stack only on AIX 5.3, MCOD oracle 10.2.0.4 DB. I'm arriving to the sapinst parameters screen asking for the securestore key. The key is accepted, then it asks for the JAVA components DVD. An issue occurs after this step (JVM is uncompressed then tries to access the DB). Here is th UTL_load_usage :
cat UTL_load_usages.log
<!--LOGHEADER[START]/-->
<!--HELP[Manual modification of the header may cause parsing problem!]/-->
<!--LOGGINGVERSION[1.5.7.1006]/-->
<!--NAME[UTL_load_usages.log]/-->
<!--PATTERN[UTL_load_usages.log]/-->
<!--FORMATTER[com.sap.tc.logging.TraceFormatter(%24d %7s: %m)]/-->
<!--ENCODING[UTF8]/-->
<!--LOGHEADER[END]/-->
Aug 20, 2010 5:51:50 PM Info : Successfully parsed!
Aug 20, 2010 5:51:50 PM Info : Executing command Export...
Aug 20, 2010 5:51:50 PM Info : Establishing DB connection...
Aug 20, 2010 5:51:53 PM Path : Exception : The DataBase is down or the connection parameters are wrong: -sid=BA3 -dsn=jdbc/pool/BA3 -ssprops=/usr/sap/BA3/SYS/global/security/data/SecStore.properties -ssk=/usr/sap/BA3/SYS/global/security/data/SecStore.key -keyphrase=null
java.lang.Exception
at com.sap.exception.BaseExceptionInfo.traceAutomatically(BaseExceptionInfo.java:1230)
at com.sap.exception.BaseExceptionInfo.<init>(BaseExceptionInfo.java:457)
at com.sap.exception.BaseException.<init>(BaseException.java:303)
at com.sap.sl.ut.infoprovider.exceptions.UTInfoException.<init>(UTInfoException.java:99)
at com.sap.sl.ut.manager.persistence.db.DataBaseInfoFactory.connect(DataBaseInfoFactory.java:373)
at com.sap.sl.ut.manager.persistence.db.DataBaseInfoFactory.constructSystemInfo(DataBaseInfoFactory.java:776)
at com.sap.sl.ut.manager.command.Export.executeExportKDB(Export.java:57)
at com.sap.sl.ut.manager.command.Export.execute(Export.java:81)
at com.sap.sl.ut.manager.command.Command.exec(Command.java:88)
at com.sap.sl.ut.manager.UtlMain.exec(UtlMain.java:59)
at com.sap.sl.ut.manager.UtlMain.main(UtlMain.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:161)
Caused by: java.sql.SQLException: ORA-01017: invalid username/password; logon denied
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:790)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:362)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:420)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at com.sap.sql.connect.factory.DriverPooledConnectionFactory.createVendorConnection(DriverPooledConnectionFactory.java:50)
at com.sap.sql.connect.factory.DriverPooledConnectionFactory.getPooledConnection(DriverPooledConnectionFactory.java:37)
at com.sap.sql.connect.datasource.DBDataSourceImpl.createPooledConnection(DBDataSourceImpl.java:677)
at com.sap.sql.connect.datasource.DBDataSourceImpl.newPooledConnection(DBDataSourceImpl.java:626)
at com.sap.sql.connect.datasource.DBDataSourceImpl.getConnection(DBDataSourceImpl.java:105)
at com.sap.sql.connect.OpenSQLDataSourceImpl.getConnection(OpenSQLDataSourceImpl.java:202)
at com.sap.sl.ut.manager.persistence.db.DBConnection.connectViaSecureStore(DBConnection.java:159)
at com.sap.sl.ut.manager.persistence.db.DBConnection.connect(DBConnection.java:171)
at com.sap.sl.ut.manager.persistence.db.DataBaseInfoFactory.connect(DataBaseInfoFactory.java:371)
at com.sap.sl.ut.manager.persistence.db.DataBaseInfoFactory.constructSystemInfo(DataBaseInfoFactory.java:776)
at com.sap.sl.ut.manager.command.Export.executeExportKDB(Export.java:57)
at com.sap.sl.ut.manager.command.Export.execute(Export.java:81)
at com.sap.sl.ut.manager.command.Command.exec(Command.java:88)
at com.sap.sl.ut.manager.UtlMain.exec(UtlMain.java:59)
at com.sap.sl.ut.manager.UtlMain.main(UtlMain.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:161)
Aug 20, 2010 5:51:53 PM Info : Severe (database) error. Return code: 64
I guess sapinst retreives the connection data from the securestore, but fails using it...
The DB is up and running. I checked Oracle users, none of them are locked.
Can anyone kindly advice or provide a search path for shooting this issue ?
Thank you already,
EricHello Kiran,
Thank you for your advice.
the password is correct :
#/sapmnt/BA3/global/sltools> ./checkKeyPhrase.sh -f /sapmnt/BA3/global/security/data/SecStore.properties
INFO: Loading tool launcher...
INFO: [OS: AIX] [VM vendor: SAP AG] [VM version: 5.1.015] [VM type: SAP Java 64-Bit Server VM]
INFO: Main class to start: "com.sap.inst.checkKeyPhrase.CheckKeyPhrase"
INFO: Loading 27 JAR files: [./sharedlib/checkKeyPhrase.jar, ./sharedlib/jdbc.jar, ./sharedlib/jload.jar, ./sharedlib/jload_core.jar, ./sharedlib/jperflib.jar, ./sharedlib/jsizecheck.jar, ./sharedlib/sap.com~sl.ut.infoprovider_lib.jar, ./sharedlib/sap.com~sl.ut.manager.offline.jar, ./sharedlib/sap.com~tc~antlr.jar, ./sharedlib/sap.com~tc~bl~iqlib~impl.jar, ./sharedlib/sap.com~tc~bl~jdsr~jdsr.jar, ./sharedlib/sap.com~tc~bl~offline_launcher~impl.jar, ./sharedlib/sap.com~tc~bl~opensql~implStandalone.jar, ./sharedlib/sap.com~tc~bl~sl~utility.jar, ./sharedlib/sap.com~tc~dd~db~dictionarydatabase~implDictionaryDatabase.jar, ./sharedlib/sap.com~tc~exception.jar, ./sharedlib/sap.com~tc~je~configtool.jar, ./sharedlib/sap.com~tc~je~offlineconfiguration~impl.jar, ./sharedlib/sap.com~tc~logging~java~impl.jar, ./sharedlib/sap.com~tc~sapxmltoolkit~sapxmltoolkit.jar, ./sharedlib/sap.com~tc~sdt~cvl~impl.jar, ./sharedlib/sap.com~tc~sec~secstorefs~java~core.jar, ./../security/lib/tools/iaik_jce.jar, ./../security/lib/tools/iaik_jsse.jar, ./../security/lib/tools/iaik_smime.jar, ./../security/lib/tools/iaik_ssl.jar, ./../security/lib/tools/w3c_http.jar]
INFO: Start
Key phrase::::::::::::
The key phrase is correct.
I guess sapinst is retrieving the DB password from the securestore, tries to connect but gives back the incorrect password error message. But how can that DB password be incorrect if the system is up and running?
What is the DB user name sapinst retreives from the securestore ?
Kind regards,
Eric -
Unable to connect (invalid username/password)
Hi there.
I have major problems with connecting to iFS. The db and iFS is running on a remot machine under solaris and i use a windows nt machine. I use iFS 1.1, jdk 1.3 and the jdbc driver for jdk 1.2 that is provided by the oracle website. I am sure that the username and the password are right. Is there a special Here is the code i use for connecting:
LibraryService ls = new LibraryService();
LibrarySession session = null;
CleartextCredential me = new CleartextCredential(user, password);
ConnectOptions connect = new ConnectOptions();
connect.setLocale(Locale.getDefault());
connect.setServiceName(service);
connect.setServicePassword(password);
session = ls.connect(me, connect);
And here is the exception:
oracle.ifs.common.IfsException: IFS-10620: Unable to construct connection pool
oracle.ifs.common.IfsException: IFS-10620: Unable to construct connection pool
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1500)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:310)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:200)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:251)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at oracle.ifs.server.LibraryConnection.<init>(LibraryConnection.java:235)
at oracle.ifs.server.ConnectionPool.createLibraryConnection(ConnectionPool.java:576)
at oracle.ifs.server.ConnectionPool.<init>(ConnectionPool.java:321)
at oracle.ifs.server.S_LibraryService.<init>(S_LibraryService.java:912)
at oracle.ifs.server.S_LibraryService.startService(S_LibraryService.java:1129)
at oracle.ifs.beans.LibraryService.connectLocal(LibraryService.java:408)
at oracle.ifs.beans.LibraryService.connect(LibraryService.java:280)
at com.ifbus.XSP.oracleifs.IfsUtils.startIfsSession(IfsUtils.java:141)
at com.ifbus.XSP.oracleifs.IfsUtils.startIfsSession(IfsUtils.java:103)
at C._Programme._tomcat_3_2_1._webapps._archiv._site._startsession.populateDocument(_startsession.java:108)
at org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:96)
at org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:516)
at org.apache.cocoon.Engine.handle(Engine.java:370)
at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)
DEBUG: XIfsException.toDOM( [#document-fragment: null] )
DEBUG: XIfsException.toDOM([#document: null], oracle.ifs.common.IfsException: IFS-10620: Unable to construct connection pool)
DEBUG: XIfsException.toDOM([#document: null], oracle.ifs.common.IfsException: IFS-10633: Unable to create library connection
oracle.ifs.common.IfsException: IFS-10600: Unable to construct library connection
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
DEBUG: XIfsException.toDOM([#document: null], oracle.ifs.common.IfsException: IFS-10600: Unable to construct library connection
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
nullWhich HTTP Listener are you using... This stack trace looks strange. I would expect to see reference to org.apache.jserv if you were running a supported environment. The supported Web Servers are JWS which comes with iFS, and Oracle HTTP Listener, which comes with 8.1.7 or iAS 1.0.2
Also please try with JDBC11 and let me know if this works -
Connection without username, password or database name
I'm trying to find an automated way (for a given dbms) to check whether a server name and port number correctly identifies that the given dbms is running at that location.
For example, in MySQL, I can do something like:
DriverManager.getConnection("jdbc:mysql://" + serverName + ":" + port + "/");
So, I havent specified a username, password or database name. And this works (at least on my installation) by simply checking for an exception.
My question is: Can I always rely on this for MySQL or does it depend on how the MySQL dbms is configured?
What about MS SQL Server and Oracle?
Any help, much appreciated.Your question was "Can I always rely on this for MySQ"No it wasn't. My question was:
"Can I always rely on this for MySQL or does it depend on how the MySQL dbms is configured?"
Its the bit between the "My question is: " and the question mark. I understand that if you chop the question in half then "no" is a valid answer but then thats not the same question.
and the answer is[i] No! If your abilitydepends on the MySQL configuration then the answer to
your question is still No because it means you
can't always rely on it.
Wrong again!
If I was to ask "does it depend on how the MySQL dbms is configured?" then the answer is yes.
I think "No, yes" is a better answer to the question. Although I think masijade answer is best.
But anway, thanks for your constructive reply. -
RDMSRealm And wlpsadmin invalid username/password
I've using wlpsadmin servlet and the default RDBMSRealm in "out-of-box
configuration" .
For adding new users , anybody knows if this uses an
weblogic.jdbc.Datasource to access to database ?
I have in weblogic.properties this configuration :
weblogic.jdbc.DataSource.weblogic.jdbc.jts.commercePool=commercePool
weblogic.jdbc.connectionPool.commercePool=\
driver=oracle.jdbc.driver.OracleDriver,\
url=jdbc:oracle:thin:@tameza.ces.com:1521:devel,\
loginDelaySecs=1,\
initialCapacity=1,\
maxCapacity=10,\
capacityIncrement=1,\
allowShrinking=true,\
shrinkPeriodMins=15,\
testConnsOnReserve=true,\
props=user=gadisa;password=elcdh1,\
testTable=WLCS_IS_ALIVE,\
refreshMinutes=5
weblogic.allow.reserve.weblogic.jdbc.connectionPool.commercePool=everyone
weblogic.security.realmClass=\
com.beasys.commerce.axiom.contact.security.RDBMSRealm
And in weblogiccomerce.properties i have the configuration of RDBMSRealm
assigned to this pool.
commerce.usermgmt.RDBMSRealm.driver=oracle.jdbc.driver.OracleDriver
commerce.usermgmt.RDBMSRealm.dbUrl=jdbc:oracle:thin:@tameza.ces.com:1521
:devel
commerce.usermgmt.RDBMSRealm.dbUser=gadisa
commerce.usermgmt.RDBMSRealm.dbPassword=elcdhl
the problem is that when i try to add a new user throws an error
An error occurred:
javax.transaction.TransactionRolledbackException: Transaction:
'967541141897_1' rolled back due to EJB exception:
java.sql.SQLException: ORA-01017: invalid username/password; logon
denied
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.sql.SQLException.(SQLException.java:43)
at oracle.jdbc.ttc7.TTIoer.processError(Compiled Code)
at oracle.jdbc.ttc7.O3log.receive2nd(Compiled Code)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at oracle.jdbc.driver.OracleConnection.(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:106)
at
com.beasys.commerce.axiom.contact.security.RDBMSDelegate.init(RDBMSDelegate
..java:191) at
com.beasys.commerce.axiom.contact.security.RDBMSDelegate.(RDBMSDelegate
.jav a:136 at
com.beasys.commerce.axiom.contact.security.RDBMSDelegate$DFactory.newInstance(RDBMSDelegate.java:977)
at weblogic.utils.reuse.Pool.getInstance(Pool.java:57) at
com.beasys.commerce.axiom.contact.security.RDBMSRealm.getDelegate(RDBMSRealm.java:142)Solved :
The cause of this was cause of passwords in weblogic.properties and weblogiccommerce.properties entrys
didn't match.
(1!=l) => ( elcdh1 != elcdhl)
Mig wrote:
I've using wlpsadmin servlet and the default RDBMSRealm in "out-of-box
configuration" .
For adding new users , anybody knows if this uses an
weblogic.jdbc.Datasource to access to database ?
I have in weblogic.properties this configuration :
weblogic.jdbc.DataSource.weblogic.jdbc.jts.commercePool=commercePool
weblogic.jdbc.connectionPool.commercePool=\
driver=oracle.jdbc.driver.OracleDriver,\
url=jdbc:oracle:thin:@tameza.ces.com:1521:devel,\
loginDelaySecs=1,\
initialCapacity=1,\
maxCapacity=10,\
capacityIncrement=1,\
allowShrinking=true,\
shrinkPeriodMins=15,\
testConnsOnReserve=true,\
props=user=gadisa;password=elcdh1,\
testTable=WLCS_IS_ALIVE,\
refreshMinutes=5
weblogic.allow.reserve.weblogic.jdbc.connectionPool.commercePool=everyone
weblogic.security.realmClass=\
com.beasys.commerce.axiom.contact.security.RDBMSRealm
And in weblogiccomerce.properties i have the configuration of RDBMSRealm
assigned to this pool.
commerce.usermgmt.RDBMSRealm.driver=oracle.jdbc.driver.OracleDriver
commerce.usermgmt.RDBMSRealm.dbUrl=jdbc:oracle:thin:@tameza.ces.com:1521
:devel
commerce.usermgmt.RDBMSRealm.dbUser=gadisa
commerce.usermgmt.RDBMSRealm.dbPassword=elcdhl
the problem is that when i try to add a new user throws an error
An error occurred:
javax.transaction.TransactionRolledbackException: Transaction:
'967541141897_1' rolled back due to EJB exception:
java.sql.SQLException: ORA-01017: invalid username/password; logon
denied
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.sql.SQLException.(SQLException.java:43)
at oracle.jdbc.ttc7.TTIoer.processError(Compiled Code)
at oracle.jdbc.ttc7.O3log.receive2nd(Compiled Code)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at oracle.jdbc.driver.OracleConnection.(OracleConnection.java)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:106)
at
com.beasys.commerce.axiom.contact.security.RDBMSDelegate.init(RDBMSDelegate
..java:191) at
com.beasys.commerce.axiom.contact.security.RDBMSDelegate.(RDBMSDelegate
.jav a:136 at
com.beasys.commerce.axiom.contact.security.RDBMSDelegate$DFactory.newInstance(RDBMSDelegate.java:977)
at weblogic.utils.reuse.Pool.getInstance(Pool.java:57) at
com.beasys.commerce.axiom.contact.security.RDBMSRealm.getDelegate(RDBMSRealm.java:142) -
When starting Mozilla Firefox 3.6, I get an error window which opens up additionally overtop my browser windows stating:
"Javascript Application"
followed with :
"Invalid username/password combination. If you continue to get this error, try entering your email address as your username."
Obviously it is happening with one of my email addresses/usernames & password combinations of which I know the username for (which I choose not to post here) and I'm not sure where to begin looking for a resolution to this problem.I was able to resolve this by disabling (under Tools - Add-ons) Yahoo! Mail Notifier
Hope this helps some of you also! -
Using SSO username/password in java portlet for Database Connection
Hi all,
We implemented java portlet with environment Oracle Application server 10.1.2 and Portal 10.1.4
At present we are picking the database username and password and connect string in properties and our
java class is reading the properties file and connecting to database to fetch the records.
Our idea is to not to pick the username/password and connect string from the properties file or
not to configure the datasource in data_source.xml.
Our Requirement is who ever login to the Portal(SSO) our java class should pick the sso username/password and
connect to database to fetch the record(s).
Because our database users are one to one mapped to sso user(s) of portal.
We request anyone to guide us how can we do it or suggest any suitable solution for our requirement.
Thanks
Dan TeyI think this is a no-go, since you cannot retrieve a cleartext password from the OID if I'm correct.
-
How do I setup Forms not to ask RAD username/password when opening a form
Good day
I have setup oid and sso and they work I can sign on to database with an oid user using sqlplus.
If I set SsoDynamicResourceCreate=true and enter the user id and password in at the popup it works correct and won’t even ask it again
What I want to know how can set portal to use a RAD/DAS without prompting for a username password.
We need to do this for all +/- 30000 users and if so how do we do it pragmatically.
I think because I don’t have much APPS experience I basically don’t know where this must be set globally
APPS is version 10.1.2
Regards
Cliff
Message was edited by:
cliffnelGot solution in metalink note 262686.1
Goto <infrastructure :port>/oiddas
Click Configuration Tab
Click Preference Tab
Create Default RAD for database
Maybe you are looking for
-
Can't get the desktop app to work - forced to sign out and it shuts down
I was unable to install the most recent update for Adobe Story, so I uninstalled the app, went online and re-downloaded. Now, when I try to launch I get an error that user preferences weren't found, and it forces me to sign out, so I can't work offli
-
How can I use external CSS, JavaScript and Images in PeopleSoft Portal?
I am developing a website and I need to put my CSS, JavaScript and IMG files in a folder on the server that can be used by my HTML objects. Where should I put the images? How do I get the HTML objects can read these images? I've tried several things
-
Hi All, Accidentally the display of my Lumia 1520 was broken. I have already gave it to an authorized service, but want to know, what could be the price for the display? I've already searched through the internet, but unfortuantely can't find any rel
-
Whenever I set an alert to appear on "Date of Event" for an "All Day" event, the alerts never show up. Am i doing something wrong or is anyone else experiencing the same problem?
-
Ipad not getting service in certain areas
I have an ipad with 3g support, all of the sudden it has stopped working in the gym where i used to have no problem. It shows i am connected but nothing is happening (even when i enable 3g) it works elsewhere, any suggestions?