I finally got Oracle working!  It was a stupid mis-configuration in
hibernate.cfg.xml.

Originally, hibernate.cfg.xml had the following line:
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>

Because I was using Oracle, I changed it to:
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
The default hibernate.cfg.xml file had several commented-out lines about
Oracle configuration.  I activated these lines:
<property name="hibernate.connection.driver_class">
oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost
:1521:DEV9OT01</property>
<property name="hibernate.connection.username">USERNAME</property>
<property name="hibernate.connection.password">PASSWORD</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect
</property>

I should not have done this!  I just commented them out again and now Roller
is working fine with oracle.

Thanks for all your help everyone.  I'm going to post my Oracle experience
on the website.

Thanks
Mark

On 12/10/05, Mark Stralka <[EMAIL PROTECTED]> wrote:
>
> Is there anything I can do to get around this?  I want to use Roller at my
> company but they'll only use an Oracle db.  Thanks!
>
> On 12/10/05, Max Rudman < [EMAIL PROTECTED]> wrote:
> >
> >
> > On Dec 9, 2005, at 12:03 PM, Allen Gilliland wrote:
> >
> > > the strange part here is that the call to "if(rs.next())" seems to
> > > be true, but it seems that "rs.getString(1)" is returning null, so
> > > something must be wacky with the oracle driver?
> >
> > I've noticed this before. For some odd reason, Oracle (or the driver)
> > seems to return null even when the column value is blank. Ie: ''
> > returns null.
> >
> > Max
> >
> >
> >
> >
> >
> >
> > >
> > > we can add a null check inside that if statement so that it doesn't
> > > try and parse the string if the value is null, but that shouldn't
> > > be happening anyways.
> > >
> > >>
> > >> If you want to get rid of that startup exception, try adding a
> > >> version
> > >> number to your database.
> > >> Stop Roller, run the following  insert statement in Oracle, restart
> > >> Roller.
> > >>
> > >> insert into roller_properties (name,value)
> > >> ('roller.database.version ','200');
> > >
> > > this is a good work around, but we can't expect users to do this,
> > > so we still need to fix this.
> > >
> > > -- Allen
> > >
> > >>
> > >> What happens when you try to add a user? What error message do you
> > >> get?
> > >> Do you get a stack trace in roller.log or catalina.out?
> > >>
> > >> - Dave
> > >>
> > >>
> > >> On Dec 8, 2005, at 2:38 PM, mstralka (sent by Nabble.com) wrote:
> > >>
> > >>>
> > >>> Hi,
> > >>> I'm trying to make Roller work with Oracle.  Has anyone done this
> > >>> successfully?  I'm having the following problems:
> > >>> I installed roller 2.0 on:
> > >>> Windows 2000 SP4
> > >>> Tomcat 5.0.28
> > >>> Oracle 9.2 (on remote server)
> > >>>
> > >>> I copied Oracle's classes12.jar to CATALINA_HOME\common\lib
> > >>>
> > >>> I created the tables in the schema and database, and the oracle user
> > >>> has full permissions to it.
> > >>> If I go to http://localhost:8090/roller/dstest.jsp, it says it was
> > >>> successful, but when I start Tomcat, I see the following error in
> > >>> roller.log, and I can't register a new user in the database:
> > >>> INFO  2005-12-08 14:36:27,460 RollerConfig:  - successfully loaded
> > >>> default properties.
> > >>> INFO  2005-12-08 14:36:27,460 RollerConfig:  - no custom properties
> > >>> file found in classpath
> > >>> INFO  2005-12-08 14:36:27,470 RollerConfig:  - no custom properties
> > >>> file specified via jvm option
> > >>> ERROR 2005-12-08 14:36:28,561 UpgradeDatabase:upgradeDatabase -
> > >>> Couldn't lookup current database version
> > >>> java.lang.NumberFormatException: null
> > >>>     at java.lang.Integer.parseInt(Integer.java:436)
> > >>>     at java.lang.Integer.parseInt(Integer.java:518)
> > >>>     at
> > >>> org.roller.business.utils.UpgradeDatabase.upgradeDatabase
> > >>> (UpgradeDataba
> > >>> se.java:68)
> > >>>     at
> > >>> org.roller.presentation.RollerContext.upgradeDatabaseIfNeeded
> > >>> (RollerCon
> > >>> text.java:304)
> > >>>     at
> > >>> org.roller.presentation.RollerContext.contextInitialized
> > >>> (RollerContext.
> > >>> java:177)
> > >>>     at
> > >>> org.apache.catalina.core.StandardContext.listenerStart
> > >>> (StandardContext.
> > >>> java:3827)
> > >>>     at
> > >>> org.apache.catalina.core.StandardContext.start(StandardContext.java:
> > >>> 4343)
> > >>>     at
> > >>> org.apache.catalina.core.ContainerBase.addChildInternal
> > >>> (ContainerBase.j
> > >>> ava:823)
> > >>>     at
> > >>> org.apache.catalina.core.ContainerBase.addChild (ContainerBase.java:
> > >>> 807)
> > >>>     at
> > >>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:
> > >>> 595)
> > >>>     at
> > >>> org.apache.catalina.core.StandardHostDeployer.addChild
> > >>> (StandardHostDepl
> > >>> oyer.java:903)
> > >>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >>>     at
> > >>> sun.reflect.NativeMethodAccessorImpl.invoke
> > >>> (NativeMethodAccessorImpl.ja
> > >>> va:39)
> > >>>     at
> > >>> sun.reflect.DelegatingMethodAccessorImpl.invoke
> > >>> (DelegatingMethodAccesso
> > >>> rImpl.java :25)
> > >>>     at java.lang.reflect.Method.invoke(Method.java:324)
> > >>>     at
> > >>> org.apache.commons.beanutils.MethodUtils.invokeMethod
> > >>> (MethodUtils.java:
> > >>> 216)
> > >>>     at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:
> > >>> 256)
> > >>>     at org.apache.commons.digester.Rule.end(Rule.java:276)
> > >>>     at org.apache.commons.digester.Digester.endElement (
> > Digester.java:
> > >>> 1058)
> > >>>     at
> > >>> org.apache.catalina.util.CatalinaDigester.endElement
> > >>> (CatalinaDigester.j
> > >>> ava:76)
> > >>>     at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
> > >>> Source)
> > >>>     at
> > >>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement
> > >>> (Un
> > >>> known Source)
> > >>>     at
> > >>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> > >>> $FragmentContentDi
> > >>> spatcher.dispatch(Unknown Source)
> > >>>     at
> > >>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
> > >>> (Unkn
> > >>> own Source)
> > >>>     at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
> > >>> Source)
> > >>>     at org.apache.xerces.parsers.XML11Configuration.parse (Unknown
> > >>> Source)
> > >>>     at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> > >>>     at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
> > >>> Source)
> > >>>     at org.apache.commons.digester.Digester.parse(Digester.java
> > :1567)
> > >>>     at
> > >>> org.apache.catalina.core.StandardHostDeployer.install
> > >>> (StandardHostDeplo
> > >>> yer.java:488)
> > >>>     at
> > >>> org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
> > >>>     at
> > >>> org.apache.catalina.startup.HostConfig.deployDescriptors
> > >>> (HostConfig.jav
> > >>> a:483)
> > >>>     at
> > >>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:
> > >>> 427)
> > >>>     at org.apache.catalina.startup.HostConfig.start (HostConfig.java
> > :
> > >>> 983)
> > >>>     at
> > >>> org.apache.catalina.startup.HostConfig.lifecycleEvent
> > >>> (HostConfig.java:
> > >>> 349)
> > >>>     at
> > >>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
> > >>> (LifecycleS
> > >>> upport.java:119)
> > >>>     at
> > >>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java :
> > >>> 1091)
> > >>>     at org.apache.catalina.core.StandardHost.start(StandardHost.java
> > :
> > >>> 789)
> > >>>     at
> > >>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java :
> > >>> 1083)
> > >>>     at
> > >>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:
> > >>> 478)
> > >>>     at
> > >>> org.apache.catalina.core.StandardService.start (StandardService.java
> > :
> > >>> 480)
> > >>>     at
> > >>> org.apache.catalina.core.StandardServer.start(StandardServer.java:
> > >>> 2313)
> > >>>     at org.apache.catalina.startup.Catalina.start (Catalina.java
> > :556)
> > >>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >>>     at
> > >>> sun.reflect.NativeMethodAccessorImpl.invoke
> > >>> (NativeMethodAccessorImpl.ja
> > >>> va:39)
> > >>>     at
> > >>> sun.reflect.DelegatingMethodAccessorImpl.invoke
> > >>> (DelegatingMethodAccesso
> > >>> rImpl.java:25)
> > >>>     at java.lang.reflect.Method.invoke (Method.java:324)
> > >>>     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java
> > :287)
> > >>>     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java
> > :425)
> > >>> WARN  2005-12-08 14:36:29,723 Configurator:configure - No
> > >>> configuration found. Configuring ehcache from ehcache-failsafe.xml
> > >>> found in the classpath:
> > >>> file:/C:/tomcat/work/Catalina/localhost/roller/loader/ehcache-
> > >>> failsafe.xml
> > >>> INFO  2005-12-08 14:36:30,394 RollerFactory:setRoller - Using Roller
> > >>> Impl: org.roller.business.hibernate.HibernateRollerImpl
> > >>> INFO  2005-12-08 14:36:30,875 ThemeManagerImpl:  - Loaded 16 themes
> > >>> from disk.
> > >>> INFO  2005-12-08 14:36:31,496 IndexManagerImpl:  - search
> > >>> enabled: true
> > >>> INFO  2005-12-08 14:36:31,496 IndexManagerImpl:  - index dir:
> > >>> C:\Documents and Settings\MSTRALK2\roller_data\search-index
> > >>> INFO  2005-12-08 14:36:31,736 RollerContext:setupPingQueueTask -
> > >>> Scheduling ping queue task to run at 5 minute intervals.
> > >>> INFO  2005-12-08 14:36:31,746 RollerContext:setupScheduledTasks -
> > >>> Setting daily task: org.roller.presentation.TurnoverReferersTask
> > >>> INFO  2005-12-08 14:36:33,288 LoginServlet:init - secure login
> > >>> enabled: false
> > >>> INFO  2005-12-08 14:36:33,288 LoginServlet:init - secure login port:
> >
> > >>> 443
> > >>>
> > >>>
> > >>>
> > >>> Here is my roller.xml file in CATALINA_HOME\conf\catalina\localhost
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>        factory
> > >>>        org.apache.commons.dbcp.BasicDataSourceFactory
> > >>>
> > >>>
> > >>>        driverClassName
> > >>>        oracle.jdbc.OracleDriver
> > >>>
> > >>>
> > >>>        url
> > >>>        jdbc:oracle:thin:@REMOTE_SERVER:1521:OT35
> > >>>
> > >>>     username USERNAME
> > >>>     password PASSWORD
> > >>>     maxActive 20
> > >>>     maxIdle 3
> > >>>     removeAbandoned true
> > >>>     maxWait 3000
> > >>>
> > >>>
> > >>> --
> > >>> Sent from the Roller - User forum at Nabble.com:
> > >>> http://www.nabble.com/Error-trying-to-use-Oracle-
> > >>> t704830c12275.html#a1857268
> > >>
> >
> >
>

Reply via email to