4

I'm using Rational Application Developer to develop JSR168 portlets and deploy them to Websphere Portal 6.1. Now I want to debug them.

What I want to do is this workflow:

  1. Develop the portlet and set a breakpoint
  2. Start Portal in debug mode
  3. Deploy the portlet using the right mouse button context menu in RAD
  4. Open portal, create a page, place the portlet
  5. Start the action that should get me to the breakpoint
  6. Use the debug perspective in RAD to debug

Is it possible and is there a tutorial out there?

cringe
  • 13,401
  • 15
  • 69
  • 102
  • Forget this question, I solved that. – cringe Apr 01 '11 at 09:59
  • I don't know what went wrong the first time I tried it, but the portlet is now deployed and I can use my breakpoints. I stopped and restarted the server in debug mode, deployed my portlet again and it magically worked. – cringe Apr 01 '11 at 09:59
  • "The is no "forget this question" in StackOverFlow. Please mark one of the answers as accepted or provide one yourself or the question will stay unanswered. – erloewe Apr 08 '11 at 20:39
  • @erloewe you're right, I try to write a good answer now – cringe Apr 09 '11 at 13:36

3 Answers3

1

when using Rational Software Developer or Architect you need to clean the Websphere temp directories from time to time, both for portal and application server. Whenever something is strange, clean them.

Your workspace can be another problem. If clean temp directories doesn't work for me I create a new workspace. To reduce the configuration tasks for every new workspace I make a basic setup and chekc this in to subversion or GIT.

Nachtfrost
  • 447
  • 2
  • 5
1

The process of setting up a portal server on your local development machine is pretty straight forward. I didn't find the setup information at first, but they're available on IBMs website at https://www-304.ibm.com/support/docview.wss?uid=swg21330952 for Portal 6.1.

The installation took me a couple of hours, but after that you can add Portal in your Rational Application Developer and start it. That's painfully slow on an older machine, and you really want to have 4GB RAM for using it daily.

If Portal is running, right-click your portlet project and choose Deploy portlet... from the context menu. The portlet will be deployed.

I have to check, if @Nachtfrost is right with the cleanup of temp directories to re-enable the right-click deployment.

If right-click deployment does not work for you, try this approach: (this will not allow you to debug your portlets! It's only meant as a workaround to run them at all)

  1. Export your portlet as WAR (right-click the project, choose Export... from context menu
  2. Right-click Portal in your Servers view and choose Open Portal from the context menu
  3. Log in as admin, go to Administration
  4. Go to the web applications menu (I'm writing this from memory, so try to find the menu somewhere around the Portlet administration menu)
  5. Install your portlet from the WAR file, like any other web app
  6. Create a new page, place your portlet on that page
Community
  • 1
  • 1
cringe
  • 13,401
  • 15
  • 69
  • 102
0

I have a bad habit of giving my dev portal server a real DNS name via a hosts file, but letting it pick up the IP address from a DHCP server. Weeks go by, and DHCP hands out a new address - at which time portlet Debugging in Rational will not work. This is true even if the Server is configured for localhost in Rational.

If portlet debugging was working and has now stopped, make sure your DNS to IP is valid.

Julien Vivenot
  • 2,230
  • 13
  • 17