Hello Jazz examle
I follow all the instructions in: https://jazz.net/learn/LearnItem.jsp?href=content/docs/hello-jazz/index.html
I am working on M3 and when I run the junit test i get the following error: com.ibm.team.repository.common.TeamRepositoryException: The service 'com.example.hellojazz.common.service.IHelloJazzService' is not remotely accessible. at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.validateServiceCall(ServiceInterfaceProxy.java:169) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:79) at $Proxy8.sayHello(Unknown Source) at com.example.hellojazz.client.internal.HelloJazzClientLibrary.sayHello(HelloJazzClientLibrary.java:65) at com.example.hellojazz.client.tests.TestHelloJazz.testSayHello(TestHelloJazz.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:58) at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:533) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:155) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169) at org.eclipse.equinox.launcher.Main.main(Main.java:1144) |
7 answers
It looks like your service is inaccessible. Refer to the article "Running and Debugging a Jazz server for component development" (https://jazz.net/wiki/bin/view/Main/JazzServerRunAndDebug) for more information on running the server.
|
It looks like your service is inaccessible. Refer to the article "Running and Debugging a Jazz server for component development" (https://jazz.net/wiki/bin/view/Main/JazzServerRunAndDebug) for more information on running the server.
|
giladsa wrote:
I follow all the instructions in: Hi, I just downloaded the example code attached to HelloJazz and ran the TestHelloJazz launch included and I could not reproduce this problem. Did you start with the code download or are you building the example step-by-step from the instructions? If it's the latter note that there is a subsection called "Running the Test" and later another subsection called "Running the Test, Again". In the first one the test is expected to fail because the HelloJazz service plug-in has not been created yet. The test should succeed by the time you get to the "Running the Test, Again" subsection. Chris |
I download the code and run the example again and now i get this error:
junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at junit.framework.Assert.assertNotNull(Assert.java:217) at junit.framework.Assert.assertNotNull(Assert.java:210) at com.example.hellojazz.client.tests.TestHelloJazz.testSayHello(TestHelloJazz.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:58) at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethod(EclipseAppContainer.java:533) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:155) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169) at org.eclipse.equinox.launcher.Main.main(Main.java:1144) I assume that the problem is with the connection to the repository (I tried to work with the repositoryDB and with testDB that I created), because (IHelloJazzClientLibrary)repo.getClientLibrary(IHelloJazzClientLibrary.class) is null Of course I read and followed the instructions at: https://jazz.net/wiki/bin/view/Main/JazzServerRunAndDebug |
giladsa wrote:
I download the code and run the example again and now i get this Have you changed TestHelloJazz.java? For me the line in testSayHello() that calls repo.getClientLibrary(...) is line 40. HelloJazz is set up to use the url "local:" (what we call 'local-mode'). Have you changed this to use a remote-mode url like "http://localhost:9080/jazz" ? I tried running it in remote-mode (with a Jetty server launch that includes the HelloJazz plugins) and it worked for me.
But one thing that seems to contradict this hypothesis is that the call to login() seems to have worked. Near the end of login() are these two lines: repository.login(null); assertTrue(repository.loggedIn()); I would expect that assert to fail if there was a problem with the repository connection. It looks like your client library is somehow not registered. One thing you could try is to debug it and set a breakpoint in ClientLibraryFactoryRegistry in the method handleExtensionAdded(). I would set a breakpoint on this line: String interfaceClassName = descriptor.getInterfaceClassName(); and look at the interfaceClassName as each extension gets processed. You should see "com.example.hellojazz.client.IHelloJazzClientLibrary" among the many client libraries that get registered. If you don't see it than I wonder if you are hitting this breakpoint at all (is something preventing the ClientLibraryFactoryRegistry from registering any client libraries?) or perhaps just the IHelloJazzClientLibrary is missing (is there a problem with the extension in the client plugin?) If you do see the client library get registered then why would the call to repo.getClientLibrary() return null? Is it somehow getting unregistered? Sorry I can't be more helpful, but I think the best I can suggest is to debug and try to answer some of these questions. Chris |
Hi,
I am new to plugin development.I am trying to run hellojazz example in RTC2.0. I have setup the target platform and created two workspaces as described and I can see my server is running properly. But when I try to run the client, I get the following errors about plugin bundles. I checked the bundles and they are present in the given direcotry. Any help is appreciated. Errors: org.osgi.framework.BundleException: Exception in org.eclipse.equinox.internal.simpleconfigurator.Activator.start() of bundle org.eclipse.equinox.simpleconfigurator. Root exception: java.lang.IllegalStateException: Bundle "reference:file:/C:/Program Files/IBM/RTC2.0Client/jazz/client/eclipse/source/tests/eclipse/plugins/org.eclipse.update.configurator_3.2.201.R34x_v20080819.jar" has been uninstalled at org.eclipse.osgi.framework.internal.core.AbstractBundle.checkValid(AbstractBundle.java:1228) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:262) at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:257) at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.startBundles(ConfigApplier.java:317) at org.eclipse.equinox.internal.simpleconfigurator.ConfigApplier.install(ConfigApplier.java:86) at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:124) at org.eclipse.equinox.internal.simpleconfigurator.SimpleConfiguratorImpl.applyConfiguration(SimpleConfiguratorImpl.java:138) at org.eclipse.equinox.internal.simpleconfigurator.Activator.start(Activator.java:48) at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:1009) at java.security.AccessController.doPrivileged(AccessController.java:246) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1003) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:984) at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346) at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:355) at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1074) at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:616) at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508) at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:299) at org.eclipse.osgi.framework.internal.core.StartLevelManager.launch(StartLevelManager.java:247) at org.eclipse.osgi.framework.internal.core.SystemBundle.resume(SystemBundle.java:201) at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:644) at org.eclipse.osgi.framework.internal.core.OSGi.launch(OSGi.java:51) at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:313) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) ======================================================== Error 2: java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) ======================================================== Error 3: Bundle initial@reference:file:plugins/org.eclipse.equinox.simpleconfigurator_1.0.0.v20080604.jar/ is not active. |
Hi,
I am getting exception below in hello , some help is appreciated com.ibm.team.repository.common.transport.ServiceNotAvailableException: CRJAZ0106I The request for URL "/jazz/service/com.example.hellojazz.common.service.IHelloJazzService" was denied with a Not Available status. com.ibm.team.repository.common.transport.ServiceNotAvailableException: CRJAZ0106I The request for URL "/jazz/service/com.example.hellojazz.common.service.IHelloJazzService" was denied with a Not Available status. at com.ibm.team.repository.transport.client.ClientHttpUtil.executeHttpMethod(ClientHttpUtil.java:315) at com.ibm.team.repository.transport.client.RemoteTeamService.executeCancelableHttpMethod(RemoteTeamService.java:561) at com.ibm.team.repository.transport.client.RemoteTeamService.invokePost(RemoteTeamService.java:531) at com.ibm.team.repository.transport.client.RemoteTeamService.executeMethod(RemoteTeamService.java:471) at com.ibm.team.repository.transport.client.RemoteTeamService.invoke(RemoteTeamService.java:201) at com.ibm.team.repository.transport.client.ServiceInvocationHandler.invoke(ServiceInvocationHandler.java:43) at $Proxy13.sayHello(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(ServiceInterfaceProxy.java:149) at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:84) at $Proxy13.sayHello(Unknown Source) at com.example.hellojazz.client.internal.HelloJazzClientLibrary.sayHello(HelloJazzClientLibrary.java:65) at com.example.hellojazz.client.tests.TestHelloJazz.testSayHello(TestHelloJazz.java:49) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62) at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:618) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) |
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.