Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Creating a Java jar results in: IllegalArgumentException: The type name Contributor and the namespace URI com.ibm.team.repository do not resolve to an IItemType.

Hi team,

I have created executable jar file which includes IBM RTC Client library 6.05. when I run the java class it works well but when i make executable it throws error. please kindly suggest .

 java -jar deletedef.jar  https://abc.net/ccm  uid  passwd  builddef


log4j:WARN No appenders could be found for logger (com.ibm.team.repository.common.internal.util.InternalTeamPlatform).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:447)
        at com.ibm.team.repository.client.internal.TeamRepositoryService.createSharedTeamRepository(TeamRepositoryService.java:526)
        at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:113)
        at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:132)
        at DeleteBuilddefinition.login(DeleteBuilddefinition.java:203)
        at DeleteBuilddefinition.main(DeleteBuilddefinition.java:70)
Caused by: java.lang.IllegalArgumentException: The type name Contributor and the namespace URI com.ibm.team.repository do not resolve to an IItemType.

1 vote



2 answers

Permanent link

 Hi , i get the same issue, have u resolved it?

0 votes

Comments

Note, it is not a good idea to ask a question as an answer to a 4 years old question. You should create your own question instead. 

 Hi Ralph. when i try to run

java -Djava;ext;dirs=C:\swdtools\JDK1.8.0_66-X64\jre\lib\ext:snippets:. snippets.Snippet1

and show me
ext : The term 'ext' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:13
+ java -Djava;ext;dirs=C:\swdtools\JDK1.8.0_66-X64\jre\lib\ext:snippets ...
+             ~~~
    + CategoryInfo          : ObjectNotFound: (ext:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

dirs=C:\swdtools\JDK1.8.0_66-X64\jre\lib\ext:snippets:. : The term
'dirs=C:\swdtools\JDK1.8.0_66-X64\jre\lib\ext:snippets:.' is not recognized as the name of a .


what is mistake of the command? i am on the windows platform.

You have to compile the snippets before you can run the Java snippets. The -Djava.ext.dirs in your call is typed incorrectly. replace the ; with .


This is an example how I run the WCL with the plain Java Client Libraries on Windows:

C:\Temp\WCL>"C:\IBM\Java80\bin\java" -Djava.ext.dirs="C:\IBM\Java80/lib/ext;C:\IBM\Java80/jre/lib/ext;./lib;C:\RTC6061Dev\Installs\PlainJavaAPI" -cp "./lib;C:\RTC6061Dev\Installs\PlainJavaAPI" -jar wcl.jar

 Please note that the order of the ext dirs is sensitive. If you get it wrong, it might work if you are lucky or it might not work.


Permanent link

 This has always worked for me provided I made sure that

  1. A correct Java Version was used to make the JAR file
  2. The Java extdirs were provided as described in the README.TXT included in the snippets folder of the plain java client libraries.

0 votes

Comments

See https://github.com/jazz-community/work-item-command-line/tree/master/com.ibm.js.team.workitem.commandline/src/main/resources/scripts for working scripts to call such an application. A description how to create the runnable JAR file is included in the project.


Also note that compressing the required libraries in a JAR file causes them to be uncompressed when calling the JAR which can add considerable amount of time EACH time the jar is executed. 

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,125
× 89

Question asked: Aug 31 '18, 9:37 a.m.

Question was seen: 1,992 times

Last updated: Feb 09 '22, 4:00 a.m.

Confirmation Cancel Confirm