Saturday 14 February 2009

No PasswordCredential found

I got the exception below while trying to set up a JNDI database configuration in glasshish to point to my local Oracle XE installation. Google didn't help so I'm posting it here for in case it happens to me again.
I didn't actually figure out how to resolve it. I fiddled around in domains/domain1/config/domain.xml a little, but in the end I think restarting Glassfish did the trick for me.


INFO: RAR7099: The mcf being used to allocate the connection and the MCF in the pool are not equal.
WARNING: RAR5038:Unexpected exception while creating resource for pool aum_pool. Exception : No PasswordCredential found
WARNING: RAR5117 : Failed to obtain/create connection from connection pool [ aum_pool ]. Reason : No PasswordCredential found
WARNING: RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: No PasswordCredential found]
WARNING: java.sql.SQLException: Error in allocating a connection. Cause: No PasswordCredential found
at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:115)

30 comments:

  1. How something so simple can solve a unknown problem - thanks for the help. Right, back to deploying my war's :)

    ReplyDelete
  2. Of course restarting works, why didn't I think of it? Thanks for the post.

    ReplyDelete
  3. Even though I wasn't having the same problem you had, I'd just like to express appreciation that reading your post did give me an idea how to address my problem and reconfigure settings to find the solution. Thanks!

    ReplyDelete
  4. I thought Glassfish will handle a change in the connection wihtout a restart and got the same problem. This message is really tricky and only thanks to your post I found a quick solution.

    ReplyDelete
  5. Rest worked for me too. Nice post :). Would have been better if glassfish warned us that we may need to restart the server for the changes we made.

    ReplyDelete
  6. Thanks, hadn't assumed this would be necessary but apparently it is!

    ReplyDelete
  7. Great man, it worked for me. I am still wondering how this worked? actually I made changes through GF admin console pinged successfully datasource. then tried from application. May be the changes are not bind to the application without server restart!!!!

    -Ravi.

    ReplyDelete
  8. Thanks, I wish I had found your site earlier! I would have saved some time. I wish others would post their solutions when they find answers to issue such as this.

    ReplyDelete
  9. Thanks! You saved me a lot of time.

    ReplyDelete
  10. Quick thanks

    ReplyDelete
  11. Thanks dude. This has been a long and frustrating battle (getting hibernate to work with itself - let alone with Glassfish)

    ReplyDelete
  12. Thank you! Worked!

    ReplyDelete
  13. Thank you, "asadmin restart-domain" worked for me!

    ReplyDelete
  14. Usually, when the system properties are changed, Glassfish prompts a "Restart Required" warning message. In this case it didn't and I assumed that it was OK with it. Apparently not! Thanks for the post!

    ReplyDelete
  15. Cheers for posting it.

    ReplyDelete
  16. Hehe - Nice! Saved me a lot of work. :)

    ReplyDelete
  17. Thanks! This did the trick for us too!

    ReplyDelete
  18. I added the property "PasswordCredential" to the list of properties, with the value being my database password. That worked for me. I'm using GlassFish Server Open Source Edition 3

    ReplyDelete
  19. Restarting Glassfish? That's not an answer because it doesn't actually figure out what was wrong. I had a problem where the password on my database was blank. In this case I needed to follow the directions here. https://blogs.oracle.com/vkraemer/entry/no_passwordcredential_found

    ReplyDelete
  20. Great job!! This worked for me. I had to change the url property and when I ran the application I received the "java.sql.SQLException: Error in allocating a connection. Cause: No PasswordCredential found" message. A simple restart fixed it. Thanks!!

    ReplyDelete
  21. thanks man... *facepalm to myself*

    ReplyDelete
  22. Thank you...

    ReplyDelete
  23. Restart for NoPasswordCredential? Yeah, right... Hey! It works!

    ReplyDelete
  24. Just setting the PasswordCredantial in the Pool-configuration fixed the problem without restart.

    ReplyDelete
  25. Awesome! Thanks! :)

    ReplyDelete
  26. Related Post explaining that a restart in fact is required if you update the connection pool settings.
    https://netbeans.org/bugzilla/show_bug.cgi?id=150051#c19

    ReplyDelete