Issues and question regarding "Hello Jazz"
Hello,
I've been following through the "Hello Jazz - How to Write a Simple Jazz Component" example using 0.6Beta2a, and I have the following issues (the first one is blocking me): 1) when I run the Junit test I get the following exception: java.lang.RuntimeException: No Server Container Descriptors were found on the classpath. Please check that the Jetty bundles are included in your launch or packaging. at com.ibm.team.repository.transport.client.TeamServerFactoryImpl.startLocalServer(TeamServerFactoryImpl.java:144) at com.ibm.team.repository.transport.client.TeamServerFactoryImpl.newTeamServerFromURL(TeamServerFactoryImpl.java:168) at com.ibm.team.repository.transport.client.TeamServerFactory.newTeamServerFromURL(TeamServerFactory.java:90) at com.ibm.team.repository.client.internal.TeamRepository.<init>(TeamRepository.java:269) at com.ibm.team.repository.client.internal.TeamRepositoryService.getTeamRepository(TeamRepositoryService.java:101) at com.ibm.team.repository.client.internal.TeamRepositoryService.getUnmanagedRepository(TeamRepositoryService.java:138) at com.example.hellojazz.client.tests.TestHelloJazz.login(TestHelloJazz.java:48) at com.example.hellojazz.client.tests.TestHelloJazz.setUp(TestHelloJazz.java:20) at junit.framework.TestCase.runBare(TestCase.java:128) 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:572) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:171) 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:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173) at org.eclipse.equinox.launcher.Main.main(Main.java:1148) In post "Problem during db Init" (https://jazz.net/forums/viewtopic.php?t=599&highlight=server+container+descriptors+classpath) the same exception is thrown, though in another context outside "Hello Jazz" example. Despite that, I tried to add to the Junit test plug-in dependencies the plug-in "com.ibm.team.server.embedded.jetty.auth" as suggested in that post, but I cannot find that plug-in (where is it in 0.6Beta2a?). Still, such plug-in is not mentioned in the "Hello Jazz" example page, ... Note: if I discard the plugins written as per "Hello Jazz" page, and use the ones in the companying zip file, I get the same error. What am I doing wrong here? I also observed that running through "Bonus Client UI Plug-in" I get a dialog with the same error ("No Server Container Descriptors were found on the classpath. Please check that the Jetty bundles are included in your launch or packaging.") when trying to connect to "local:" 2) in the "Workspace Setup - Preparing to Develop a Jazz Client or Jazz Component" page (https://jazz.net/learn/LearnItem.jsp?href=content/docs/workspace-setup/index.html), under "Development Eclipse Without Jazz", I cannot find the paths # \jazz\client\eclipse\jazz\common\eclipse # \jazz\client\eclipse\jazz\jdt\eclipse What should I do here for Eclipse? As such, I tried the example with Jazz Client (i.e., TeamConcert), but got the error above (point 1). 3) For testing the "Hello Jazz" example I've created a test database as suggested for setting up the workspace. I copied the teamserver.properties file into \jazz, and changed "db.jdbc.location" as com.ibm.team.repository.db.jdbc.location=D:\\jazz\\testDB (the two \\ are necessary for Windows, otherwise I get errors) and ran "D:\jazz\server\repotools -createTables ..." under D:\jazz. My question here is: should I in "VM arguments" (JUnit Plugin launch) use -Dcom.ibm.team.repository.db.jdbc.location=D:\\java\\testDB or -Dcom.ibm.team.repository.db.jdbc.location=${target_home}/../../testDB Thanks for your attention and help in advance, Best Regards Mrio |
4 answers
Hi Mrio,
On your first question, the quick summary is that the com.ibm.team.server.embedded.jetty.auth plugin was not included in the JazzTeamServer zip file for Beta2, instead it is in the JazzJUnitTests zip file. There is some more context in bug 40919 (https://jazz.net/jazz/web/projects/Jazz%20Project#action=com.ibm.team.workitem.viewWorkItem&id=40919). Also the setup doc that HelloJazz links needs to be updated (see bug 42726). For now there is better setup information on the wiki: https://jazz.net/wiki/bin/view/Main/ComponentDevelopmentSetup For HelloJazz you should only need to do the first part of that wiki (download and unzip the 5 zip files in the same location). I'd also encourage you to check out the other material on the wiki for component developers which is rooted at this topic: https://jazz.net/wiki/bin/view/Main/ComponentDevelopment Your second question is also I think due to the out-of-date setup guide. If you unzip the 5 zip files and then use the default target platform, HelloJazz should work. If you are really trying to use Eclipse (without Jazz) as the development environment then I'd recommend simply setting your target platform to the location of the unzipped Jazz Eclipse client (\jazz\client\eclipse) and the links files there should bring everything else into the target platform. On your third question about the database. Again, the setup doc is misleading here. HelloJazz doesn't have a storage model, so building a new database for it is not necessary and the default database (at \jazz\server\repositoryDB ) will work fine for running HelloJazz. The default VM arg in the TestHelloJazz.launch points to the default database using a relative path (and this works for me on Windows). -Dcom.ibm.team.repository.db.jdbc.location=${target_home}/../../server/repositoryDB But if you want to change this to point to the database you built and use an absolute path then I think you will need to use the double-backslash form as you mention (C:\\jazz\\testDB). Can you reply when you've had a chance to try these suggestions and let us know if you have success with HelloJazz? -- Chris Daly Jazz Component Development Team |
Hi Chris,
I've installed the remaining files and now I can run the Junit test and the gui for Hello Jazz without problems (both using Eclipse and Jazz clients). However, for some reason I did not understand the gui test worked for me under Jazz client on the first run, and in the following runs, it failed because it was trying to connect via HTTP to my Jazz server despite the fact that my connection was established as ADMIN@local as per the Hello Jazz Gui Test instructions. However, after some effort to resolve the issue, I remember the old computer trick: "leave the system, enter the system" (don't know if this is how you say in english). So what I did was to start Jazz (or Eclipse) with an entire new local disk workspace, and then things no longer got errors! It seems that both in Eclipse or Jazz when "unexplainable bugs" get the way this should be the first attempt to workaround/resolve them. In fact, one bug I got that I could resolve this way was that "Service 'com.example.hellojazz.common.service.IHelloJazzService' is not accessible remotely.". Unfortunately, despite many attempts to uncover what was happening, only a fresh new workpsace resolved these gotchas... Another 2 points I observed: a) in the "Error Log" view in Jazz there is lots of "Could not install bundle jazz/foundation/eclipse/plugins/org.apache.log4j_1.2.12 Bundle "org.apache.log4j" version "1.2.12" has already been installed from: update@../../source/server/eclipse/plugins/org.apache.log4j_1.2.12" messages alike. Is this normal for HelloJazz? b) despite the fact that when running the Hello Jazz Gui test I create a repository connection for "local:", which gets named "ADMIN@local" on the "Team Artifacts" view, when I run action "Call IHelloJazzService" the popup dialog is showing "repository URI: http://localhost:9080/jazz" instead of "repository URI: local:", which is what is referred in the "Hello Jazz" page. However, I'm running using "local:" ... Thank you for your help, Best regards Mrio PS: regarding the "Could not install bundle ..." messsages this is the session data on "Event Details" dialog (hope this helps somehow): eclipse.buildId=I20080110-1623 java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows Vista x86-32 j9vmwi3223-20070426 (JIT enabled) J9VM - 20070420_12448_lHdSMR JIT - 20070419_1806_r8 GC - 200704_19 BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=pt_PT Framework arguments: -product com.ibm.team.concert.product Command-line arguments: -product com.ibm.team.concert.product -data D:\jazz_workspaces\mario.guimaraes/../runtime-New_configuration -dev file:D:/jazz_workspaces/mario.guimaraes/.metadata/.plugins/org.eclipse.pde.core/HelloJazzClient/dev.properties -os win32 -ws win32 -arch x86 |
Hi Mrio,
The M5 release is this week, so I will review HelloJazz for M5 and correct it to clear up the confusion. This is being tracked now in workitems 44635 (for HelloJazz) and 42726 (for the workspace setup doc). At this point I'm not sure about your questions (a) and (b) ... I'll try to reproduce them and report on what I see in 44635. -- Chris Daly Jazz Component Development Team |
mario.guimaraes wrote:
... Hi Mrio, Here is a quick update on what I'm seeing in M5 with respect to your questions above. I do see messages in the Error Log like (a). The severity of these entries is "OK" (not error or warning). I think these are due to the way Jazz is packaged - we have duplicates of many of the plugins in the various zip files and they end up in the target platform. This will not cause a problem for running HelloJazz or the other tutorials. I am also seeing some warnings referring to bundles which could not be resolved. When I look at these it seems like they are mostly the result of test plugins (from the JazzJUnitTests-0.6M5.zip) which refer to other plugins that aren't present in the target platform. This shouldn't prevent any of the tutorial code from working. I also have an error in the error log, "Failed to locate teamserver.properties" from com.ibm.team.server.embedded.jetty.auth.Activator. I think you could satisfy this plug-in by adding an argument to the launch: -Dcom.ibm.team.server.configURL=/path/to/teamserver.properties But as with the others it isn't necessary to see the code work (you can login with ADMIN/ADMIN). If you were investigating the way that login and authentication work then this one might get more interesting, but we only use Jetty to run and test the server in development mode, so you would probably want to also look at how authentication works on the real server (there are other recent posts about this on the newsgroups. I do reproduce (b) and I filed bug 45676 (https://jazz.net/jazz/web/projects/Jazz%20Project#action=com.ibm.team.workitem.viewWorkItem&id=45676) about it. It is not a problem with HelloJazz. At this point I'm not sure if it's a bug or feature. You can subscribe to the workitem to follow the discussion. -- Chris Daly Jazz Component Development Team |
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.