Windchill Method Server Debugging

In the last topic Windchill-Eclipse Project Setup we discussed how to setup a Windchill development environment setup in Eclipse.
Now we are adding one more thing in our development environment which will help in debugging Windchill method server in eclipse. Below settings are specific to Windchill 9.1 release.

  1. Set method server running port
            Take backup of /codebase/
In /codebase/ edit below property to add method server port and java memory allocations
name="" default="$("

This property pointing to different property again so ultimately we need change
name="" default="-XX:PermSize=72m -XX:MaxPermSize=200m"
Note: The “default” value can be different in your environment.

Change the default value as highlighted below
name="" default="-XX:PermSize=72m -XX:MaxPermSize=200m -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket, server=y, suspend=n, address=7777 -Djava.compiler=NONE"
  1. Run xconfmanager utility
          Run xconfmanager utility to propagate the xconf value
  1. Restart method server
Once you restart the method server, the method server will start running on port (7777) specified in the property above.
Note: You can check the method server running port in the method server logs. The very first line will show the method server running port.
  1. Eclipse debugging setup
    1. Click on Debug -> Debug configurations
    1. Navigate to “Remote Java Application” -> “New”
    2. Provide Name, Host and Port. Click on “Apply”.
    3. Click on “Debug”.
  1. If all the properties and setting specified are correct, you will see the eclipse started in debug mode (Note: Method server must be up and running)
  2. Later on you can start method server debugging from Debug drop down directly by selecting your newly created “Remote Java Application” under “Debug”

Now you can do Windchill method server debugging as normal as Java project in eclipse.

Windchill-Eclipse Project Setup

  • Open eclipse and select appropriate workspace
  • Create new Java project
    • Go to File -> New -> Project
    • Select “Java Project” and click on Next
    • Enter project name. Select appropriate JDK version depends on the Windchill version you are working on. Click on Finish.
    • The project is created with src folder
  • Right click on project and click on Properties.
    • Note: Navigating to project Properties needed many times. The shortcut is select project and use “Alt + Enter”. This will navigate you to directly project properties.
  • Navigate to Java Compiler -> Building -> Output folder
    • Uncheck the “Scrub output folders when cleaning projects” and click on OK
  • Click on Yes. This will rebuild the project to take the building setting in effect.
  • Add OOTB Windchill JARs and codebase folder in project workspace
    • Navigate to project properties.

Hope you used shortcut (Alt + Enter) to navigate to project properties

    • Navigate to Java Build Path -> Libraries
    • Click on “Add External Jars”. This will open a new selection window. Navigate to Windchill_Home/lib and select all available libraries in this folder and click OK.
    • Click on “Add External Jars”. This will open a new selection window. Navigate to Windchill_Home/codevase/lib and select all available libraries in this folder and click OK.
    • Click on “Add External Jars”. This will open a new selection window. Navigate to Windchill_Home/codebase/WEB-INF/lib and select all available libraries in this folder and click OK.
    • Click on “Add Class Folder”
    • Click on “Create New Folder”
    • Click on “Advanced”
    • Select the checkbox – “Link to folder in the file system”. Click on “Browse”.
    • Navigate to Windchill_Home and select “codebase”
    • Click OK. This will take some time to add the codebase into project workspace.
    • Verify that codebase folder is checked and click OK.
  • Setting build and class load orders
    • Select “Order and Export”
    • Select codebase folder and click on “Top”
    • Use Up/Down key to set the build order. All the source folders should have higher build order than codebase folder.
    • Verify and click OK
  • Final project will look as below

  • Navigate to Project menu and verify that the “Build Automatically” is checked. If not then check.

The Windchill eclipse project setup is done. Now you are set to browse the files available in workspace. E.g.
  • Browse (Ctrl + Shift + R) jsp files
  • Browse(Ctrl + Shift + R) properties files

Next topic: Windchill-Eclipse method server debugging

Windchill ... Where to Start?

Many guys who want or have to work on Windchill, the first question they usually ask is “Where to start?”.

The best training material for Windchill is PTC University courses. This is a web based training provided by PTC and need to be purchased.

As we can see, most of the companies working in Windchill are service industries. Rare to see those companies purchasing PTC University courses to train employees. Adding to this, these days the Windchill service industry following the pattern of hiring pure Java developers for Windchill customization and train them the Windchill framework. So all the responsibility goes to the senior person in the team who is most of time busy.
Now you are at dead end where we must start to explore Windchill yourself. Here are few pointers where we can start learning Windchill.

Windchill Help:
URL: http://hostname/Windchill-WHC/index.jspx
This the real material to learn the Windchill functionality. You can directly go to the home page and explore the area the you of interest. The other way is open help from the screen you are working on, this will take to the respective help topic.

Windchill Java/API Doc:
Folder: Windchill_Home/codebase/wt/clients/library/api/index.html
Web: http://hostname/Windchill/wt/clients/library/api/index.html

Windchill Examples:
Location: Windchill_Home/codebase/netmarkets/jsp/carambola/customization/examples/
Many examples found under his location.
In Windchill 10.x you can found this under Tools as well.

Top most Windchill Guides:
Windchill Customization Guide
Windchill Business Administration Guide
Windchill System Administration Guide

Resolution – ‘The Blogging’.

Hello All,

After a long time I am back to this page, feeling good.

It may be New Year, Christmas, Diwali or any special occasion, almost everybody decides some good to do in the year which we called as a ‘Year Resolution’. Even I am not escaped from this :)

So on my this birthday I opt a resolution – ‘The Blogging’.

As I am PLM professional/consultant, I decided to go with one special blogging topic which is ‘PTC Windchill’. Along with this topic, will add blogs on Java and non-technical as well. While sharing my knowledge, this will really help me to improve my skills as well.

Your love and support will keep me motivated to blog more and more.

Let’s go …