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

Why is my plugin for server side development giving the following error?

I am following the instructions of a video that is linked in "Learning to Fly: Getting started with the RTC java apis".  This video shows how to make a simple plugin and how to deploy it. 

I have created the plugin and added the following dependencies (as instructed): 
----
com.ibm.team.repository.common
com.ibm.team.repository.service
com.ibm.team.process.common
com.ibm.team.process.service
com.ibm.team.workitem.common
com.ibm.team.workitem.service
----

After checking Provision Status on the Web UI, this is the error message I receive:


CRJZS0436I Invalid bundle diagnosis:
CRJZS0436I Invalid bundle diagnosis:
CRJAZ1218E The "com.ibm.team.repotools.commands.remote" bundle with the id 469 is invalid, the bundle is not RESOLVED. Examine the the diagnostics that follow this message to determine why the bundle cannot be resolved.
com.ibm.team.repotools.commands.remote [469]
Unresolved requirement: Import-Package: com.ibm.team.repository.client

CRJAZ1218E The "com.ibm.team.repotools.commands.remote.stats" bundle with the id 470 is invalid, the bundle is not RESOLVED. Examine the the diagnostics that follow this message to determine why the bundle cannot be resolved.
com.ibm.team.repotools.commands.remote.stats [470]
Unresolved requirement: Require-Bundle: com.ibm.team.repotools.commands.remote
-> Bundle-SymbolicName: com.ibm.team.repotools.commands.remote; bundle-version="0.10.4000.v20171013_1943"; singleton:="true"
com.ibm.team.repotools.commands.remote [469]
Unresolved requirement: Import-Package: com.ibm.team.repository.client



I have noticed it says there is an unresolved requirement.  I do not have "com.ibm.team.repository.client" as a dependency for the plugin since I am only deploying to the server side and not the client side.
What are some suggestions on how to resolve this error.
 

0 votes



One answer

Permanent link

 Somewhere in your code, the plugin xml's, the plugin dependencies or somewhere else in a feature dependency, you have a reference to com.ibm.team.repository.client which is a client API. It is not available in the server, so you can not deploy.  


https://rsjazz.wordpress.com/2015/09/30/learning-to-fly-getting-started-with-the-rtc-java-apis/ suggests to do the extensions workshop. Watching the videos is a good idea to get a general overview, how that process works, but if you want to really do anything, execute the workshop. 

0 votes

Comments

Thank you I will double check the plugins and dependencies.


Also, I have been trying to setup the workshop, but the instructions for Linux seem to be non-existent.  The only instructions I found are for windows and while most of the steps are fairly identical, there are sections in the Extensions Workshop that require changes.  
For example, the 'WorkshopSetup.sh' file does not run properly, since the .sh file is not correctly setup to run in a Linux environment.  And no matter where I look, I cannot find the proper syntax for the WorkshopSetup.sh file.

The workshop was created for Windows. I added the shell script and it worked at some point. I know users have done it in Linux.


You can provide error messages and I will try to help. "does not run properly" does not help. I do not have access to a Linux system at the moment.  

Error message from WorkshopSetup.sh as downloaded from Jazz.net (directory/file Paths are correct):

./WorkshopSetup.sh: Line 9: fg: no job control
./WorkshopSetup.sh: Line 9: ./Data: is a directory.


The variables in WorkshopSetup.sh are called using the following format %{var}%.  I changed this to ${var}, since '.sh' files use ${var} instead of %{var}%.
Error after this change:
Error: Could not find or load main class ...PlainJavaAPI.com.ibm.icu_4.4.2.v20110823.jar
./WorkshopSetup.sh: Line 9: ./Data: is a directory

The whole WorkshopSetup.sh is completely broken. I will try to look at it tomorrow. I have a sh on my windows system.

The Sh should look more like

#!/bin/sh
JAVA_HOME=../JazzTeamServer/server/jre
PLAIN_JAVA=../PlainJavaAPI
REPOSITORY="https://localhost:9443/ccm"
USERID="myadmin"
PASSWORD="myadmin"
# export PASSWORD

$JAVA_HOME/bin/java -classpath ${PLAIN_JAVA}:. com.ibm.js.rtcext.serversetup.ServerSetup ${REPOSITORY} ${USERID} ${PASSWORD} "$@"

or the last line could look similar to

$JAVA_HOME/bin/java -cp ${PLAIN_JAVA}:.:./ -jar WorkshopSetup.jar ${REPOSITORY} ${USERID} ${PASSWORD} "$@"

Unfortunately the main class can not be found and I will have to spend some time finding out why.

 Yes, now my file looks like the first one you put.  Now I am also receiving that same error "main class can not be found".  

Thank you, let me know if you find out anything for this error.

Kieran, at the moment I can't get it to work. This might be related to how the JAR is build (on windows). The JAR works on Windows when started as batch but fails when I try to start it with SH or BASH on Windows. I used the sh and basch that comes with GIT.


All other JARs load, but the WorkshopSetup.jar, for some reason, does not. I will try to find time to look into that, but at the moment, I don't have too much of it.

Thank you for looking into this!  Back to the original question, I did a grep for '.client*' and found some occurrences in the following paths:

{current_workspace}/.metadata/.plugins/org.eclipse.pde.core/#.target/.pluginInfo
{current_workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.ibm.team.process.rcp.ui.prefs 
{current_workspace}/.metadata/.plugins/org.eclipse.runtime/.settings/org.eclipse.pde.core.prefs
Do you think this may have been caused because I have org.eclipse.core.runtime as an imported package instead of a required plugin?

No, the complaint is about com.ibm.team.repository.client 
I can't tell where that gets pulled in, sorry.

Also the grep should go across the source code in the projects and not across the workspace metadata and log information. You sure you loaded the eclipse projects into the eclipse workspace?

yes it goes through the source code as well, but it found no occurrence of any '.client' anywhere else.

I opened the eclipse workspace, then I did File -> Import-> Plugins and Fragments -> and added what was instructed in the Extension Workshop, which added the 2000ish plugins (com.ibm.team.repository.client is accessible through the plugins view), then accepted my Team invite, and then did File -> New -> plugin project.  After that I added the dependencies: com.ibm.team.repository.common, com.ibm.team.repository.service, com.ibm.team.process.common, com.ibm.team.process.service, com.ibm.team.workitem.common, com.ibm.team.workitem.service, and org.eclipse.org.runtime.

showing 5 of 10 show 5 more comments

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

Question asked: Sep 05 '19, 3:02 p.m.

Question was seen: 1,906 times

Last updated: Sep 10 '19, 5:36 p.m.

Confirmation Cancel Confirm