You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Er...@sanofipasteur.com on 2006/06/23 17:23:19 UTC

Issue with Oracle 9.2 and Roller 2.3

Dear all,
 
No one can help me on the user list, and i think i'm really "near" from the code.
Here is the last mail i sent on the user list. I hope one of you will be able to help me.
 
Regards.
 
Eric
 
------------------------
 
first of all, i have found out that in the HibernateRefererManagerImpl.java class, there is a mistake with the oracle dialect (oracleDialect instead of oracle9Dialect).
This make the home page of Roller crash. If i change it in the hibernate.cfg.xml, a lot of other things don't work anymore.
Maybe this could be fixed in the next release?
 
I have a very strange issue with all the server properties loading code. The best way to see it is to go on the "server configuration" page.
This page loads blank (all fields empty). The database is ok.
I've forced roller to display the parameters list retrieved, and all parameters are set to null as you can see it here after :

-------- LOGS BEGIN -----------
{site.adminemail=site.adminemail=null, uploads.dir.maxsize=uploads.dir.maxsize=null, users.themes.path=users.themes.path=null, uploads.types.allowed=uploads.types.allowed=null, users.trackbacks.enabled=users.trackbacks.enabled=null, site.description=site.description=null, site.newsfeeds.maxEntries=site.newsfeeds.maxEntries=null, site.newsfeeds.defaultEntries=site.newsfeeds.defaultEntries=null, users.comments.enabled=users.comments.enabled=null, site.name=site.name=null, spam.blacklist=spam.blacklist=null, users.registration.url=users.registration.url=null, users.editor.pages=users.editor.pages=null, uploads.file.maxsize=uploads.file.maxsize=null, site.absoluteurl=site.absoluteurl=null, pings.suspendPingProcessing=pings.suspendPingProcessing=null, uploads.enabled=uploads.enabled=null, users.comments.emailnotify=users.comments.emailnotify=null, roller.database.version=roller.database.version=null, users.moderation.required=users.moderation.required=null, users.comments.escapehtml=users.comments.escapehtml=null, site.shortName=site.shortName=null, users.registration.enabled=users.registration.enabled=null, site.trackbackVerification.enabled=site.trackbackVerification.enabled=null, site.debugMode=site.debugMode=null, uploads.types.forbid=uploads.types.forbid=null, users.comments.autoformat=users.comments.autoformat=null, themes.customtheme.allowed=themes.customtheme.allowed=null, site.linkbacks.enabled=site.linkbacks.enabled=null}
--------- LOGS END ----------

I've switched log4j properties for hibernate to DEBUG, and indeed, we can see that somewhere the mapping must not be good, because for all values, i have the following logs :

