It's all about the answers!

Ask a question

Component Creation Service Problems


Jamie Samdal (911) | asked Nov 10 '07, 4:26 p.m.
Hello,

I have been following all of the steps in the JazzTalk example, and I was able to get the JazzTalk packages to work and run. When I tried to run my own component that was essentially JazzTalk in a different package structure and with some things renamed, I ran into the following error concerning my Message and common package not resolving to an IItemType. This was after verifying that my IMessageBoardService did show up on http://localhost/8080/jazz, and trying to access http://localhost:8080/jazz/service/kf.messageboard.common.IMessageBoardService/allMessages .

Any ideas where I could have gone wrong such that the JazzTalk example works fine but I get an HTTP 500 error with my own component?

Thanks,
Jamie

HTTP ERROR: 500

-- The name (Message) and namespace URI (kf.messageboard.common) do not resolve to a IItemType

RequestURI=/jazz/service/kf.messageboard.common.IMessageBoardService/allMessages

11 answers



permanent link
Chris Daly (61651) | answered Nov 12 '07, 2:32 p.m.
JAZZ DEVELOPER
jsamdal wrote:
Hello,

I have been following all of the steps in the JazzTalk example, and I
was able to get the JazzTalk packages to work and run. When I tried
to run my own component that was essentially JazzTalk in a different
package structure and with some things renamed, I ran into the
following error concerning my Message and common package not
resolving to an IItemType. This was after verifying that my
IMessageBoardService did show up on http://localhost/8080/jazz, and
trying to access
http://localhost:8080/jazz/service/kf.messageboard.common.IMessageBoardService/allMessages


Any ideas where I could have gone wrong such that the JazzTalk example
works fine but I get an HTTP 500 error with my own component?


Hi Jamie,

My guess is that in the copy/paste/rename process you might have missed
renaming one of the identification strings. I would go back and double
check the Ecore model and the plugin.xml stuff for any lingering
"jazztalk" strings. Don't forget to re-run codegen and regenerate the
database if you need to change the storage model.

If that doesn't track it down, I would try to get an exception stack
from the server to try to figure out where it's failing over there.
There may already be an exception stack in the console. If not you
could debug the server and set a breakpoint in your
MessageBoardService.getAllMessages() method and step through that to try
to figure out where the error happens.


hope this helps,

Chris

permanent link
Jamie Samdal (911) | answered Nov 12 '07, 2:43 p.m.
Hello,

It seems to be crashing at:
IItemQuery itemQuery = IItemQuery.FACTORY.newInstance(queryModel);
in getAllMessages.

with the stack trace copied below. I double checked my ecore model repeatedly, and the only difference between the downloaded jazztalk and my message board version (besides the different high level package names and calling things MessageBoard instead of JazzTalk) is that the 'JazzTalkModel' Ns URI has http://jazztalk.ecore (all lower case) and my 'MesageBoardModel' has Ns URI 'http://MessageBoard.ecore'. However, my component generation has problems if I try to make that part all lower case.

The stack trace indicates there are problems with my common package and my Message class not resolving to an IItemType, but my Message is set up as a SimpleItem as directed in the JazzTalk walkthrough.

Any other ideas of where to look?

Thanks,
Jamie

Stack Trace:

12:05:01,890 WARN .team.repository.servlet.AbstractTeamServerServlet - Exception executing modeled rest service kf.messageboard.common.IMessageBoardService.getAllMessages
java.lang.IllegalArgumentException: The name (Message) and namespace URI (kf.messageboard.common) do not resolve to a IItemType
at com.ibm.team.repository.common.internal.querypath.AbstractQueryPathModel$Implementation.getItemType(AbstractQueryPathModel.java:153)
at com.ibm.team.repository.common.query.IQuery$Factory.newInstance(IQuery.java:91)
at kf.messageboard.service.MessageBoardService.getAllMessages(MessageBoardService.java:26)
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.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:326)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:318)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$1.invoke(ExportProxyServiceRecord.java:106)
at $Proxy81.getAllMessages(Unknown Source)
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 com.ibm.team.repository.servlet.AbstractTeamServerServlet.doModelledRestService(AbstractTeamServerServlet.java:342)
at com.ibm.team.repository.servlet.AbstractTeamServerServlet.service(AbstractTeamServerServlet.java:1095)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:109)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

permanent link
Chris Daly (61651) | answered Nov 12 '07, 4:55 p.m.
JAZZ DEVELOPER
jsamdal wrote:
Hello,

It seems to be crashing at:
IItemQuery itemQuery = IItemQuery.FACTORY.newInstance(queryModel);
in getAllMessages.


Looking at the exception stack it seems like you are in the second throw
statement of AbstractQueryPathModel.Implementation.getItemType(), so the
call to:

