LearningCommons/PachydermProject/SpontaneousDocumentation

From wiki.ucalgary.ca
< LearningCommons‎ | PachydermProject
Revision as of 16:11, 2 March 2006 by Dnorman (talk | contribs) (Reverted edit of Zvnoum, changed back to last version by Dnorman)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

WebObjects Java Debugging

Instructions online at [1]

To tap into jdb, add this to your Monitor settings for an app:

-Xdebug -Xrunjdwp:transport=dt_socket,address=8121,server=y,suspend=n

To fire up a debugger, do this:

$ jdb -attach 8121

Make sure the address (in this case, 8121) is the same in Monitor and the jdb call. And, it has to be unique for each java app, so increment as needed if there are more java apps running on the same box that you will want to insert a debugging session into.

Then, to get to the gooey core of the thread status:

suspend
where all
resume
quit

That will suspend all threads so you can dump their state, dump the state of all threads, and resume the app, and then quit the debugging session.

PreviewGen Thumbnail Location

defaults write NSGlobalDomain APPreviewRootPath /Library/WebServer/Documents/resources/apollo/previews

PreviewGen hostname Config

If PreviewGen isn't storing the correct URL for preview images, be sure the hostname for the server is correct. Add an entry to /etc/hostconfig like:

# Network configuration
HOSTNAME=www.pachyderm.org

This should ensure that the proper URLs are stored for image previews.

Note: You can test this before making it permanent, by using this:

sudo hostname www.pachyderm.org

Then, restart the WebObjects app(s) and see if it worked. If that solved the problem, make it permanent by adding the entry to /etc/hostconfig

MySQL UTF-8 Character Encoding

To make sure that the MySQL java connector uses UTF-8 when dealing with strings, set the connection URL thusly:

URL = "jdbc:mysql://localhost/assets_mav?useUnicode=true&characterEncoding=UTF-8";