views:

118

answers:

4

I am having a problem with NetBeans projects. It affects everyone on my team, for every project. Whenever a project is opened, or even sometimes seemingly at random, NetBeans (6.1) will add two libraries to the compile-time list. Normally this would go unnoticed, but the inclusion of these libraries causes JBoss to unceremoniously grenade itself when the apps are deployed.

It's a minor inconvenience (all we have to do is go remove the libraries), but I would still appreciate any ideas on how to get this to stop, once and for all.

Here's a picture of what I mean (the two offending libraries are highlighted): Dammit.

A: 

Your best shot is probably upgrading.

Arlen Beiler
A: 

If you can't upgrade, I would recommend wiping out your .netbeans directory in your home directory, which is Document And Settings under Windows pre-7, users in 7 and ~ in Unix and Unix likes.

This will wipe out all your settings and reset Netbeans to a base state.

James McMahon
Good idea, but no dice. Not only were the libraries still appearing, but my user preferences were all nuked too. I tried to search for the terms Jersey and JAX-RS within the .netbeans directory, and I couldn't find them.
iandisme
+1  A: 

Lo and behold, I found someone who reported the exact same thing in Netbeans' bugzilla site.

http://netbeans.org/bugzilla/show_bug.cgi?id=167726

Since it's still open (since 6.5), there's probably nothing I can do except go in and delete every time those stupid libraries appear.

Oh, and I can tell the Netbeans community I'm having the same problem. Thanks to scope-creep for the suggestion to check the bug site.

It sucks that I'm S.O.L., but at least now I know that it's out of my hands (unless I want to go into the NetBeans source and fix it myself, no thank you).

iandisme
+1  A: 

Are you doing anything to prompt inclusion of the libraries? For example, are you actually creating any REST web services, using a wizard? These look like libs that would be included if you were using REST/Jersey.

Other things you can try.

If you're not using REST/Jersey at all, simply remove the module from NetBeans, then, likely, whatever code or bug it has that's adding it's libraries to your project will stop executing.

Otherwise, rather than deleting the libraries from your project, simply click and uncheck the "Packaging" checkbox. Then, while the libraries will still be part of the project, at least they won't be bundled in your artifacts. This ideally would prevent them from "coming back" (since they're still there), and not grenade JBoss, because they won't be included in the WAR/EAR/JAR, if that's actually an issue for existing projects.

Will Hartung
This is a good workaround. Leaving the libraries included but not packaging them does not break JBoss, and if I do that, they do not reinclude themselves when the project is reopened. +1 and I'll accept if no one comes up with anything better.
iandisme