天天看点

java.lang.UnsupportedOperationException: Not supported by BasicDataSource

Tomcat 6 does not allow applications to authenticate DataSource connections. You must make sure that you have supplied a username and password in the DataSource configuration in your Tomcat config files, for example:

<code>&lt;</code><code>Resource</code> <code>name</code><code>=</code><code>"jdbc/confluence"</code> <code>auth</code><code>=</code><code>"Container"</code> <code>type</code><code>=</code><code>"javax.sql.DataSource"</code>

<code>   </code><code>username</code><code>=</code><code>"cmiller"</code>

<code>   </code><code>password</code><code>=</code><code>"mysecret"</code>

<code>   </code><code>driverClassName</code><code>=</code><code>"org.postgresql.Driver"</code>

<code>   </code><code>url</code><code>=</code><code>"jdbc:postgresql://localhost/t6test"</code>

<code>   </code><code>maxActive</code><code>=</code><code>"20"</code><code>/&gt;</code>

You should then:

Shut down Confluence

Open the <code>confluence-cfg.xml</code> file in your Confluence Home directory in a text editor

Delete the following lines if you find them:

&lt;property name="hibernate.connection.password"&gt;your-password&lt;/property&gt;

&lt;property name="hibernate.connection.username"&gt;your-username&lt;/property&gt;

Save the modified file

Restart Confluence

本文转自yunlielai51CTO博客,原文链接:http://blog.51cto.com/4925054/1117453,如需转载请自行联系原作者