Closed Kittyfisto closed 4 years ago
I use and have tested WCL 5.0 with Java 1.8 and the 6.0.6 Plain Java Client Libraries. I have NOT deployed the additional libraries, so the lib folder is empty.
I execute wcl -printworkitem /ignoreErrors repository="https://clm.example.com:9443/ccm" user=ralph password=ralph id=31 /allColumns /suppressAttributeExceptions attachmentFolder="c:\aaTemp\export" /attribute_NamesAsIDs /asrt_ceclipse
My JAVA_HOME is
C:\temp\WCL>echo %JAVA_HOME%
C:\PROGRA-1\Java\JDK18-2.0_1 (replace the - with ~ github creates a strikethrough if you use the tilde twice)
C:\temp\WCL>java -version java version "1.8.0_221" Java(TM) SE Runtime Environment (build 1.8.0_221-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
My wcl.bat looks like this:
rem set JAVA_HOME=C:\PROGRA~1\Java\jre1.8.0_191 set PLAIN_JAVA=C:\RTC606Dev\Installs\PlainJavaAPI
rem In the -Djava.ext.dirs always keep the Java distribution in the front "%JAVA_HOME%\bin\java" -Djava.security.policy=rmi_no.policy -Djava.ext.dirs="%JAVA_HOME%/lib/ext;%JAVA_HOME%/jre/lib/ext;./lib;%PLAIN_JAVA%" -cp "./lib;%PLAIN_JAVA%" -jar wcl.jar %*
Note the following: I try to avoid installing anything in C:\Program Files\ where it is unavoidable. I DO NOT put libraries like the plain Java client libraries there. I avoid spaces in paths because they are a not working well as they are an afterthought in windows. In batch files I use the special directory path that omits the space in the name.
Not sure if the space is the issue.
Please note that I ran into an issue on a customer laptop with another tool and found that there are some constraints on the -Djava.ext.dirs where the order mattered on some machines - odd. I have not addressed that in the released WCL.
Please let me know if this is helpful.
Note: to be more specific, can you try if the changed order
-Djava.ext.dirs="%JAVA_HOME%/lib/ext;%JAVA_HOME%/jre/lib/ext;./lib;%PLAIN_JAVA%"
Fixes your problem?
@rsjazz : I am getting the following error when i try to run the importworkitem command Here is the command i use: wcl -importworkitems /importdebug user=* password= projectArea="abc" /importmultipass /ignoreemptycolumnvalues importFile="D:..\importData_Jazz.csv” /forcelinkcreation /enforceSizeLimits repository="repo link" mappingFile="D:..\MKSToJazz.xml" delimiter=","
Exception in thread "main" com.ibm.team.repository.common.transport.ServiceMethodInvocationError: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/Header at com.ibm.team.repository.transport.client.RemoteTeamService.getAppropriateException(RemoteTeamService.java:738) at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:572) at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:202) at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43) at com.sun.proxy.$Proxy3.describe(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:254) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:110) at com.sun.proxy.$Proxy3.describe(Unknown Source) at com.ibm.team.repository.client.internal.TeamRepository$4.run(TeamRepository.java:1592) at com.ibm.team.repository.client.internal.TeamRepository$4.run(TeamRepository.java:1) at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1355) at com.ibm.team.repository.common.transport.CancelableCaller.call(CancelableCaller.java:79) at com.ibm.team.repository.client.internal.TeamRepository.callCancelableService(TeamRepository.java:1350) at com.ibm.team.repository.client.internal.TeamRepository.internalLogin(TeamRepository.java:1585) at com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepository.java:674) at com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepository.java:647) at com.ibm.js.team.workitem.commandline.framework.AbstractTeamRepositoryCommand.login(AbstractTeamRepositoryCommand.java:189) at com.ibm.js.team.workitem.commandline.framework.AbstractTeamRepositoryCommand.execute(AbstractTeamRepositoryCommand.java:79) 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) Caused by: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/Header at com.ibm.team.repository.transport.client.RemoteTeamServer.getHttp3ResponseHeaders(RemoteTeamServer.java:2089) at com.ibm.team.repository.transport.client.RemoteTeamServer.executeMethod(RemoteTeamServer.java:1348) at com.ibm.team.repository.transport.client.RemoteTeamServer.executeMethod(RemoteTeamServer.java:1221) at com.ibm.team.repository.transport.client.RemoteTeamService.executeCancelableHttpMethod(RemoteTeamService.java:659) at com.ibm.team.repository.transport.client.RemoteTeamService.invokePost(RemoteTeamService.java:604) at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:547) ... 23 more Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.Header at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 29 more
I am using
java version "1.8.0_221" Java(TM) SE Runtime Environment (build 1.8.0_221-b32) Java HotSpot(TM) 64-Bit Server VM (build 25.221-b32, mixed mode)
wcl.bat set JAVA_HOME=C:\PROGRA~1\Java\jdk1.8.0_211 set PLAIN_JAVA=D:\Reporting\RTCWCL\PlainJavaAPI
rem "%JAVA_HOME%\bin\java" -Djava.security.policy=rmi_no.policy -Djava.ext.dirs="./lib;%PLAIN_JAVA%;%JAVA_HOME%/jre/lib/ext" -cp "./lib;%PLAIN_JAVA%" -jar wcl.jar % rem In the -Djava.ext.dirs always keep the Java distribution in the front "%JAVA_HOME%\bin\java" -Djava.security.policy=rmi_no.policy -Djava.ext.dirs="%JAVA_HOME%/lib/ext;%JAVA_HOME%/jre/lib/ext;./lib;%PLAIN_JAVA%" -cp "./lib;%PLAIN_JAVA%" -jar wcl.jar %
I can not reproduce the issue. Sorry, I can not help. Note that I have doubts that the paths in your parameters are correct, but that likely is not the issue.
Note that it a good practice to create your own issue, if you want to discuss something.
I am trying to get WCL to work but the tool keeps crashing:
The following is my wcl.bat file:
Whenever I invoke it with the following command:
> wcl.bat -printworkitem repository="..." user="..." password="..." id="581294
It crashes with the following output:
I've downloaded both opencsv 3.7 as well as apache commons-lang 3-3.1, renamed those files to opencsv.jar and commons-lang.jar and placed them in the /lib folder. Acoording to stackoverflow,
org.apache.commons.codec.binary.Base64.<init>
is part of the commons-lang project so I suspect I must be doing something wrong here but I can't find the problem.I've tried specifying both relative and absolute file paths to no avail.