Accessing a DataSource with a userid, password.
I am getting an SQL Exception with trying to create a database connection using a datasource with userid and password, I can log in to the database manually with the credentials but when I try to access via the datasource this is the error returned.
java.sql.SQLException: java.sql.SQLException: User: doug, failed to be authenticated.
<code>
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// start getConnection
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
* Creates a new connection to the database
* @return the connection object
public Connection getConnection() throws Exception{
Context context = new InitialContext();
DataSource dataSource = (DataSource) context.lookup("JDBC-GSFP_ResourceTracker");
return(dataSource.getConnection("doug","root"));
} // end getConnection
</code>
Any Ideas,
Hi
When you created DataSource in Weblogic Admin Console, at one point, you will give all the db details like DB Host, port, sid and username/password. You can TEST the connection also right there. If it says success, thats it.
Now, on the java side, you do Initial context and do JNDI Lookup for that DataSource and directly get the DataSource. There is no need to pass again username/password from Java Side. Just use dataSource.getConnection() without any arguments.
public Connection getConnection() throws Exception{
Context context = new InitialContext();
DataSource dataSource = (DataSource) context.lookup("JDBC-GSFP_ResourceTracker");
return(dataSource.getConnection());
} // end getConnection
Thanks
Ravi Jegga
Similar Messages
-
i have recently changed my Apple ID password, but i now cant access my icloud with the new password, i thought the 2 were linked?
Hi helenbeach,
If you've recently made changes to your Apple ID, you may need to update or log out/log back in to some of the related services for those changes to take effect. You may find the following article helpful:
Apple ID: What to do after you change your Apple ID
http://support.apple.com/kb/HT5796
Regards,
- Brenden -
Can you still access Windows partition with open firmware password installed?
Can you still access Windows partition with open firmware password installed? If so, do you still use the Option key upon restart?
I don't use Bootcamp. However, I do know that with a firmware password, pressing the option key at startup will cause the password entry screen to come up; after entering the password, you will get the boot device choice screen.
So, if Bootcamp partitions normally show up on that screen then it should work just fine, or so I'd imagine. -
HT5934 IPad 2 cannot access wifi, even with the correct password.
My iPad 2 does not accept the password it should when trying to access the wifi access available at my employer. Once my employer removed his password protection from his wifi router, my iPad accepted the wifi. An iPhone accepted the same password today... It hesitated a bit longer than we expected, however, it did access the wifi router. We've tried multiple times, my employer uses Macs, and he's tried accessing his wifi with my iPad... He's even changed the name on his wifi, checked all settings, crosschecked that the password is a valid password, still, my iPad gives me an error "incorrect password ". It only makes sense if we were using an incorrect password, but we weren't! Help!
Hello lillybgr8,
The following article provides a few tips that may help get your iPad working with your employer's WiFi network.
iOS: Troubleshooting Wi-Fi networks and connections
http://support.apple.com/kb/TS1398
Cheers,
Allen -
Client Security Password manager - Groups / more sites/appl with same userid / password
How do I group entries to getter, so when I change password on one it knows it should update all in same group with the new password ?
I have tried to create a Folder and put the entries into the same Folder but that does not make any difference.
/GertJHi,
basicalloy we are scning these forums for the input, that we the collect and then it wil lbe decided wheter we should or should not implement a feature into an application.
Please note, that regarding the Firefox, we are working on a fix for this, that will be released soon .
Let me know if you have any other questions.
Rgrds -
Problem accessing J2EE DataSource with BC4J
I'm trying to create MySQL database connection with BC4J via a J2EE DataSource. But without success.
The errors I receive:
Launching OC4j...
Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized
2003-03-18 09:40:36 ApplicationModuleProvider - unspecified properties:
password drivertype user sid connectionstring host encryptiontype port
ApplicationModuleProvidernull
java.lang.NullPointerException
at oracle.cle.persistence.ConnectionProvider.getConnectionString(Connect
ionProvider.java:606)
at oracle.clex.persistence.bc4j.ApplicationModuleProvider.createModule(A
pplicationModuleProvider.java:331)
at oracle.clex.persistence.bc4j.ApplicationModuleProvider.getConnection(
ApplicationModuleProvider.java:200)
at oracle.cle.persistence.ConnectionProvider.getConnection(ConnectionPro
vider.java:669)
at oracle.cle.persistence.ConnectionManager.getConnection(ConnectionMana
ger.java:607)
at oracle.cle.persistence.DeploymentConnector.getConnection(DeploymentCo
nnector.java:168)
at oracle.cle.persistence.DeploymentConnector.getConnection(DeploymentCo
nnector.java:92)
at oracle.jheadstart.persistence.bc4j.handler.DataSourceHandlerImpl.getC
onnection(DataSourceHandlerImpl.java:331)
at oracle.jheadstart.persistence.bc4j.handler.DataSourceHandlerImpl.getA
pplicationModule(DataSourceHandlerImpl.java:874)
at oracle.jheadstart.persistence.bc4j.handler.DataSourceHandlerImpl.getD
ataSourceSet(DataSourceHandlerImpl.java:462)
at oracle.jheadstart.process.GetDataSourceSet.retrieveSimple(GetDataSour
ceSet.java:538)
at oracle.jheadstart.process.GetDataSourceSet.persist(GetDataSourceSet.j
ava:502)
at oracle.jheadstart.process.PersistingDataSource.start(PersistingDataSo
urce.java:251)
at oracle.cle.process.CLEStateMachine.start(CLEStateMachine.java:55)
at oracle.cle.process.Process.start(Process.java:97)
at oracle.cle.process.GenericProcess.start(GenericProcess.java:82)
at oracle.cle.process.ParentProcess.start(ParentProcess.java:218)
at oracle.cle.process.DisplayGroup.start(DisplayGroup.java:75)
at oracle.cle.process.CLEStateMachine.start(CLEStateMachine.java:55)
at oracle.cle.process.Service.start(Service.java:389)
at oracle.clex.process.controller.HttpServletController.doPost(HttpServl
etController.java:439)
at oracle.jheadstart.process.controller.JhsHttpServletController.doPost(
JhsHttpServletController.java:70)
at oracle.clex.process.controller.HttpServletController.doGet(HttpServle
tController.java:849)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
stDispatcher.java:721)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
vletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
tHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
va:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
utor.java:797)
at java.lang.Thread.run(Unknown Source)
ApplicationModuleProvider: ApplicationModuleProvidernull
GetDataSourceSet Exception: A Connection could not be made for class: oracle.emp
depdemo.resource.Department and sessionId: e3c568a09dec48d7b5a6cb86d041d22b orig
inal message is: ApplicationModuleProvider: ApplicationModuleProvidernull
See also thread MySQL at the JHeadstart forum.
data-sources.xml (oc4j\j2ee\home\config):
<data-source
class="com.evermind.sql.DriverManagerDataSource"
name="OracleDS"
location="jdbc/OracleCoreDS"
xa-location="jdbc/xa/OracleXADS"
ejb-location="jdbc/OracleDS"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="scott"
password="tiger"
url="jdbc:oracle:thin:@172.16.2.240:1521:dev2"
inactivity-timeout="30"
/>
cle-providers.xml:
<cle-providers>
<provider name="EmpDepServiceProvider" class="oracle.clex.persistence.bc4j.ApplicationModuleProvider">
<property name="persistencebase" value="oracle.empdepdemo.persistence.bc4j"/>
<property name="modulename" value="oracle.empdepdemo.persistence.bc4j.Bc4jModule"/>
<property name="failover" value=""/>
<property name="scope" value="request"/>
<property name="managestate" value="false"/>
<property name="configuration" value="Bc4jModuleLocal"/>
</provider>
</cle-providers>
bc4j.xcfg:
<?xml version = '1.0' encoding = 'UTF-8'?>
<BC4JConfig>
<AppModuleConfigBag>
<AppModuleConfig name="Bc4jModuleLocal">
<DeployPlatform>LOCAL</DeployPlatform>
<DBconnection>jdbc:oracle:thin:@localhost:1521:orcl</DBconnection>
<JDBCName>ScottTiger</JDBCName>
<jbo.project>empdep</jbo.project>
<AppModuleJndiName>oracle.empdepdemo.persistence.bc4j.Bc4jModule</AppModuleJndiName>
<ApplicationName>oracle.empdepdemo.persistence.bc4j.Bc4jModule</ApplicationName>
</AppModuleConfig>
</AppModuleConfigBag>
<ConnectionDefinition name="ScottTiger">
<ENTRY name="JDBC_PORT" value="1521"/>
<ENTRY name="ConnectionType" value="JDBC"/>
<ENTRY name="HOSTNAME" value="localhost"/>
<ENTRY name="user" value="Scott"/>
<ENTRY name="ConnectionName" value="ScottTiger"/>
<ENTRY name="SID" value="orcl"/>
<ENTRY name="JdbcDriver" value="oracle.jdbc.driver.OracleDriver"/>
<ENTRY name="ORACLE_JDBC_TYPE" value="thin"/>
</ConnectionDefinition>
</BC4JConfig>Thank you Dhiraj,
On my Oracle database it is working. But on MySQL I still have the same problem.
I'm still ivestigating it.
Thanks anyway.
Marcel -
Dear all,
I am looking to setup the use of active directory userid/password authentication instead of SAP R/3 User/Password for digital signature. We SSO to the backened ABAP AS via an SAP NW Portal to which SPNEgo kerberos authentication is setup. Today we specify R3 user id/password to digitally approvae a lot release. The idea is to have users maintain one AD password and don't have to remember the R/3 password anymore and also our Security team to avoid password maintenance.
I know there are 3 options for digital signature and
System signature with authorization by user ID and password (We use this currently)
Digital User signature with verification - (We would like to use this with AD userid/password, so the system still ask the users their AD userid/password for the authentication when they try to "sign" a document.)
User signature without verification
Do you think there is a way to configure the system in order to ask and check the active directory userid/password instead of SAP R/3 password? Where can I found documentation about it ?
I have several different versions of AS ABAP starting from NW 7.02 to NW 7.31.
My active directory is based on Windows 2008.
Thanks in advance!!
DheeActually enabling Kerberos for SSO purposes and enabling Kerberos for digital signatures are two different topics although the latter is because of the former. I'm interested in the topic as well and I'm currently looking at different options. SAP provides a BAdI for the digital signature API which can be used for external authentication but they do not provide the solution to invoke Kerberos authentication based on username and password. SAP provides a semi solution with NWSSO 2.0 SP2 which works only on Windows with classic dynpros meaning SAP GUI for Windows is assumed. The solution is based on an ActiveX component which does the actual Kerberos authentication using the Secure Login Client which is part of the NWSSO suite. Extending that implementation to non-Windows and non-GUI applications would require some sort of web enabled service that could be used to authenticate the user with username and password. In case authentication is successful, a Kerberos token would be returned to SAP which would then be validated. All the required pieces are there since SAP has Kerberos support now in both stacks of the NetWeaver Application Server, some bits are still missing though which leaves customers looking at 3rd party or custom solutions.
-
Custom Component UserId/Password
Hello All - I'm developing a set of custom components in which I need to call a back end system. In order to do this I need to authenticate to the back end system and I want to give the user the option to use either a functional account or the "process context" i.e. the user who is running the task (similar to what you see in the Documentum/FileNet components).
Is there a way to query LiveCycle to get the userid and password of the user who is running the process that contains the component?
Thanks.
BryanHoward - Thanks for the reply. Each task in a LiveCycle process could be run by a different user however every call to the LiveCycle server must be authenticated..hence you have to log in to workspace before performing an action..or when making API calls via webservices or the java api you must supply a credential.
If you look at the way the FileNet and Documentum connectors are built Adobe has used a custom authenticator to actually store the credentials of the user who is logged into the service in a credential cache. Then on their components they allow you to check "run as process context" or something to that effect which will basically look in that cahce to find the username and password.
Before I went down this route (as I know it will work) I was trying to find out if Adobe had any other place that they store the credentials that came into the service call (after all a task in an orchestration is simply a service call). That way I could retrieve it and build the connection to my backend system with that userid/password.
Thanks,
Bryan -
I'm using Numbers version 3.2.2.
Suddenly I cannot access my password protected Numbers file with the correct password. I have the correct password written down so I know I haven't made a mistake.
The response box that pops up says that the file cannot be opened. There are no other options for me to choose from.Also, I tried to open it through an older version of Numbers but it sent this error message.
-
Using DataSource with MS Access
is it possible to use the JDBC DataSource with MS Access? Should I download some .class to register with JNDI?
I've done it with Tomcat, but I've never tried to do it outside of a container. You sound like you want to do it without a servlet or J2EE app server engine acting as the lookup and pool. - MOD
-
Hi my apple imac 2007 asking suddenly password to access the system with apple logo and to colourfull circle and a triangle
Hi RRFS!,thanks for help.I forgot to tell that hard drive has 2 partitions 1:format :Mac OS Extended (Journaled) and that works properly,2:format:MS-DOS (FAT32) and when i "get info" for both :first has shering & permitions:You can read and write - with name and privilege, second has shaing & prermissions:You can read and write- without name and privilege
-
When it turns on it comes up with the reset password screen, I complete the reset password and press restart but my computer doesn't restart and for a while doesn't turn on at all! After at least 10min it turns on and comes up with the same Reset password screen.
My Mac is up to date in OSX
Please help me! I need it for my homework!Hi Linda Loo Loo,
If you have backed up previously to iTunes on a specific computer, even if it has been a while, you may be able to still backup even if you are unable enter the passcode on your iPhone due to a damaged screen. You may find the following article helpful:
If you have previously synced your device with iTunes, you may be able to reset the passcode by restoring the device:
Connect the device to the computer with which you normally sync and open iTunes.
Note: If iTunes asks you to enter the passcode, try another computer that you have synced with. Otherwise, go to "If you have never synced your device with iTunes, or you do not have access to a computer" section below.
If the device is still disabled, or if iTunes does not automatically sync your device, sync the device with iTunes.
When the backup and sync is complete, restore your device.
When iOS Setup Assistant asks to set up your device, choose "Restore from iTunes backup".
Select your device in iTunes and choose the most recent backup of your device.
iOS: Forgotten passcode or device disabled after entering wrong passcode
http://support.apple.com/kb/ht1212
Regards,
- Brenden -
Cannot access the iCloud mail for some reason I don´t know. Worked perfect until Nov 28th, but a message with "incorrect ID/password" popped up. Contacts and iCal is accessible. Have tried from iPad, Mac, iPhone and PC. Any recommendations?
Reset your password. Be sure your new one meets the requirements for length (8) and characters (at least one upper case and one number).
-
Tried accessing administrator account with wrong password
I forgot my administrator access password,tried with a wrong password to many times and now the computer can't access account.I understand this to be a safety mechanism.How can I get myself out of this? Any assistance would be greatly appreciated!
The above linked article is for the administrator to change other users' passwords from the administrator account. That won't help you when you have forgotten the administrator's password.
Here is how to change the administrators password. These instructions come from Mac Help, available from the Help menu in the Finder.
To reset the administrator password using the Mac OS X disc:
1. Insert the Mac OS X Install disc and restart the computer.
2. When you hear the startup tone, hold down the C key until you see the spinning gear.
3. When the Installer appears, choose Utilities > Reset Password.
4. Follow the onscreen instructions to change the password.
5. Quit the Installer and restart your computer while holding down the mouse button to eject the disc. -
Can't access forums with my UserID.
Can't access forums with my UserID.
Hi triscele666,
So you try to login with your preferred Apple ID (the one you are supposed to use) and it asks you for a username? This sounds like there is no Apple Support Communities user linked to that Apple ID, so it asks you for a username to create one, but there is an existing user linked to that email.
Do you have any other Apple IDs that may have been used to create an Apple Support Communities user?
How to find your Apple ID
Do you have any other Apple Support Communities usernames?
ivan
Maybe you are looking for
-
about 300 CD imported on my IMAC in AIFF version. I want to create the same library on my macbook pro, but Apple lessloss to use for ipod and other device. I import on the finder'S macbook pro all the library ( many gigabyte in AIFF version). I open
-
Export in QuickTime with "Only Hyperlink"
Hallo! I've a problem! When export in QuickTime from KeyNote, setting "Only hyperlink", the keys with the action back do not only work while next it works. This happens even if inserts the numeration of the page. Can you help me??!!! Thank you very m
-
Aged Tickets oolder than 30 days
I am using Crystal XI. I am trying to find the best way to report on service requests that have a date entered that has aged 30 days and over from the date the report is run and only report on the technicians and how many tickets are aged over. I was
-
Symbolic Link to Encrypted Folder disappear on reboot
Good day I have a symbolic link from an encrypted folder "/Volume/important Files/" that point to Dropbox folder ln -s /Volumes/important\ Files ~/Dropbox/important I have additional 'ln' to other files that are NOT encrypted (e.g. a docs folder, som
-
Automatic 'return' after a paragraph
It seems to me TLF automatically inserts a 'return' between two paragraphs. So if the first paragraph ends with a return, you get two empty lines between the paragraphs. Is this a correct assumption? I have been working around this by deleting the la