Looking for the right EhCacheUtil

Hello everyone,

I have written a plugin offering tentative support of the Redmine issue tracker. Now I'd like to test it, but have run into a problem:

java.lang.NoClassDefFoundError: jetbrains/buildServer/util/EhCacheUtil

EhCacheUtil is a constructor parameter to the AbstractIssueFetcher and included (only) in webapps/ROOT/WEB-INF/lib/server.jar.
I'm pretty sure it would be a bad idea to duplicate the file in my plugin and don't know how to make TeamCity find it.

Any tips? The code itself is quite simple and can be found at http://github.com/milgner/redcity

All the best
Marcus

5 comments
Comment actions Permalink

Hi Marcus,

> I have written a plugin offering tentative support of the Redmine issue tracker.
Thanks! I didn't have a chance to look at it yet, but I'm going to and will leave some comments, if you like.

> java.lang.NoClassDefFoundError: jetbrains/buildServer/util/EhCacheUtil
EhCacheUtil is a part of server.jar, but may be you have different versions of jars in different places.
See, in 6.0 this class is inside jetbrains/buildServer/util/cache
What TeamCity API version are working with?


---
Maxim

0
Comment actions Permalink

Hi Maxim,

thank you very much for the helpful reply. It turned out I had an old and different version of TeamCity on my development PC than the TC installation on the other one.
Now the plugin loads successfully but there still seems to be a glitch in my packaging structure as I receive this exception:

javax.servlet.ServletException: File "/plugins/redmine/admin/editIssueProvider.jsp" not found.

My (unpacked) plugin currently looks like this:

redmine/server/redmine.jar
redmine/teamcity-plugin.xml

Of which redmine.jar contains these files:

META-INF/MANIFEST.MF
META-INF/build-server-plugin-redmine.xml
com/marcusilgner/redcity/RedmineIssueFetcher$RedmineFetchFunction.class
com/marcusilgner/redcity/RedmineIssueFetcher.class
com/marcusilgner/redcity/RedmineIssueProvider.class
com/marcusilgner/redcity/RedmineIssueProviderFactory.class
redmine/admin/editIssueProvider.jsp

The last file was previously named without the leading 'redmine' but after seeing the above error message, I tried it this way, without success.

It would be great if you could give me another hint. The source code on Github reflects the current status.

Best regards
Marcus

0
Comment actions Permalink

Hi Marcus,

You can find the examples of plugin packages at our page: http://confluence.jetbrains.net/display/TW/TeamCity+Plugins
I might be mistaken, but the jar structure should be the following:
META-INF/...
com/...
buildServerResources/...

So just try to put your 'admin' directory to the 'buildServerResources'. After unpacking it should appear in 'redmine'.

---
Maxim

0
Comment actions Permalink

Hey Maxim,

thanks for the tip, I now could implement basic issue tracker support for both Redmine and Github. There's just one thing still bugging me: while the issue log displays correct information about the issue and any issues mentioned in the commit messages are correctly parsed and linked, the small dropdown arrow still displays "Issue not found." when I click on it.
I have added a file popup-experimental.jsp in the same fashion that the other trackers seem do but that didn't help. Probably I need to register the "issue" bean myself somewhere, but I can't see anything related in any of the interfaces mentioned on the wiki or the OSS code around.
Anyway, the basic stuff is working alright. Code is at
https://github.com/milgner/TeamCityRedmine and https://github.com/milgner/TeamCityGithub

All the best
Marcus

0
Comment actions Permalink

Hi Marcus,

Do you say that the new provider is present on admin UI, where you can create a connection, and the issues are populated and shown in issue log, but the issue is not present in a popup?
That would be very strange. The issue is retrieved via IssueProvider.findIssueById() method, you can look into that. Also can this be a case-sensitivity problem?

BTW, I have looked at your code. No critical comments there :)

---
Maxim

0

Please sign in to leave a comment.