Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

3. Once your sure the last command did not fry anything (if you did replace all the Root files with the Root.bak files: find . -name Root -exec cp mv '{}.bak' {} \; ), run this:

No Format
find . -name Root -exec sed -r -i.bak2 '{s/sakai_anon_cvs/cvssakai@cvs\.sakaiproject\.org/}' {} \;

... to change the cvs metafile reference (sakai_anon_cvs) to a hard server reference and username which eclipse seems to prefer. Make sure that the dsa signature file has been added to eclipse (preferences->cvs...). Note that this clobbers the last .bak file mademakes Root.bak2 files as a fallback.

the extssh method is the only one I have successfully used which respects the dsa signature ... the ext method keeps asking for a password.

...

Debugging with Remote Tomcat

Info
tomcat plugin
tomcat plugin

I use the Sysdeo.com tomcat launcher plugin, which lets you reload specific webapp context aside from just start stop and restart tomcat from the IDE (log output goes to the eclipse console). It is available here: http://www.sysdeo.com/eclipse/tomcatPlugin.html

If you do this too, add the following as two seperate parameters to the JVM settings for starting tomcat (Window->Preferences->Tomcat->JVM Settings):

  1. -Xdebug
  2. -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
  • check the box "Don't run tomcat in debug mode" since the above accomplishes this (and the other way did' work for me).
  • Start tomcat using
    Code Block
    catalina.sh jpda start
    ..or using the tomcat plugin
  • Inside eclipse select Run->debug....select Remote Java Application and click 'New...'
  • Give the new debug config a name like 'Testing'
  • Set the host and port (default on tomcat is 8000), choose an eclipse project by using the browse button
  • source locations should be already be set to project source locations, so shouldn't need to change anything
  • Checkmark the 'Allow temination of remote VM'
  • click close and save changes

Test it out

  • Open the src/java/org/sakaiproject/portal/varuna/VarunaServlet.java file in the portal module and scroll to the doGet() method
  • double-click in the left margin (or use another method) to set a break-point near the beginning of the method
  • select Run->Debug... and select the newly created debug config.
  • change to the debug perspective if it does not happen automagically.
  • switch to a browser and login into to the sakai instance

...

to resume the thread rightclick the highlighted (paused) thread in the upper-left panel of the debug perspective and select Resume from the context menu. Alternatively, select the thread and press the F8 key. Remember the breakpoint will stop the server everytime until the breakpoint is cleared (double-click it) or eclipse stops running.

JSP plugin

A common problem with JSP/HTML editor plugins is SWT library issues. This is from a myeclipse faq (#9) (http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/htmleditor/index.html):

Note

this fixes startup problems with 'no more handles' msgs along with the exception spewage in the log file (<workspace>/.metadata/.log) shown in the error dialog.

Info

Why isn't there a Preview tab on Linux? / Why doesn't the Web Browser view work in Linux?

*
The Preview page and Web Browser view use the SWT Browser component for Eclipse which requires Mozilla 1.6 to be installed. Later versions of Mozilla aren't yet supported because of Eclipse Bug #75450 . If you have a later version of Mozilla installed and would like to enable the SWT Browser, you must install a copy of Mozilla 1.6. Here are the steps for installing Mozilla 1.6 on a Linux system.
*
1.
Download a mozilla-gtk2 build from :
http://www.scottbolander.com/mozilla-1.6-xft-gtk2-pc-linux.tar.bz2
This website hosts special mozilla installs that are built with gtk2 support, which is required by the SWT Browser. Note: Mozilla 1.6 builds from official mozilla.org site will not work as they are built with gtk1 support.
2.
Go to the directory that you want to install Mozilla 1.6. Good suggestions for this location are: /usr/local or /opt
3.
Unzip the mozilla file into the install directory:

  1. cd /usr/local
  2. tar jxvf /path/to/mozilla-1.6-xft-gtk2-pc-linux.tar.bz2
    4.
    Create the file /etc/gre.conf as shown below. Set the GRE_PATH to the location of the mozilla directory you just unzipped.
    /etc/gre.conf
    1.6
    GRE_PATH=/usr/local/mozilla
    5.
    As your normal user, check to see if your environment has the mozilla shell variable defined:
  3. echo $MOZILLA_FIVE_HOME
    6.
    If that returns a value, you will have to unset this variable before running eclipse. You can do that by running the following shell commands each time to start eclipse.
  4. cd /path/to/eclipse_dir
  5. unset MOZILLA_FIVE_HOME
  6. ./eclipse
    7.
    Now the SWT Browser will look at your /etc/gre.conf file to find the location of the mozilla 1.6 libraries.

... but don't do all that. I just created the /etc/gre.conf file and for the path I used '/usr/lib/firefox-1.0.2' ... but you can also use anu mozilla 1.6+ path like RHWS 4's /usr/lib/mozilla-1.7.8