It's all about the answers!

Ask a question

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


Kieran Walsh (132) | asked Sep 05, 3:02 p.m.
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.
 

One answer



permanent link
Ralph Schoon (55.3k23642) | answered Sep 09, 5:35 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 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. 


Comments
Kieran Walsh commented Sep 09, 10:08 a.m.

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.


Ralph Schoon commented Sep 09, 10:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.  


Kieran Walsh commented Sep 09, 11:25 a.m.

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


Ralph Schoon commented Sep 09, 12:33 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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


Ralph Schoon commented Sep 09, 12:49 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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.

Kieran Walsh commented Sep 09, 1:05 p.m.

 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.


Ralph Schoon commented Sep 10, 3:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Kieran Walsh commented Sep 10, 10:40 a.m.

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?


Ralph Schoon commented Sep 10, 11:00 a.m. | edited Sep 10, 11:03 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
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?

Kieran Walsh commented Sep 10, 11:27 a.m.

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 to post your answer.