Jeff Blattman wrote:
hi,
yes deleting from the db does work. but is just happens again at some
seemingly arbitrary creation point. can you give me an idea how roller
could fail to find an enabled row in the website table? any ideas?
hmmm, that definitely should not be happening. i know that in some
cases if a cascading style delete does not work properly then you can be
left with broken associations which causes things to break. i.e. if you
were to delete a user or category which had to be part of a foreign key
relationship to the weblog then it's possible that querying for the
weblog would break even though the row still exists.
are you possibly deleting something else before removing the website
which could be causing a problem?
is it possible to delete a weblog from the roller UI? i could not find
the place. if not, i am wondering if the "remove weblog" functionality
is even exercised? also, if one cannot do it from the roller UI, is this
by design? should the admin API allow it? or maybe it should only allow
disabling a weblog?
yes, you can delete a weblog from the UI on the bottom of the
Preferences -> Settings page.
there was a little bit of debate about whether or not to allow the
deletion of weblogs, but at the end of the day we decided to support it.
could be dangerous, but only in the hands of an inappropriate/clueless
user.
-- Allen
Allen Gilliland wrote:
well, something bad must have happened. i would suggest deleting the
weblog from the db manually and doing a restart of the app.
-- Allen
Jeff Blattman wrote:
no, i did not make any changes to the db directly. to be clear, i see
the entry for the "deleted" weblog in the website table ... but
neither the roller UI or the admin api can see the weblog. i don't
see any differences between the rows for a valid, accessible website
and this phantom website in the website table.
so apparently, when i deleted this weblog, it wasn't completely
deleted. for that, i'm just doing:
UserManager.removeWebsite(wd);
roller.flush();
CacheManager.invalidate(wd);
?
thanks.
Allen Gilliland wrote:
did you delete from the database while the app was running? if so
then you could be running into an object level caching issue. you
can't delete things from the db without going through hibernate. a
restart should clear that up.
-- Allen
Jeff Blattman wrote:
hi allen,
i am calling UserManager.addWebsite() (HibernateUserManagerImpl).
after digging into it w/ the debugger, buried way down i see:
Duplicate entry 'funhouse' for key 2
funhouse is the blog handle. the blog does not exist. is there
someone i can dump from the db that would help?
Allen Gilliland wrote:
Jeff Blattman wrote:
attempting to use the admin api to create a weblog in roller 3.0 ...
the call gets down to
HibernateWeblogManagerImpl.getWeblogCategoryAncestorAssocs(), and
then gets a HibernateException on line 788, "return
criteria.list()". in the exception, the constraintName field is
null. the detailed message is: "could not exec jdbc batch job".
there wasn't anything more to the exception? that message is
pretty generic and i think Hibernate says it in all cases where it
fails on a query.
are you actually making a call to that method directly? or does
it happen indirectly through a different method call?
-- Allen
could anyone help narrow down the cause of this? i need some help
understanding what some of the possible causes might be.
? thanks.