Hello:
        Thank you again for the help, Dave.
        All is now well.
Just in case someone might benefit from them, a summary of the solutions follows.

----> The NullPointerException generated by attempts to administer bookmarks was eliminated in what I think of as two steps:

(1) Adding the missing "root" folder in the "folder" table for the blog from which it was somehow omitted at creation, or somehow deleted as a side effect of the prescribed upgrade process.
        
        The SQL involved was (in general):

INSERT INTO folder (id, name, description, websiteid) VALUES ('unique folder id value here','root','root','the web site id in question here');

In his reply to my original query, Dave explained how to get the required websiteid and use it to determine whether a blog's root folder is indeed missing, as it was in this case. Experience migrating blog content from other blog software to roller dictated care in the creation of a unique, roller-appropriate "folder id value." Creation and insertion of that heretofore absent value is, after all, the keystone here. Also, you probably noticed that the table's "parentid" and "path" values are omitted from the SQL above.
        Both are "NULL" by default.
        The default served my purposes here.

(2) Restoring the contents of the "folderassoc" table to its state at the time of still-unexplained deletion.

We recovered a mysqldump file of the "folderassoc" table from a recent backup of the database in question, and loaded it using the following (generalized) command:

    %shell bin/mysql -u username -p databasename < tabledump.sql

----> The IndexOutOfBoundsException generated by attempts to administer categories was eliminated in what I think of as one step:

        (1) Restoring the contents of the "weblogcategoryassoc" table.

As with the "folderassoc" table above, we extracted a mysqldump of the "weblogcategoryassoc" table for the database in question. The generalized SQL command required to load it was (again):

    %shell bin/mysql -u username -p databasename < tabledump.sql

In retrospect, I should have devoted more time to reading and enjoying the source code which emitted the two errors which confounded me. Had I done so as my first recourse, I would have understood each error and its associated stack trace as a meaningful error message.
        No excuse.
It does occur to me, and perhaps I am being unreasonable here, that those who have not been programming in Java for a few years might perhaps benefit from error messages which are somewhat more expressive in a literary sense. One reasonable rejoinder would be that if I feel strongly enough to voice that sentiment in public, I should offer code (which would be accepted or discarded as appropriate). Not talk. Point taken (falls silent ... turns to keyboard).

        Thank you again for your help.

Respectfully,

George Frink


On May 23, 2007, at 5:58 PM, Dave wrote:

Hi George,

Regarding your bookmarks, I see a null pointer exception at
BookmarksAction:313. That indicates that Roller is not able to find
the root bookmark folder for your blog.

I have no idea how your root folder could have disappeared. Your only
option at this point is probably to attempt to repair your folder and
folderassoc tables, but I would like to understand what went wrong.

Log into your Roller MySQL account and take a look at the folder data
for your blog.

First, find the id of your blog like so:
select id from website where handle='insert handle of your blog here';

Now, take a look at the folders defined in your blog, like so:
  select * from folder where websiteid='id of your blog from above';

And specifically, do you have a root folder? Here's one way to check that:
  select * from folder where name='root' and websiteid='id of your
blog from above';


Regarding your categories, please send the corresponding stack trace
-- you sent the bookmarks trace twice.

- Dave


Reply via email to