IItemType itemType =
IItemType.IRegistry.INSTANCE.getItemType(typeName, nsURI);

returned null.

I have seen this before when launch configurations get messed up by
using the "Add Required Bundles" button on the launch config dialog.
See https://jazz.net/wiki/bin/view/Main/JazzServerRunAndDebug for
warnings about that. If you suspect your launch config might be bad
then start over with a clean one (e.g. from the JazzTalk download).

However it could also still be some typo in the common or service
plugin.xml goop. Here's an idea: in your getAllMessages() method,
before anything else, you could call:

IItemType.IRegistry.INSTANCE.getAllItemTypes();

and either dump the values to the console or just look at it in the
debugger. For each IItemType returned, look at the values of getName()
and getNamespaceURI() and try to figure out if your item type is simply
not there at all, or if the names are somehow not what you would expect.


Chris

permanent link
Jamie Samdal (911) | answered Nov 12 '07, 5:08 p.m.
All of the items in that list are ibm specific - with namespace URI's of com.ibm.team.<something else>

Mine aren't showing up. Does that mean my launch files are probably incorrect?

Jamie

permanent link
Chris Daly (61651) | answered Nov 12 '07, 7:03 p.m.
JAZZ DEVELOPER
jsamdal wrote:
All of the items in that list are ibm specific - with namespace URI's
of com.ibm.team.<something else

Mine aren't showing up. Does that mean my launch files are probably
incorrect?


The launch file is my best guess simply because I've seen cases where
bad launches resulted in the ItemType registry being incorrectly
initialized. This should be an easy thing to "sanity-test" simply by
starting over with a fresh launch.

But it could also be some bug in the plugins themselves. If you want to
attach your common and service plugins to a post here I'll take a look
at them.


Chris

permanent link
Jamie Samdal (911) | answered Nov 14 '07, 2:47 p.m.
Neither the JazzTalk launch or the Typical Launch seems to work. If you have time, I definitely would appreciate another eye on these to see where I could have messed up - again, I intended just to get the basic JazzTalk functionality working before I modified the ecore model, so it should be jazzTalk with different names at this point. :)

Hmm, I can't seem to find a way to post zip files to the forum. (It looks like it only accepts images or URLs). Could you point out how or could I send them to you directly?

Thanks,
Jamie

permanent link
Chris Daly (61651) | answered Nov 14 '07, 7:18 p.m.
JAZZ DEVELOPER
jsamdal wrote:

Hmm, I can't seem to find a way to post zip files to the forum. (It
looks like it only accepts images or URLs). Could you point out how
or could I send them to you directly?


Attaching works for me (I'm using Mozilla Thunderbird as a newsreader).

Another way of doing it would be to open a workitem on jazz.net (
https://jazz.net/bugs/bugs.jsp ) and attach the zip to the workitem. If
you go this route, set the bug category to "Component Development" and
then reply back here with the bug number.


Chris

permanent link
Chris Daly (61651) | answered Nov 16 '07, 2:48 p.m.
JAZZ DEVELOPER
Hi Jamie,

I see the problem here. The nsURI of the *teamPackage* in your storage
model needs to be the same as your component id. You are using
"kf.messageboard" as your component id, but "kf.messageboard.common" as
the teamPackage nsURI.

I've attached some screenshots that show what I'm talking about. (Sorry
- I got a little crazy with the pin. :-) The point is that you need to
use the same id string in all of these places.

So you need to:

1) change teamPackage nsURI to "kf.messageboard"
2) change the uri in the generated_package extension in common
plugin.xml to "kf.messageboard"
3) run codegen again
4) rebuild the database
5) start server and test

By the way, I'm almost positive that the nsURI of the *teamModel* is
totally ignored by us. You mentioned before that you were seeing some
problem when you changed your value ("http://MessageBoard.ecore") to
lowercase. I think this must have been a red herring.


Let me know if this gets you back on track....

Chris

permanent link
Jamie Samdal (911) | answered Nov 16 '07, 11:10 p.m.
Wow, thanks for finding that.

I changed the "messageboard" nsUri (since I think that's the team package) to be kf.messageboard, but then when I try to generate the component I get the following error:

"Errors or warnings occured during code generation. Reason: View details for generation log." and details shows: "Error creating genmodel" "java.lang.NullPointerException". Is there a log somewhere that might have more information than that? I can't seem to find a genmodel log. (this was the same error I received when I changed the team model to have different capitalization).

However, unlike before, when I put it back the way it was it is still giving me that same error. :-/ I must have really messed something up...

Thanks,
Jamie

permanent link
Jamie Samdal (911) | answered Nov 17 '07, 1:21 p.m.
I just verified that I am getting the same errors on the jazztalk example when I try to generate the component... any idea what i messed up?

Your answer


Register or 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.