• Welcome to KonaKart Community Forum. Please login or sign up.
 

Turn On Debugging

Started by dnlsmns, August 20, 2010, 03:53:04 am

Previous topic - Next topic

dnlsmns

All the source files in konakart contain (Unknown Source) in Stack Trace.  Also, I cannot set breakpoints in these files.  How do I turn on debug mode ?

dnavarro

Hi Daniel,

   Look for "konakart-logging.properties" in "konakart\webapps\konakart\WEB-INF\classes".


   Best,

        David Navarro.

dnlsmns

konakart-logging.properties specifies the default properties of the log4j logger which determines what is displayed in the console.  What I'm not able to do is eclipse debugging (and I see "(Unknown Source)" in stack traces from many other posts so I know I'm not the only one).  Here is an example:

1) I set a break point in ShowCartItemsAction.java > the first line of code within the execute method.

2) I start tomcat NOTE: breakpoints work fine in KKGWTServiceImpl.java when tomcat starts (no problem there)

3) I navigate to http://localhost:8780/konakart , then navigate to the cart

4) The following exception occurs:

A default customer cannot be found. You must create one using the Admin App.
   at com.konakart.bl.OrderMgr.createOrderWithOptions(Unknown Source)
   at com.konakart.app.KKEng.createOrderWithOptions(Unknown Source)
   at com.konakart.app.KKEng.createOrderWithOptions(Unknown Source)
   at com.konakart.actions.ShowCartItemsAction.createTempOrder(Unknown Source)
   at com.konakart.actions.ShowCartItemsAction.execute(Unknown Source)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)

My concern is not so much about this exception, but the fact that I do not hit the breakpoint that I installed on ShowCartItemsAction. 

dnlsmns

Well it took me a while (I'm certainly no expert on configuring web apps) but here is how I did it.  First I noticed after looking at the MANIFEST.MF files associated with the .jars it seems that they are all compiled with debug set to false (ie, Java-Debug: off).  My assumption at that point was that my classpath must be using the jars rather than the source so I removed konakart_custom.jar from the WEB-INF/lib directory of my konakart webapp.  At this point I got a bunch of class not found errors.  To fix all the errors I simply copied the classes/ output folder into the konakart webapp and viola!