WmDB to Oracle 10g

We have WM 7.1.2 running on AIX 5.3 with JVM 1.5 and trying to connect to an Oracle 10.2.0.4 on a separate AIX 5.3 box. We are using the the ojdbc14.jar for JVM 1.5 and necessary information are:
DB URL: jdbc:oracle:thin:@//hostname:1521/servicename
DB Driver: oracle.jdbc.driver.OracleDriver
When trying to connect, getting:
Could not connect: java.lang.NoClassDefFoundError: com.wm.app.b2b.server.ServerException
But interestingly JDBC Adapter connnection is working fine!
Can somebody please help to resolve it (we need WmDB)?
Thanks.