Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Upgrading to RC3

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The information in this topic is destined to people who is already using previous versions of JForum. You don't need to follow these steps if this is your first time with JForum

RC3 has a new search model, much faster than other versions, and there are some other minor database changes. Here are the steps:

:arrow: The avatar images now are in the directory called "avatar" inside "images" directory. If you have any, please copy to this dir.

:arrow: Backup your current database, for safety;

:arrow: Run the SQL script called db_rc3_update.sql, located in the root directory. This script will correct the tables keys and create the search tables;

:arrow: Now it is necessary to make the search index. You must download the file https://jforum.dev.java.net/files/documents/411/4047/SearchIndexer.class, and the run it. You call the program as:



Wait until the program prints "Done..." in the screen.

Now you have done all the steps necessary to upgrade the database.

The search indexer program source code is at https://jforum.dev.java.net/files/documents/411/4037/SearchIndexer.java.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It appears that this indexer must be run every time there is a new posting to the forum. Is this true? Or do posts update it as they are posted?

[originally posted on jforum.net by time]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

time wrote: Or do posts update it as they are posted?



Yes. The indexer is only needed when some change to the message is done "on hand", or when it is stored in the database via another way, like you did.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, this line points to



so much probably the program failed to init a connection with the database ( invalid host /username / password, for example, but can be anything else ) and "conn" object remained null. In fact, I should had check for null in the code.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i've tried running the indexer but get the following error

Exception in thread "main" java.lang.NullPointerException
at SearchIndexer.main(SearchIndexer.java:150)

what am i doing wrong ?

Cheers

Andrew
[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've checked the username, password, hostname etc, and still get the same error. The connection string is the same as the connection string in database.properties.

Do i need to have the mysql.jar in the class path for it to work ?


[originally posted on jforum.net by Anonymous]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anonymous wrote:I
Do i need to have the mysql.jar in the class path for it to work ?



Yes

Rafael
[originally posted on jforum.net by Rafael Steil]
 
reply
    Bookmark Topic Watch Topic
  • New Topic