aspose file tools*
The moose likes JForum and the fly likes jForum with oracle database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "jForum with oracle database" Watch "jForum with oracle database" New topic
Author

jForum with oracle database

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
how to configure connect jForum to Oracle Data base
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Oracle support is not 100% yet.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I would be very interested to integrate JForum into my webapp, *but* i definately need it to work with Oracle. For the sake of argument, and in order not to waste time trying to achieve the impossible, is it actually possible to configure (or hack) JForum to work with oracle?

thanks
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Just download the cvs version. It has support for Oracle.. almost everything work, being necessary to update one or two fields in the schema.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Thanks for the prompt response Rafael - i ll get the cvs version now - if it's not too much to ask, i would really appreciate any hint as to what fields or tables i would need to update in the schema )

thanks again
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Do a diff with mysql_db_struct.sql.. I'm not sure if there is in fact missing fields... I'm making the last steps for jforum 2.1 right now.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I have downloaded the latest version from cvs, followed the steps listed on the "manual installation" document (there were a couple of errors both in the table creation and population of data). Now, when i try to access the init page, i get an exception in the forumStartup (where the three models for forum, category and config are instantiated). I assume the queries are actually loaded from config/database/generic/generic_queries.sql ?? If that's the case, I dont think they would work with oracle as they are full of left joins which are not expressed in such a way (as in mysql). Any hints as to what i need to do? It would seem that i have to test every single query in that file..unless of course i m looking at the wrong file..
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
generic_queries.sql is always loaded, since it contains many queries that work for all databases. Ir order to use oracle, you should set the value of the key "database.driver.name" to to "oracle" in the file WEB-INF/config/SystemGlobals.properies.

I'm sure that the oracle implementation work for almost everything, since I tested it and fixed some bugs from the original implementation some weeks ago.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I have already done all the steps that you mention in the 'manual installation' guide - the globals file is configured, i ve created the schema, and imported the data (with a couple of errors as i said before) but it still doesnt work - the exception i get is 'Invalid column name' - and as i said, i manually tried the some of the queries in generic_queries.sql and they dont work...
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
In other words Rafael, a lot of the queries in 'generic_queries.sql' DO NOT work with oracle..Oracle doesnt support the LIMIT clause (mysql does) or, explicit LEFT joins etc..And this was all in the latest version from CVS..could it be that there is another file for oracle-specific queries? I cant see how this works for you (on oracle) as these queries are simply not valid..
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ah, ok.. "invalid column name" and "colum name nto found" is likely to happen, as I previously mentioned, the schema is not 100% compilant with what jforum does.

Maybe the queries you tried from generic_queries don't work because the tables you run the queries does not have all fields, for example. Also, please note that oracle specific queries are in the file oracle.sql.

So, now, in order to find which fields are missing in the oracle schema, you have basically two choices:

1) then you get an exception, see the stack trace and go to the class where it happened (will be something *Model.java) and look for the field beign accessed in that file. Of course you don't need this step if the error message includes what field cannot be found.
Then, just open mysql_db_struct.sql, look for the field's type and add it to the oracle structure.

2) Using mysql_db_struct.sql as start, compare it to oracle_db_struct.sql and add the missing fields.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Anonymous wrote:In other words Rafael, a lot of the queries in 'generic_queries.sql' DO NOT work with oracle..Oracle doesnt support the LIMIT clause (mysql does) or, explicit LEFT joins etc..And this was all in the latest version from CVS..could it be that there is another file for oracle-specific queries? I cant see how this works for you (on oracle) as these queries are simply not valid..


So, all these "non-oracle-compilant-queries" are in the file oracle.sql (web-inf/config/database/oracle/oracle.sql). JForum does a merge between generic_queries and the oracle ones.

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ah ok, i didnt know that there is an oracle specific queris file - excellent - i ll take care of it and perhaps i will be able to contribute my modifications
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
OK, i got it, the table JFORUM_CATEGORIES was missing the moderated field, which i added and so far it works..here's the new version in case you want to update the schema. I ll let you know if i find anything else wrong and i ll keep posting any modifications i make. Thanks again for your responses.

CREATE TABLE jforum_categories (
categories_id NUMBER(10) NOT NULL,
title VARCHAR2(100) DEFAULT '' NOT NULL ,
display_order NUMBER(10) DEFAULT 0 NOT NULL,
moderated number(10) default 0 not null,
PRIMARY KEY(categories_id)
);
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
That's great! I'll want the updated schema when you have it done!

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi

Are you saying that there will be no errors if we use Oracle as described by the above posts?

When will JForum officialy support Oracle?

Thanks,
Ashraf
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I can't say a precise date for Oracle support. Dmitiry made the first port in the last december (or even before it), but due to many changes in the core code, I haven't get enough time to test it right. (I guess Dmitiry is going to kill me hehehe).

So, using John Carmack words, I'll release it when it is done ;)

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
yes,i will try it
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Rafael Steil wrote:Oracle support is not 100% yet.

Rafael


Hi!

I find a mistake in file WEB-INF\config\database\oracle\oracle.properties
the thin connenction string is not in right format.

database.connection.dbname - is not necessary
must be rename
database.connenction.SID
this is the right name of this paramater

right thin connection string:
database.connection.string_thin=jdbc\racle\:thin\:${database.connection.username}/${database.connection.password}@${database.connection.host}\:${database.connection.port}\:${database.connection.SID}

and right OCI connection string
database.connection.string_local=jdbc\racle\ci\:${database.connection.username}/${database.connection.password}@${database.connection.SID}

This modify must be very useful from using Oracle db under Jforum.

I hope i help you!
lakisoft



[originally posted on jforum.net by lakisoft]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jForum with oracle database