-1

I am trying to create a custom export template for excel export of workitems in my polarion project but every time I upload a template it and when I select that template at the time of exporting it It shows me this error: "Server error: java.lang.NullPointerException". I tried to even make export template by using existing templates but it still shows me the same error.

  • and where is your code? – OldProgrammer Jan 13 '23 at 16:14
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jan 14 '23 at 02:15
  • Sorry! I can not share the code as it is companies work and is confidential. – harry potter Jan 14 '23 at 03:50
  • There shouldn't be any "code" involved. A "NullPointerException" as mentioned in the question is typically thrown by Polarion when a field is requested that doesn't exist in the configuration files. @harry-potter you may want to add your -custom-fields.xml configuration file so we can see how the Work Item is configured. Please also add the log entries pertaining to the error. Go to your most recent polarion/data/logs/main/log4j-202301*.log file and search for "NullPointerException". Copy and paste here a few lines surrounding that message. – Boaz Jan 14 '23 at 14:39

1 Answers1

0

To save yourself from trouble, it is easiest to make the template starting from one of the provided templates. Make sure you don't delete the sheet titled "Polarion". In the "Export Work Items" dialog, use the "Show template" link to download an empty template.

In Excel, in the "Polarion" sheet and "Sheet1" sheet, configure your Work Item type and the fields that you want to export. Make sure all fields that you specify actually exist in your Work Item configuration. You may want to make changes step-by-step: make only a small change and test the template to make sure it still works, until you become more confident about the structure.

If you follow the instructions for your version of Polarion, it should work. See "Customize export templates for Microsoft Excel" in the Polarion help. On my system with 22R1, this is the direct help link: http://localhost/polarion/help/topic/com.polarion.xray.doc.user/guide/xid1747724.html?cp=0_3_18_10. The Polarion help for 19.2 is available online: https://docs.plm.automation.siemens.com/content/polarion/19.2/help/en_US/user_and_administration_help/administrators_guide/advanced_administration/customize_export_templates_for_microsoft_excel.html

If you've followed the instructions exactly and it still doesn't work, it's likely that something is wrong with your installation. You'll have to check the logs in C:\Polarion\data\logs\main\ to see what is going wrong.

Boaz
  • 58
  • 2
  • 6
  • By the way, if your export job starts correctly, you should find a log of your export job in your "Monitor" Job list. In the Polarion navigation bar, click on expand and then open the Monitor view and look for a log titled "Export". If there is a log, you may find the cause of the error there. – Boaz Jan 14 '23 at 15:08