powered by Jive Software

Help, Problems with a custom database integration

Hi,

I’m having problems while trying to integrate the Openfire with a already existing Oracle database. I’ve already readed all of the guides and they haven’t solved my problem yet. These are my openfire.xml and and error.log:

<?xml version=“1.0” encoding=“UTF-8”?>

<!–

This file stores bootstrap properties needed by Openfire.

Property names must be in the format: “prop.name.is.blah=value”

That will be stored as:

<prop>

<name>

<is>

<blah>value</blah>

</is>

</name>

</prop>

Most properties are stored in the Openfire database. A

property viewer and editor is included in the admin console.

–>

<!-- root element, all properties must be under this element -->

<jive>

<adminConsole>

<!-- Disable either port by setting the value to -1 -->

<port>9090</port>

<securePort>9091</securePort>

</adminConsole>

<admin>

<!-- Use this section to define users that will have admin privileges. Below,

you will find two ways to specify which users are admins. Admins will

have access to the admin console (only local users) and may have also access

to other functionalities like ad-hoc commands. -->

<!-- By default, only the user with the username “admin” can login

to the admin console. Alternatively, you can specify a comma-delimitted

list usernames that should be authorized to login to the admin console

by setting the <authorizedUsernames> field below. -->

<authorizedUsernames>aa,admin</authorizedUsernames>

<!-- Comma-delimitted list of bare JIDs. The JIDs may belong to local

or remote users. -->

<!-- <authorizedJIDs></authorizedJIDs> -->

</admin>

<locale>zh_CN</locale>

<!-- Network settings. By default, Openfire will bind to all network interfaces.

Alternatively, you can specify a specific network interfaces that the server

will listen on. For example, 127.0.0.1. This setting is generally only useful

on multi-homed servers. -->

<!–

<network>

<interface></interface>

</network>

–>

<connectionProvider>

<className>org.jivesoftware.database.DefaultConnectionProvider</classN ame>

</connectionProvider>

<database>

<defaultProvider>

<driver>oracle.jdbc.driver.OracleDriver</driver>

<serverURL>jdbc:oracle:thin:@yxb:1521:ora92</serverURL>

<username>openfire</username>

<password>a</password>

<minConnections>3</minConnections>

<maxConnections>15</maxConnections>

<connectionTimeout>1.0</connectionTimeout>

</defaultProvider>

</database>

<setup>true</setup>

<jdbcProvider>

<driver>oracle.jdbc.driver.OracleDriver</driver>

<connectionString>jdbc:oracle:thin:@yxb:1521:ora92?user=student&passw ord=a</connectionString>

</jdbcProvider>

<provider>

<auth>

<className>org.jivesoftware.openfire.auth.JDBCAuthProvider</className& gt;

</auth>

<user>

<className>org.jivesoftware.openfire.user.JDBCUserProvider</className& gt;

</user>

</provider>

<jdbcAuthProvider>

<passwordSQL>SELECT password FROM myUser WHERE username=?</passwordSQL>

<passwordType>plain</passwordType>

</jdbcAuthProvider>

<jdbcUserProvider>

<loadUserSQL>SELECT name,email FROM myUser WHERE username=?</loadUserSQL>

<userCountSQL>SELECT COUNT(*) FROM myUser</userCountSQL>

<allUsersSQL>SELECT username FROM myUser</allUsersSQL>

<searchSQL>SELECT username FROM myUser WHERE</searchSQL>

<usernameField>username</usernameField>

<nameField>name</nameField>

<emailField>email</emailField>

</jdbcUserProvider>

</jive>

logs?

2008.02.19 11:12:33 [org.jivesoftware.openfire.auth.JDBCAuthProvider.getPasswordValue(JDBCAuthProvi der.java:254)

] Exception in JDBCAuthProvider

java.sql.SQLException: ???

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:222)

at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:944)

at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:195)

at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:287)

at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)

at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.jivesoftware.openfire.auth.JDBCAuthProvider.getPasswordValue(JDBCAuthProvid er.java:240)

at org.jivesoftware.openfire.auth.JDBCAuthProvider.authenticate(JDBCAuthProvider.j ava:116)

I’ve already downloaded the oracle driver and it’s inside the “openfire/lib” directory

Thanks

Hi,

I’ve never seen a connection string like “jdbc:oracle:thin:@yxb:1521:ora92?user=student&password=a” within Oracle.

You may want to change it to “jdbc:oracle:thin:student/a@yxb:1521:ora92”.

LG

JDBCAuthProvider.java:
connectionString = JiveGlobals.getXMLProperty("jdbcProvider.connectionString");  /* line 84 */
con = DriverManager.getConnection(connectionString); /* line 240 */