bigfleet wrote:
I had a problem that was extremely similar to this.
My UnsupportedOperationException was being thrown by PoolableDataSource because the createConnection(String uname, String password) method does nothing but throw this exception.
The source of this problem was that I was providing username and password information in both ( server.xml & web.xml ) AND ( hibernate.cfg.xml )
Providing the username and password in the latter will force the Commons DBCP pool to call the method mentioned above, using the connection propreties as parameters. If these properties do not exists, providing the username and password in the Tomcat XML files allows the PoolableDataSource object to look to its own fields to find the username and password-- and most importantly does not throw that UnsupportedOperationException.
My environment is almost completely different, and my error was happening on a different line, so this may not be your issue. If this doesn't work, try looking in the appropriate source file for the PoolingDataSource that you have.
Hi,
Thank you very much. This was exactly my problem. I had given username and password in both server.xml and hibernate.cfg.xml. I solved the problem by removing the username and password that I had given in the hivernate.cfg.xml. Now its working.
Thanks,