David,

Thank you much for your help.

I've followed your instruction by re-installing Tomcat, building Jetspeed
from the most recent source (12/4), by using your Torque.properties
(including variants), and running "ant unittest-security", which reports all
OK on HSQL. Further, I used the src/sql scripts for oracle (from the JS
source) to recreate the database in Oracle.

But jetspeed is insistent that, against Oracle:

---------------------------------------------------
Horrible Exception: java.lang.Error: Error in
BasePeer.initTableSchema(TURBINE_USER): There was no DataSourceFactory
configured for the connection default
        at
org.apache.jetspeed.om.security.turbine.BaseTurbineUserPeer.initClass(BaseTu
rbineUserPeer.java:154)
        at
org.apache.jetspeed.om.security.turbine.BaseTurbineUserPeer.<clinit>(BaseTur
bineUserPeer.java:128)
---------------------------------------------------

The Torque.properties now read
#--------------------------------------------------
torque.database.default.adapter=oracle

torque.dsfactory.default.factory=org.apache.torque.dsfactory.TorqueDataSourc
eFactory
torque.dsfactory.default.pool.defaultMaxConnections=10
torque.dsfactory.default.pool.maxExpiryTime=3600
torque.dsfactory.default.pool.connectionWaitTimeout=10
torque.dsfactory.default.connection.driver=oracle.jdbc.driver.OracleDriver
torque.dsfactory.default.connection.url=jdbc:oracle:thin:@<valid
host>:<valid port>:eza
torque.dsfactory.default.connection.user=<valid user>
torque.dsfactory.default.connection.password=<valid password>
#----------------------------------------------------


strangely, "ant unittest-security" test is saying
#----------------------------------------------------
    [junit] Failed to get anonymous user:
org.apache.jetspeed.services.security.RoleException: Failed to retrieve
roles : ORA-01722: invalid number

    [junit] org.apache.jetspeed.services.security.LoginException: Failed to
get anonymous user: org.apache.jetspeed.services.security.RoleException:
Failed to retrieve roles : ORA-01722: invalid number
    [junit]     at
org.apache.jetspeed.services.security.turbine.TurbineAuthentication.getAnony
mousUser(TurbineAuthentication.java:22
#----------------------------------------------------


I'm trolling through source right now, but you have any other suggestions?

Bill


-----Original Message-----
From: David Sean Taylor [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 2:57 PM
To: Jetspeed Users List
Subject: RE: Connecting Jetspeed to Torque to Oracle


> -----Original Message-----
> From: Bill Weir [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 05, 2002 2:21 PM
> To: [EMAIL PROTECTED]
> Subject: Connecting Jetspeed to Torque to Oracle
>
>
> Hi,
>
> I've spent two or three days trying to figure some of this stuff out, and
> I'd be *really* happy if someone could help me.
>
> Basically I'm trying to add a portlet in the style of DatabaseBrowserTest,
> but connecting to an Oracle database of my own instead of to the default
> HSQL coffees table. I don't mind if the user/turbine tables are
> kept in HSQL
> or Oracle.
>
> So here's what I've done succesfully:
> * Gotten the distributed jetspeed binary (of 12/3/02) up: it works fine.
> * Established a workable JDBC connection to the (remote) Oracle
> 732 database
> using Oracle JDBC drivers and JDK1.4
>
> But I'm having trouble connecting jetspeed-turbine to JDBC
> * I tried configuring the Torque.properties like this:
> --------------------
> database.default=default
> database.default.driver=oracle.jdbc.driver.OracleDriver
> database.default.url=jdbc:oracle:thin:@oraclehost:1521:eza
> database.default.username=<valid login>
> database.default.password=<valid password>
> database.adaptor=DBOracle
> #database.adaptor.DBOracle=oracle.jdbc.driver.OracleDriver
> database.adaptor.DBOracle=org.apache.turbine.util.db.adapter.DBOracle

The properties above are not from the webapp/WEB-INF/conf/Torque.properties
from Dec.02, 2002 build.
That's the old format from Torque. Go here to see a valid Torque.properties:

http://cvs.apache.org/viewcvs/jakarta-jetspeed/webapp/WEB-INF/conf/Torque.pr
operties?rev=1.7&content-type=text/vnd.viewcvs-markup

I just downloaded the Dec.02 build and verified. The lines above we're not
taken from the Dec.02 build of Torque.properties.

Recommend starting with a clean build.
Try makin these changes to the Torque.properties from the Dec.02, 2002
build.

----------------------------------------------------------------------------
-------

torque.database.default=default
###torque.database.default.adapter=hypersonic
torque.database.default.adapter=oracle

###torque.dsfactory.default.connection.driver = org.hsqldb.jdbcDriver
###torque.dsfactory.default.connection.url =
jdbc:hsqldb:${webappRoot}/WEB-INF/db/jetspeed
###torque.dsfactory.default.connection.user = sa
###torque.dsfactory.default.connection.password =

torque.dsfactory.default.connection.driver = oracle.jdbc.driver.OracleDriver
 torque.dsfactory.default.connection.url =
jdbc:oracle:thin:@nirvana:1521:bluesun3
### torque.dsfactory.default.connection.user =  jetspeed
### torque.dsfactory.default.connection.password = jetspeed

----------------------------------------------------------------------------
-------

I always test new drivers with the unit tests. (You need to dl the src to do
so.)
1. Setup up your Torque.properties.
2. Put your Oracle driver in the lib directory.
3. Run "ant unittest-security" from the build directory.



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to