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();

Similar Messages

  • 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.

  • Using Oracle Users in Realms and DataSource.getConnection

    Is it possible to authenticate using an Oracle User via JAASRealm and also retrieve connections specific to that user from a DataSource?
    I currently have an application which doesn't use either, but rather sets up a OracleDataSource. So basically I just want to allow the container to administer both the authentication and data source setup, while still allowing the getConnection(user,password):
    CODE
    ocpds = new OracleConnectionPoolDataSource();
    ocpds.setURL(connectionString);
    ocpds.setConnectionProperties(props);
    ods = new OracleDataSource();
    ods.setURL(connectionString);
    ods.setConnectionCachingEnabled(true);
    ods.setConnectionProperties(props);
    // Pool and Cache
    Properties poolProps = new Properties();
    poolProps.setProperty("AbandonedConnectionTimeout", "60");
    poolProps.setProperty("InactivityTimeout", "5");
    poolProps.setProperty("TimeToLiveTimeout", "60");
    poolProps.setProperty("ConnectionWaitTimeout", "60");
    ods.setConnectionCacheProperties(poolProps);
    ods.setConnectionProperties(props);
    Util.logln("Connection Cache Properties");
    cache = OracleConnectionCacheManager.getConnectionCacheManagerInstance();
    cache.createCache(cacheName, ods, poolProps);
    cache.setConnectionPoolDataSource(cacheName, ocpds);
    ........later in the BatCave (JSP or a servlet).....
    conn = (OracleConnection) ods.getConnection(username, password);
    ENDCODE
    This section from OAS Containers for J2EE Services Guide worries me:
    (from: http://download-east.oracle.com/docs/cd/B14099_19/web.1012/b14012/datasrc.htm#sthref572 )
    Using Different User Names for Two Connections to a Single Data Source
    When you retrieve a connection from a DataSource object with a user name and password, this user name and password are used on all subsequent connection retrievals within the same transaction. This is true for all data source types.
    For example, suppose an application retrieves a connection from the jdbc/OracleCMTDS1 data source with the scott user name. When the application retrieves a second connection from the same data source with a different user name, such as adams, the second user name (adams) is ignored. Instead, the original user name (scott) is used.
    Thanks for reading all of this, and I appreciate any help!

    Update:
    I'm still not quite sure what to do. Where I am now:
    1. I don't know how to authenticate against Oracle database users (non-ldap) via JNDI/JAAS/whatever
    2. Proxy authentication (ALTER USER...CONNECT THROUGH...) seems to be promising for using connection pools, and in addition, once realm authentication happens, I can just pass the username and piggyback on the middletier connection without knowing the password used in authentication
    3. I'm not sure if proxy addresses the issue that OAS Containers for J2EE Services Guide talks about in the original post
    4. I'd prefer not to use OID
    Again, if you have any little information, I'd really like to hear it.

  • 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,
    sunny

    well 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 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,
    Eric

    Hello 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

  • 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)

  • 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 Tey

    I think this is a no-go, since you cannot retrieve a cleartext password from the OID if I'm correct.

  • 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
    Sadock

    Hi 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

  • Save pdf output into db WITHOUT hardcoding username password in desname

    We are trying to use pluggable destination (Blobdestination) to save our reports in pdf format into the database. Our security policies dictate that we cannot hardcode
    the database username password in the URL or in the code.
    What are our options? Can we use the OC4J datasources?
    Thanks

    We tried using utl_http, but face two issues.
    1. When we used https and provided wallet, failure
    happened.Why would you want the overhead of https between your db and your report server? The db should be inside a firewall and ideally, your report server would be too.
    2. When the report runs for a long time time out
    issues were happening.The default for utl_http is 60 seconds. You just have to change it:
    utl_http.set_transfer_timeout(60); -- default
    utl_http.set_transfer_timeout(3600); -- 1 hour

  • Configuring usernames/passwords in Oracle DB

    Hi,
    I have the latest Weblogic 8.1. The usernames/passwords are stored in a table
    in Oracle database.
    Can someone explain to me (point me in the right direction in documentation) how
    to configure Weblogic to look up those usernames/passwords/roles in the Oracle
    DB?
    Currently, we have a web application that uses declarative security and I want
    Weblogic to look up the usernames/passwords/roles automatically.
    I know in Tomcat you can specify the datasource JNDI and tell it (in the xml DD)
    which table/column to user for usernames/passwords and which table/column to use
    to look up roles of those users. There has got to be something like this in Weblogic.
    I was a bit scared when I read in one of the documents that RDBMS is being deprecated.
    I must not be understanding the context of this properly.
    Could someone help?
    Thanks,
    Yaakov.

    So that we may better diagnose DOWNLOAD problems, please provide the following information.
    - Browser + Version: internet explorer
    - O/S + Version: windows 98
    - Error Msg: shared memory does not exist/cannot connect to oracle server
    Compared to all of you, I'm a very naive computer user. I've successfully downloaded the oracle 8i personal version. When I try to get into sql+, I can't seem to figure out a username and password. I loooked up some sort of usernames/passwords in a document about this thing and have tried all of the following many different times, in many different ways, for several hours now: scott/tiger, system/manager, sys/change_on_install. The scott/tiger works just fine at the university I attend, of course. If anybody has any suggestions, ideas for a dummy, thank you soooooooooooooooooooooooooooooooooooooooooooo much! Hi,
    I suspect, there is no database that is running for you to get connected to. You can try this.
    From dos prompt
    c:\> set oracle_sid = your_db_name
    c:\> sqlplus scott/tiger
    HTH

  • 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.
    Thanks

    user10839503 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....

  • 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:~$

  • Invalid username/password; logon denied in Hyperion Planning

    Hi Folks,
    We are running hyperion planning 9.3.1 with essbase and the planning application running on two separate servers. Today I tried deploying an application but it would abort the deployment after giving the 550 error. On looking through the logs I found that the server_messages_UsageService.log in the <hyperion home> \ logs \ BI Plus directory is growing in size like anything. It grew up from a few KB in size to a GB in a few hours.
    The error that keeps repeating itself in the file is as follows:
    Dec 01 14:55:13.859
    1000165
    com.brio.one.common.DatabaseConnectionException: 1000165
         at com.brio.one.services.impl.database.BaseDBManager.throwDatabaseException(Unknown Source)
         at com.brio.one.services.impl.database.BaseDBManager.getUpdateableConnection(Unknown Source)
         at com.brio.one.services.mgmt.usage.impl.database.UsageServiceDBManager.deleteEvents(Unknown Source)
         at com.brio.one.services.mgmt.usage.impl.database.UsageServiceDBManager.deleteMessages(Unknown Source)
         at com.brio.one.services.mgmt.usage.impl.GCThread.execute(Unknown Source)
         at com.brio.one.services.mgmt.usage.impl.GCThread.run(Unknown Source)
    ]]></throwable>
    </event>
    <event logger="com.brio.one.services.mgmt.usage.impl.GCThread" timestamp="1291197313859" level="WARN" thread="GCThread0" sequence_no="517">
    <time>01 Dec 2010 14:55:13,859</time>
    <context originator_type="UsageService" host="HYPERION"/>
    <message><![CDATA[1000165]]></message>
    <throwable><![CDATA[Dec 01 14:55:13.859
    Database Server error: DBConnectionPool::get: [Hyperion][Oracle JDBC Driver][Oracle]ORA-01017: invalid username/password; logon denied
    com.sqribe.transformer.DBConnectionException: Database Server error: DBConnectionPool::get: [Hyperion][Oracle JDBC Driver][Oracle]ORA-01017: invalid username/password; logon denied
         at com.sqribe.transformer.DBConnectionPool.get(Unknown Source)
         at com.brio.one.services.impl.database.BaseDBManager.getUpdateableConnection(Unknown Source)
         at com.brio.one.services.mgmt.usage.impl.database.UsageServiceDBManager.deleteEvents(Unknown Source)
         at com.brio.one.services.mgmt.usage.impl.database.UsageServiceDBManager.deleteMessages(Unknown Source)
         at com.brio.one.services.mgmt.usage.impl.GCThread.execute(Unknown Source)
         at com.brio.one.services.mgmt.usage.impl.GCThread.run(Unknown Source)
    [1000165]:
    DBConnectionPool::get: [Hyperion][Oracle JDBC Driver][Oracle]ORA-01017: invalid username/password; logon denied
    I tried searching through the forums but got on real help on this one. I have checked usernames and passwords on all datasources and the main planning db and they are all correct and none of the hyperion related accounts are locked.
    This error is on production and I would really appreciate any help.
    Thanks.
    Imran

    more from the same file:
    2010-12-01 22:25:45,000 [TP-Processor3] DEBUG com.hyperion.awb.web.appmanager.Action - - create action appMgrCallbackUrl
    2010-12-01 22:25:45,000 [TP-Processor3] DEBUG com.hyperion.awb.web.appmanager.Action - - create action data
    2010-12-01 22:27:00,718 [TP-Processor3] DEBUG com.hyperion.awb.web.appmanager.Action - - create action url
    2010-12-01 22:27:00,718 [TP-Processor3] DEBUG com.hyperion.awb.web.appmanager.Action - - post action to product
    2010-12-01 22:27:00,750 [TP-Processor3] INFO com.hyperion.awb.web.appmanager.Action - Posting:http://HYPERION:8300/HyperionPlanning/servlet/HspAppManagerServlet?action=deploy&lang_id=en&app_name=hrdb
    2010-12-01 22:27:00,843 [TP-Processor3] INFO com.hyperion.awb.web.appmanager.Action - Post response: 550
    2010-12-01 22:27:00,843 [TP-Processor3] ERROR com.hyperion.awb.web.appmanager.Action - <html><head><title>Apache Tomcat/5.0.28 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 550 - Application hrdb already exists!</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Application hrdb already exists!</u></p><p><b>description</b> <u>Cannot find message associated with key http.550</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.0.28</h3></body></html>
    2010-12-01 22:27:00,843 [TP-Processor3] INFO com.hyperion.awb.web.common.BaseServiceException - BaseServiceException() - start
    2010-12-01 22:27:00,843 [TP-Processor3] INFO com.hyperion.awb.web.common.BaseServiceException - BaseServiceException() - end
    2010-12-01 22:27:00,843 [TP-Processor3] ERROR com.hyperion.awb.web.appmanager.Action - com.hyperion.awb.web.common.BaseServiceException: <html><head><title>Apache Tomcat/5.0.28 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 550 - Application hrdb already exists!</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Application hrdb already exists!</u></p><p><b>description</b> <u>Cannot find message associated with key http.550</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.0.28</h3></body></html>

Maybe you are looking for