-------- LOGS BEGIN -----------
DEBUG 2006-06-23 14:13:14,055 NullableType:nullSafeGet - returning 'pings.suspendPingProcessing' as column: name18_0_
DEBUG 2006-06-23 14:13:14,055 Loader:getRow - result row: EntityKey[org.apache.roller.pojos.RollerPropertyData#pings.suspendPingProcessing]
DEBUG 2006-06-23 14:13:14,055 Loader:loadFromResultSet - Initializing object from ResultSet: [org.apache.roller.pojos.RollerPropertyData#pings.suspendPingProcessing]
DEBUG 2006-06-23 14:13:14,055 AbstractEntityPersister:hydrate - Hydrating entity: [org.apache.roller.pojos.RollerPropertyData#pings.suspendPingProcessing]
DEBUG 2006-06-23 14:13:14,055 NullableType:nullSafeGet - returning null as column: value18_0_
DEBUG 2006-06-23 14:13:14,055 Loader:doQuery - result set row: 1
--------- LOGS END ----------

Please, heeeelp :)
 
Eric




-----Message d'origine-----
De : Eric.Bardoux@sanofipasteur.com [mailto:Eric.Bardoux@sanofipasteur.com <ma...@sanofipasteur.com> ]
Envoyé : vendredi 23 juin 2006 13:43
À : roller-user@incubator.apache.org
Objet : RE: Roller 2.3 - Oracle 9.2

Hi again.
For this exception, i've looked inside sources.
It appears that the dialect in the hibernate.cfg.xml file must be set to
org.hibernate.dialect.OracleDialect
And not to
org.hibernate.dialect.Oracle9Dialect

-> Mistake in HibernateRefererManagerImpl.java class that should be fixed?

Other issues (empty server configuration page) still exist.

Eric


-------------------------------------------------------------------------------------------
"Cette communication (y compris les pieces jointes) est reservee a l'usage exclusif du destinataire (des destinataires) et peut contenir des informations privilegiees, confidentielles, exemptees de divulgation selon la loi ou protegees par les droits d'auteur. Si vous n'etes pas un destinataire, toute utilisation, divulgation, distribution, reproduction, examen ou copie (totale ou partielle) est non-autorisee et peut etre illegale. Tout message electronique est susceptible d'alteration et son integrite ne peut etre assuree. Sanofi Pasteur decline toute responsabilite au titre de ce message s'il a ete modifie ou falsifie. Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et d'avertir l'expediteur de l'erreur de distribution et de la destruction du message. Merci.
This transmission (including any attachments) is intended solely for the use of the addressee(s) and may contain confidential information including trade secrets which are privileged, confidential, exempt from disclosure under applicable law and/or subject to copyright. If you are not an intended recipient, any use, disclosure, distribution, reproduction, review or copying (either whole or partial) is unauthorized and may be unlawful. E-mails are susceptible to alteration and their integrity cannot be guaranteed.Sanofi Pasteur shall not be liable for this e-mail if modified or falsified. If you are not the intended recipient of this e-mail, please delete it immediately from your system and notify the sender of the wrong delivery and the mail deletion. Thank you."
**********************************************************************


RE : Issue with Oracle 9.2 and Roller 2.3

Posted by Er...@sanofipasteur.com.
The issue is that the values in database are not blank... They have values (default one, written at the first start)


-------- Message d'origine--------
De: Max Rudman [mailto:mrudman@steelbrick.com]
Date: ven. 23/06/2006 21:17
À: roller-dev@incubator.apache.org
Objet : Re: Issue with Oracle 9.2 and Roller 2.3
 

On Jun 23, 2006, at 2:21 PM, Dave Johnson wrote:

> Anybody
> remember issues with Oracles and nulls?

Yes, Oracle seems to return NULL for blank values. So an empty string  
will actually return a NULL. I observed this behavior with Oracle  
10g. Not sure if it's the database or the driver.

Max


-------------------------------------------------------------------------------------------
"Cette communication (y compris les pieces jointes) est reservee a l'usage exclusif du destinataire (des destinataires) et peut contenir des informations privilegiees, confidentielles, exemptees de divulgation selon la loi ou protegees par les droits d'auteur. Si vous n'etes pas un destinataire, toute utilisation, divulgation, distribution, reproduction, examen ou copie (totale ou partielle) est non-autorisee et peut etre illegale. Tout message electronique est susceptible d'alteration et son integrite ne peut etre assuree. Sanofi Pasteur decline toute responsabilite au titre de ce message s'il a ete modifie ou falsifie. Si vous n'etes pas destinataire de ce message, merci de le detruire immediatement et d'avertir l'expediteur de l'erreur de distribution et de la destruction du message. Merci.
This transmission (including any attachments) is intended solely for the use of the addressee(s) and may contain confidential information including trade secrets which are privileged, confidential, exempt from disclosure under applicable law and/or subject to copyright. If you are not an intended recipient, any use, disclosure, distribution, reproduction, review or copying (either whole or partial) is unauthorized and may be unlawful. E-mails are susceptible to alteration and their integrity cannot be guaranteed.Sanofi Pasteur shall not be liable for this e-mail if modified or falsified. If you are not the intended recipient of this e-mail, please delete it immediately from your system and notify the sender of the wrong delivery and the mail deletion. Thank you."
**********************************************************************


Re: Issue with Oracle 9.2 and Roller 2.3

Posted by Max Rudman <mr...@steelbrick.com>.
On Jun 23, 2006, at 2:21 PM, Dave Johnson wrote:

> Anybody
> remember issues with Oracles and nulls?

Yes, Oracle seems to return NULL for blank values. So an empty string  
will actually return a NULL. I observed this behavior with Oracle  
10g. Not sure if it's the database or the driver.

Max


Re: Issue with Oracle 9.2 and Roller 2.3

Posted by Dave Johnson <sn...@gmail.com>.
Hi Eric,

Comments inline below...


On 6/23/06, Eric.Bardoux@sanofipasteur.com
<Er...@sanofipasteur.com> wrote:
> first of all, i have found out that in the HibernateRefererManagerImpl.java class, there is a mistake with the oracle dialect (oracleDialect instead of oracle9Dialect).
> This make the home page of Roller crash. If i change it in the hibernate.cfg.xml, a lot of other things don't work anymore.
> Maybe this could be fixed in the next release?

I wish I could be more helpful, but I don't use Oracle.

In Roller 2.3, the
HibernateRefererManagerImpl.getDaysPopularWebsites() method uses a
special case for the "OracleDialect" -- are you saying that we need
another special case for the "Oracle9Dialect"? As a workaround, you
could get the code for 2.3 change the one line that references
OracleDialect and then create a build. It's not that hard to do -- I
could talk you through it.

By the way, the code in
HibernateRefererManagerImpl.getDaysPopularWebsites() has been
rewritten in Roller 3.0 to use Hibernate instead of raw SQL -- that
should eliminate the Oracle problem that you mention becase we no
longer have any special cases for different types of databases.


>
> I have a very strange issue with all the server properties loading code. The best way to see it is to go on the "server configuration" page.
> This page loads blank (all fields empty). The database is ok.
> I've forced roller to display the parameters list retrieved, and all parameters are set to null as you can see it here after :

I'm not sure what's going on with properties, but I seem to remember
somebody saying that Oracle tests nulls in a special way. Anybody
remember issues with Oracles and nulls?

- Dave