Closed gmalmeida closed 4 years ago
Hi Gabriel, Your are missing the opencsv library from your class path during execution. The instructions are in lib/ReadmeMe.txt which says: WCL uses some libraries that don't ship with it to export and import.
To run the the work item exporter and importer
1.a Copy the library file opencsv.jar into /com.ibm.js.team.workitem.commandline/lib to be able to run from Eclipse. 1.b Place the library opencsv.jar into the folder lib in the WCL folder (see /com.ibm.js.team.workitem.commandline/ReadMe - HowToRelease.txt).
Rename the jar file e.g. commons-lang3-3.1.jar to commons-lang.jar
1.a Copy the library file commons-lang.jar into /com.ibm.js.team.workitem.commandline/lib to be able to run from Eclipse. 1.b Place the library commons-lang.jar into the folder lib in the WCL folder (see /com.ibm.js.team.workitem.commandline/ReadMe - HowToRelease.txt). Kirk WoodsSenior Managing ConsultantCognitive Applications Expert Lab Services+1 (816) 977-4781 Mobile ----- Original message -----From: Gabriel Almeida notifications@github.comTo: jazz-community/work-item-command-line work-item-command-line@noreply.github.comCc: Subscribed subscribed@noreply.github.comSubject: [EXTERNAL] [jazz-community/work-item-command-line] Exception in thread "main" java.lang.NoClassDefFoundError: com/opencsv/CSVWriter (#25)Date: Thu, Apr 23, 2020 7:14 AM Hi Ralph, I am getting this exception error while trying to generate a CSV export. Could you please advise? Thanks! —You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
Thanks for the info @kirkwoods, but it looks my problem is associated with something else. I have the libs installed in the lib folder as explained in the manual.
See below the command I am executing on my side to export the csv (I think my command is wrong).
"C:\Program Files\Java\jdk1.8.0_211\bin\java" -Djava.security.policy=rmi_no.policy -Djava.ext.dirs="./lib;D:\RTC-Client-Win64-6.0.6\RTC-Client-plainJavaLib-6.0.6;C:\Program Files\Java\jdk1.8.0_211/jre/lib/ext" -cp "./lib;D:\RTC-Client-Win64-6.0.6\RTC-Client-plainJavaLib-6.0.6" -jar wcl.jar "-exportworkitems" repository="https://alm.harman.com/ccm" user="XXX" password="XXX" projectArea="GTC Base Software (CCM)" query="[PQ] ELINA Capabilities or Solutions" [querysource="GTC Base Software (CCM)"] exportFile="export.csv" /allColumns /disableAttachmentExport [encoding="UTF_16LE"] [delimiter=","]
StartTime: Apr 24, 2020 8:07:01 AM
WorkItemCommandLine Version 5.0
Starting Team Platform ...
Executing command: exportworkitems
Exception in thread "main" java.lang.NoSuchMethodError: com.opencsv.CSVWriter.<init>(Ljava/io/Writer;CC)V
at com.ibm.js.team.workitem.commandline.commands.ExportWorkItemsCommand.createWriter(ExportWorkItemsCommand.java:326)
at com.ibm.js.team.workitem.commandline.commands.ExportWorkItemsCommand.exportCSV(ExportWorkItemsCommand.java:290)
at com.ibm.js.team.workitem.commandline.commands.ExportWorkItemsCommand.process(ExportWorkItemsCommand.java:239)
at com.ibm.js.team.workitem.commandline.framework.AbstractTeamRepositoryCommand.execute(AbstractTeamRepositoryCommand.java:88)
at com.ibm.js.team.workitem.commandline.WorkitemCommandLine.runCommands(WorkitemCommandLine.java:297)
at com.ibm.js.team.workitem.commandline.WorkitemCommandLine.run(WorkitemCommandLine.java:231)
at com.ibm.js.team.workitem.commandline.WorkitemCommandLine.main(WorkitemCommandLine.java:183)
Thanks!
No, like Kirk suggests, the error you have seems to be related to the wrong or a missing version of the opencsv library. I would recommend to read the readme for your version.
@rsjazz ,
I misunderstood the following statement and have downloaded the latest version, which is 5.1.
It is possible to use the latest version 4.3.2 from
Maybe you want to rephrase it to:
It is possible to use the later version 4.3.2 from
The command is running and I am waiting for the outputs. In case of any other issue, I will raise a separate ticket.
Thank you guys for your help! Your WCL will make my life much easier :)
Can you hint where the statement It is possible to use the latest version 4.3.2
comes from? I am unable to find it atm.
Hi Jazz Team,
I am getting this exception error while trying to generate a CSV export.
Could you please advise?
Thanks!