Presentation is loading. Please wait.

Presentation is loading. Please wait.

Coeus & Interactive Debugging David B. Harrison Brown University.

Similar presentations

Presentation on theme: "Coeus & Interactive Debugging David B. Harrison Brown University."— Presentation transcript:

1 Coeus & Interactive Debugging David B. Harrison Brown University

2 Crash Course “The problem with most crash courses is that they crash.” - Berel Wein

3 Presenter David B. Harrison Sr. Programmer / Analyst Brown University 9 months experience with Coeus BS and MS in Computer Science 20 years of Software Engineering

4 Crash Course in Interactively Debugging Coeus Why? Background Requirements Setting up Real-world examples

5 Why would you want to do that? Understanding the architecture Greater speed in solving problems Quickly test changes, fixes, or enhancements! Assist in making Institution-specific changes

6 Brown & Coeus Background Originally, Brown had a homemade system Coeus @ Brown since version 4.0 – Ben DiMolfetta assisted in original implementation Main Coeus developer/support for Brown left 11 months ago David Harrison joined Brown 9 months ago. Started learning Coeus at that time.

7 Inspiration Frustrated with lack of documentation Needed to understand the architecture Builds were preformed on remote servers. It took at least 15-20 minutes, just to see if a change compiled. This is a distraction. Using the right tools and local builds, should make the process much faster… – Goal: Stay in the “Zone”

8 Recent Experience Brown University recently completed major upgrade from Coeus 4.3.7 to 4.4.3 Migrated 4.3.x customizations to 4.4.x – Stored procedures – Blort-loads of XML / XSL templates The FOP Engine upgrade affected rendering of custom reports – Customized Email notifications

9 Approach Preferred “See One” “Do One” “Teach One” Actual Jump in Repeat – Drink coffee – Learn some – Do Some “Do or do not. There is no Try.” (Jedi Master Yoda) Deploy Huge sigh of relief! “Teach One!”

10 Getting to know you What is your primary role? – Most people said “Developer” or “Support” Do you use revision control for Coeus? – Approximately 3 out of 12 attendees use a revision control system. Do you use a change management or deployment system? – None.

11 Other Questions Planning to move to Coeus 4.4.4 or KC soon? Formal process in place for Upgrades & QA?

12 Required Software Java Ant Apache Tomcat Eclipse – Helios edition recommended A Database! – Oracle is recommended SQL / Schema explorer tool

13 Setting up! Environment Tomcat Eclipse

14 Pre-conditions Install the required software! Retrieve Coeus source Setup Tomcat Setup & test database connection Update the Coeus file We’re not going to cover this part. Ant build – Build from the command-line, first!

15 Environment Variables JAVA_OPTS = -verbose:class Coeus Lite / Server Debugging JPDA_ADDRESS = 11555 JPDA_TRANSPORT = dt_socket Coeus Premium debugging JAVAWS_TRACE_NATIVE = 1 JAVAWS_VM_ARGS = -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8989, server=y,suspend=n

16 Apache Tomcat Setup Define the data source Configure Tomcat Java options Copy libraries into Tomcat’s common lib folder

17 Apache Tomcat – Data Source In the Tomcat conf directory Add a Data Source Resource to the Context.xml file, There are other areas where you could define the data source. { "@context": "", "@type": "ImageObject", "contentUrl": "", "name": "Apache Tomcat – Data Source In the Tomcat conf directory Add a Data Source Resource to the Context.xml file, There are other areas where you could define the data source.", "description": "

18 Tomcat Java Options Load the Apache Tomcat “Configure Tomcat” program. Go to the Java tab Add the “Java Options” -Xdebug -Xrunjdwp:transport=dt_socket,address=11555,server=y,suspend=n -verbose:class


20 Tomcat Libraries Libraries copied into Tomcat’s common lib Tomcat-5.5\common\lib – ojdbc14.jar (If you’re using Oracle) – log4j-1.2.16.jar – coeusmail.jar

21 Eclipse Setup Now for some fun stuff! You do have Eclipse, right?

22 Setting up the Eclipse Project Import the Coeus project into Eclipse. We’ll use the Ant build script. Import the Coeus as a new Java Project File -> New -> Project

23 Setting up the Eclipse Project New Project -> Pick “Java Project from Existing Ant Buildfile”

24 Setting up the Eclipse Project Browse to find and select the Ant build file build.xml

25 Setting up the Eclipse Project It worked! Now there is a project called “Coeus4”

26 Right click & Select Properties Select the project

27 Setting up the Eclipse Project Properties for Coeus4 Java Build Path Libraries Add two external jars. (in the java JDK) – Jce.jar – Jsse.jar Ok!

28 Setting up the Eclipse Project Hopefully… you’ve got a Coeus4 project, with no build errors. What does that mean? How can I tell if there are no errors?

29 Like sources of build errors If you get compile errors about classes not being found… Import the source into the project…

30 Eclipse Debug Configurations We’ll setup to Debug Configurations – Coeus Lite (AKA “Server”) – Coeus Premium

31 Coeus Lite (Server) Debug Config Run -> Debug Configurations

32 Coeus4 Server Debug Config Find “Remote Java Application” Click on the “New” button to create a configuration

33 Coeus4 Server Debug Config Name: Coeus4-Server Connection Props – Host: localhost – Port to 11555

34 Coeus4 Server Debug Config On the Source Tab… Make sure that the source is selected

35 Coeus Premium Debug Config Similar to Lite/server Just use port 8989

36 Coeus.jnlp modification For debugging only, comment out the J2SE line, in Coeus.jnlp, Left in, it prevents the environment variables from being passed to the JVM. We need those! -->

37 Starting the Environment Start Coeus Lite – Run Tomcat, with the Coeus WAR deployed – The Default Coeus WAR is fine Start the Coeus Premium – Use ‘javaws’ to point at the local JNLP file. This will start it, and it will have the debugger enabled, listening on port 8989 – Javaws http://localhost:8080/coeus/coeus.jnlphttp://localhost:8080/coeus/coeus.jnlp

38 Starting the Environment (2) Eclipse – Start Eclipse – Attach debugger for Coeus Premium – Attach debugger for Coeus Lite

39 Debugging Techniques Break points and Tracing – “Andy, could you duplicate the issue you reported on my development system?” – “Sure…” – “Aha!!!” Stepping through code and looking at the call- stack Change a variable, during run time!

40 Debugging Techniques (2) Make a change to the source code and see how it affects the functionality, immediately. XML and XSL Capture XML and XSL Fix and Tweak XSL templates outside of Coeus Logs – Use the log to help find the right Class and line of code to investigate – Add more logging information to Coeus

41 Real World Examples Searching for a schedule, based on ‘*’ wild- card only fails with error message. – CoeusSearch.xml

42 Real World Examples (2) “Email Link not working” – BIT00175 – Link to Coeus not working in Email body in 4.4.3

43 What’s next? Coeus 4.4.4 Coeus 4.5 Kuali Coeus

44 Thanks! Brown University – Elaine Saklad – David Boylan – Chris Moore – Jennifer Quinn – Emily Derby – Andy Krajewski WinMill Software – Ben DiMolfetta (Introduction & collaboration) Rob Yetter Sabarinath Nair The whole Coeus Consortium

45 Links for Required Software Coeus Java JDK Eclipse IDE for Java EE Developers Eclipse IDE Apache Tomcat Ant

46 Optional Software Toad Extension for Eclipse Quest Toad Altova XML SpyXML Spy

Download ppt "Coeus & Interactive Debugging David B. Harrison Brown University."

Similar presentations

Ads by Google